<!--#include file="../Include/Head.asp"-->
<%BNavID=session("BNavID")%>

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="../Main/Right.asp">首页</a></li>
    <li><a href="BackNav.asp">后台管理菜单设置</a></li>
    </ul>
    </div>
    
    <div class="formbody">
    
    <table class="tablelist">
    	<thead>
    	<tr>
        <th width="35">ID</th>
        <th width="60">排序</th>
        <th width="150">名称</th>
        <th width="250">链接</th>
        <th>简介</th>
        <th width="120">操作</th>
        </tr>
        </thead>
        <tbody>    
		<%
        set rs=Server.CreateObject("ADODB.recordset")
        rs.open "select * from [Jin_BackNav] where Pid=0 Order by sortID,sysID desc",conn,1,2,1
		for i=1 to rs.Recordcount
        %>
        <tr height="42" bgcolor="#f1f1f1" <%If Rs("ShowNav")=false then%>class="filter"<%end if%>>
        <td onclick="location.href='Sessions.asp?BNavID_<%=rs("SysID")%>'"><%=rs("SysID")%></td>
        <td><input name="SortID" type="text" class="newinput60 SortID" id2="<%=rs("SysID")%>" value="<%=rs("SortID")%>"  style="width:45px;"/></td>
        <td><input name="Title" type="text" class="newinput200 Title" id2="<%=rs("SysID")%>" value="<%=rs("Title")%>"  style="width:140px;"/></td>
        <td><input name="Url" type="text" class="newinput200 Url" id2="<%=rs("SysID")%>" value="<%=rs("Url")%>"  style="width:240px;"/></td>
        <td><input name="Remark" type="text" class="newinput450 Remark" id2="<%=rs("SysID")%>" value="<%=rs("Remark")%>"  style="width:95%;"/></td>
        <td>
        <a href="javascript:;" class="BNavAdd1 tablelink" id2="<%=rs("SysID")%>">添加</a> - 
		<%If Rs("ShowNav") then%>
        <A href="?Action=ShowNavno&id=<%=Rs("sysID")%>" class="tablelink">隐藏</A> -
        <%else%>
        <A href="?Action=ShowNav&id=<%=Rs("sysID")%>" class="tablelink"><font color="red">显示</font></A> -
        <%end if%>
        <a href="javascript:;" class="BNavDel tablelink" id2="<%=rs("SysID")%>" >删除</a>
        </td>
        </tr> 
        <tr>
        <tr <%If rs("SysID")<>clng(BNavID) then%>style="display:none;"<%End If%>>
        <td colspan="6" style="padding:0; border:none;">
        	<table class="tablelist" style="border:none;">
			<%
			set rsa=Server.CreateObject("ADODB.recordset")
			rsa.open "select * from [Jin_BackNav] where Pid="&rs("SysID")&" Order by sortID,sysID desc",conn,1,2,1
			for j=1 to rsa.Recordcount
            %>
            <tr height="35" <%If Rsa("ShowNav")=false then%>class="filter"<%end if%>>
            <td width="35"><%=rsa("SysID")%></td>
            <td width="60"><input name="SortID" type="text" class="newinput60 SortID" id2="<%=rsa("SysID")%>" value="<%=rsa("SortID")%>"  style="width:35px; margin-left:10px;"/></td>
            <td width="150"><input name="Title" type="text" class="newinput200 Title" id2="<%=rsa("SysID")%>" value="<%=rsa("Title")%>"  style="width:130px;margin-left:10px;"/></td>
            <td width="250"><input name="Url" type="text" class="newinput200 Url" id2="<%=rsa("SysID")%>" value="<%=rsa("Url")%>"  style="width:230px;margin-left:10px;"/></td>
            <td><input name="Remark" type="text" class="newinput450 Remark" id2="<%=rsa("SysID")%>" value="<%=rsa("Remark")%>"  style="width:93%;margin-left:10px;"/></td>
            <td width="120">
            <%If rsa("ShowNav") then%>
            <A href="?Action=ShowNavno&id=<%=rsa("sysID")%>" class="tablelink">隐藏</A> -
            <%else%>
            <A href="?Action=ShowNav&id=<%=rsa("sysID")%>" class="tablelink"><font color="red">显示</font></A> -
            <%end if%>
            <a href="javascript:;" class="BNavDel tablelink" id2="<%=rsa("SysID")%>" >删除</a>
            </td>
            </tr> 
			<%
            rsa.movenext
            next
            rsa.close
            set rsa=nothing
            %> 
            </table>
        </td>
        </tr> 
		<%
        rs.movenext
        next
		rs.close
		set rs=nothing
        %>        
        <tr>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td><a href="javascript:;" class="BNavAdd tablelink" id2="9">添加</a></td>
        </tr>
            
        </tbody>
    </table>
    
    </div>




<%
if Trim(Request.QueryString("Action"))="ShowNav" then
	conn.execute "UPDATE [Jin_BackNav] SET ShowNav = true WHERE sysID = "&Trim(Request.QueryString("id"))
	Response.Write ("<script language=javascript>window.location=document.referrer;</script>")
end if
if Trim(Request.QueryString("Action"))="ShowNavno" then
	conn.execute "UPDATE [Jin_BackNav] SET ShowNav = false WHERE sysID = "&Trim(Request.QueryString("id"))
	Response.Write ("<script language=javascript>window.location=document.referrer;</script>")
end if
%>

<%Call BackFoot()%>


<script>
$(document).ready(function(e){
autoAdd("BNavAdd");
autoAdd("BNavAdd1");
autoSave("SortID");
autoSave("Title");
autoSave("Url");
autoSave("Remark");
autoDel("BNavDel");
});
</script>