<!--#include file="../../Common/Config.asp"-->
<!--#include file="../Include/Check.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 http-equiv="Content-Type" content="text/html; chaRset=utf-8" />
<title><%=Web_Name%>左侧导航</title>
<link href="<%=Web_Root%>Admin/Css/Style.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="<%=Web_Root%>Admin/Js/jquery.js"></script>

<script type="text/javascript">
$(function(){	
	//导航切换
	$(".menuson li").click(function(){
		$(".menuson li.active").removeClass("active")
		$(this).addClass("active");
	});
	
	$('.title').click(function(){
		var $ul = $(this).next('ul');
		$('dd').find('ul').slideUp();
		if($ul.is(':visible')){
			$(this).next('ul').slideUp();
		}else{
			$(this).next('ul').slideDown();
		}
	});
})	
</script>

</head>
<%
nowpage = session("nowpage")
nowpage1 = split(nowpage,"?")
nowpage2 = nowpage1(0)

NowUrl=Replace(nowpage2,web_root&"Admin/","")	'后台当前管理页面
'response.Write NowUrl
%>
<body style="background:#f0f9fd;">
	<div class="lefttop"><span></span>技术支持：<a href="http://www.oywork.com" target="_blank"><font color="#FFFFFF">一捧阳光</font></a></div>
    
    <dl class="leftmenu">
		<%
        set Rs=Server.CreateObject("ADODB.recordset")
        Sql="select * from [Jin_BackNav] where Pid=0 and ShowNav Order by sortID,sysID desc"
		Rs.Open Sql, Conn, 1, 1
        for i=1 to Rs.Recordcount
		If Instr(ListUrl(Rs("SysID")),NowUrl)>0 then ShowStr="style=""display:block""" else ShowStr="style=""display:none"""
        %>
        <dd>
        <div class="title"><span><img src="<%=Web_Root%>Admin/Images/leftico01.png" /></span><%=Rs("Title")%></div>
            <ul class="menuson" <%=ShowStr%>>
            <%
            set Rsa=Server.CreateObject("ADODB.recordset")
            Sqla="select * from [Jin_BackNav] where Pid="&Rs("SysID")&" and ShowNav Order by sortID,sysID desc"
			Rsa.Open Sqla, Conn, 1, 1
            for j=1 to Rsa.Recordcount
            %>
            <li <%If NowUrl=Rsa("Url") then%>class="active"<%End If%>><cite></cite><a href="../<%=Rsa("Url")%>" target="rightFrame"><%=Rsa("Title")%></a><i></i></li>
            <%
            Rsa.movenext
            next
            Rsa.close
            set Rsa=nothing
            %> 
            </ul>    
        </dd>
        <%
        Rs.movenext
        next
        Rs.close
        set Rs=nothing
        %>
    </dl>
    
</body>
</html>

<%
'后台管理菜单主分类下子菜单链接集
Function ListUrl(boxnum)
	ListUrla=""
	set Rs_a=Server.CreateObject("ADODB.recordset")
	Sql_a="select * from [Jin_BackNav] where Pid="&boxnum&" Order by sortID,sysID desc"
	Rs_a.Open Sql_a, Conn, 1, 1
	for k=1 to Rs_a.Recordcount
	ListUrla=ListUrla&" "&Rs_a("Url")
	Rs_a.movenext
	next
	Rs_a.close
	set Rs_a=nothing
	ListUrla=Replace(Trim(ListUrla)," ",",")
	ListUrl=ListUrla
End Function
%>