<!--#include file="../utf-8.asp" -->
<!--#include file="../js/Function.asp" -->
<!--#include file="../CheckAdmin.asp" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<META NAME="copyright" CONTENT="Copyright 2010-2012 - yidacms.com" />
<META NAME="Author" CONTENT="世纪伟成  yidacms.com" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../js/admin.css" rel="stylesheet" type="text/css">
<title>导航管理!</title>
</head>
<body style="background-color=transparent">
<%
'版权：世纪伟成(http://yidacms.com)
'本信息不会影响您网站的正常访问，无论免费用户或是收费用户请保留这里的信息.
'如果您删除了这里的版权信息,将追究法律责任. 

		yidacms_id = cint(request("id"))
        set rs = server.createobject("adodb.recordset")
		sql="select * from shuaiweb_navigation WHERE id= "&yidacms_id&""
		rs.open sql,dbok,1,1
		T_nvclass = rs("wait_nasi")

		if request("t")="navigationedit" Then 
		Dim rs,sql
		Set rs = Server.CreateObject("ADODB.Recordset")
		sql = "SELECT * FROM shuaiweb_navigation WHERE id = "&yidacms_id&""
		rs.open sql,dbok,1,3
			rs("title")=trim(request.form("title"))
			rs("url")=trim(request.form("url"))
			rs("sort")=trim(request.form("sort"))
			rs("wait_nayi")=trim(request.form("wait_nayi"))
			rs("wait_nasi")=trim(request.form("wait_nasi"))
			rs("yida_language")="ch"
		rs.update
		rs.close
		set rs=nothing
		response.write "<script language=javascript> alert('成功修改！');location.replace('admin_navigation.asp');</script>"
        response.end
		end if
%>
			<table width="98%" border="0"cellpadding="10" cellspacing="0" bordercolor="#666666" style="border-collapse:collapse" align="center">
				  <form name="form1" id="form1" method="POST" action="admin_navigationedit.asp?t=navigationedit&id=<%=rs("id")%>">
				  <tr>
					<td><input type=button onclick="window.location.href('admin_navigation.asp')"value="返 回" class="inanniu"></td>
				  </tr>
			<tr>
			  <td onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc">导航归属<br />

<select name="wait_nasi" class="winla">
<%
set rs = server.createobject("adodb.recordset")
sql="select * from shuaiweb_navigation WHERE wait_nasi = 0 ORDER BY sort ASC"
rs.open sql,dbok,1,1

if T_nvclass = 0 then 
%>
<option value="0">项级导航不可修改!</option>
<%
else
do while not rs.eof
%>
<option value="<%=rs("id")%>"<%if T_nvclass = rs("id") then%>selected<%end if%>><%=rs("title")%></option>
<%
rs.MoveNext 
loop
end if
		set rs = server.createobject("adodb.recordset")
		sql="select * from shuaiweb_navigation WHERE id= "&yidacms_id&""
		rs.open sql,dbok,1,1
%>
</select>
</td>
			</tr>
				  <tr>
					<td>修改它的名称<br /><input name="title" type="text" id="title" value="<%=rs("title")%>" class="win"/></td>
				  </tr>
				  <tr>
					<td>修改它的地址<br /><input name="url" type="text" id="url" value="<%=rs("url")%>" class="win"/>
					(支持外部连接!)</td>
				  </tr>
			<tr>
			  <td>打开选项<br /><select name="wait_nayi" class="winla">
                                <option value="_self">原窗口打开</option>
                               <option value="_blank">新窗口打开</option>
                          </select>
                        </td>
			</tr>
				  <tr>
					<td>修改它的排序<br /><input name="sort" type="text" id="sort" value="<%=rs("sort")%>" size="10" class="win2" />
					(必须是数字,数字越小越靠前!)</td>
				  </tr>
				  <tr>
					<td><input type="submit" name="Submit" value="修 改" class="inanniu"/> <input type=button onclick="window.location.href('admin_navigation.asp')"value="返 回" class="inanniu"></td>		
				  </tr>
			<tr>
				<td>
<script>
 function showText(){
  if(document.getElementById("q").value==2){
   document.getElementById("text").innerHTML="<div style='padding:5px 5px 5px 5px; font-size:12px;'><input type='button' value='隐藏' onclick='hiddenText();' /><br /><br />网站路径标签 {yidacms:webpath}  </div>";
  } 
 }
 function hiddenText(){
  document.getElementById("text").innerHTML="";
 }
</script>
<select name="q" id="q" onchange="showText();">
 <option value="1">===查看可用标签===</option>
    <option value="2">基本标签</option>
</select>
<span id="text"></span>
				</td>
			</tr>
			</form>
			</table>
<%
		rs.close
		set rs=nothing
%>
</body>
</html>