<!--#include file="./Conn_Mail.asp"-->
<html>
<head>
<meta http-equiv='Content-Language' content='zh-cn'>
<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>
<title></title>
<link rel='stylesheet' type='text/css' href='Images/admin.css'>
</head>
<body bgcolor='#FFFFFF' text='#000000' leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>
 <SCRIPT language=JavaScript>var www_url = "images/Menu/";</SCRIPT>
<SCRIPT language=JavaScript 
            src="./Menufunction.js"></SCRIPT>
<table width='100%'  border='0' cellspacing='0' cellpadding='0' height='100%'>
  <tr align="left"> 
    <td height="20" colspan="3">&nbsp;当前操作：<%=Session("XiaBoleusername")%></td>
  </tr>
  <tr align="left"> 
    <td height="20" colspan="3">&nbsp;<a href="javascript:location.reload()">刷新菜单</a></td>
  </tr>
  <tr> 
    <td height='1' colspan="3" bgcolor='D2D2D2'></td>
  </tr>
  <!--用户菜单-->
  <%
Purview   = "all"

  
	if Purview<>"" and not isnull(Purview) then
		Purview_1=split(Purview, ",")
			for i = 0 to ubound(Purview_1)
				Purview_2=Purview_1(i)
				
				IF Purview_2 <> "" THEN
				Purview_3 = Purview_3 & " or Purview = '"& trim(Purview_2) &"'"
				END IF
				
				if Ucase(trim(Purview_2)) ="ALL" then
				PurviewAtr = TRUE
				END IF

			next
	end if
	
PurviewStr = " Purview = '0000000000' "& Purview_3  
  
sql="select * from menuclass where Flag='08' order by listID"
set rsc=server.createobject("adodb.recordset")
rsc.open sql,conn_m,1,1
  i = 0
  do while not rsc.eof
  i = i + 1
  
if PurviewAtr= TRUE then
  	sql="select * from menu where class="&rsc("ID")&" and status=1 order by listID"
ELSE
  	sql="select * from menu where class="&rsc("ID")&" and (" & PurviewStr & ") and status=1 order by listID"
END IF

	set rsm=server.createobject("adodb.recordset")
	rsm.open sql,conn_m,1,1
	  do while not rsm.eof
			flag=true
			LastMenuID=rsm("ID")
		rsm.movenext
	   loop
	rsm.close
	rsm.open sql,conn_m,1,1
   IF not(rsm.bof and rsm.eof) then
	if flag=true then

  %>
  <TR> 
    <TD width=17 height="20"> <DIV class=parent id=el<%=i%>Parent><A class=item 
                        onclick="expandIt('el<%=i%>'); return false;" 
                      ><IMG id=el<%=i%>Img 
                        height=22 src="images/Menu/midclosedfolder.gif" 
                        width=16 align=absMiddle border=0 name=imEx></A></DIV></TD>
    <TD width=46 height="20"><A 
                        class=item onclick="expandIt('el<%=i%>'); return false;" 
                        ><IMG height=16 
                        src="<%if rsc("image") = "" then response.write  "images/Menu/icon_setting.gif" else response.write "images/Menu/" &rsc("image") end if %>" width=16 
                        align=absMiddle border=0></A></TD>
    <TD width=722 height="20"><span class="parent"><A href="" class=item title=<%=rsc("class")%> 
                        onclick="expandIt('el<%=i%>'); return false;"><%=rsc("class")%></A></span></TD>
  </TR>
  <TR> 
    <TD colspan="3"> <DIV class=child id=el<%=i%>Child> 
        <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
          <TBODY>
            <%do while not rsm.eof
					%>
            <TR> 
              <TD width=33><IMG height=22 
					src="images/Menu/vertline.gif" width=16 
					border=0></TD>
              <TD width="103" align=left ><IMG height=22 
					src="<% if LastMenuID <> rsm("ID") then response.write "images/Menu/midnodeline.gif" else response.write "images/Menu/lastnodeline.gif"   end if%>" 
					width=16 align=absMiddle border=0>&nbsp;<IMG height=11 
					src="images/Menu/icon_fd.gif" width=10 
					align=absMiddle border=0> </TD>
              <TD width="649" align=left ><A title=<%=rsm("menu")%> href="<%if Session("XiaBoleUserName")<>"" then%><%=rsm("URL")%><%else%>../../search/login.asp<%end if%>" target="<%=rsm("target")%>"><%=rsm("menu")%></A></TD>
            </TR>
            <%
					rsm.movenext
					loop%>
          </TBODY>
        </TABLE>
      </DIV></TD>
  </TR>
  <%

  else
  
  %>
  <tr> 
    <td colspan="3"> <table width='80%' border='0' cellspacing='0' cellpadding='6' align='center'>
        <tr> 
          <td valign='top'> 
            <!--<img src='<%=rsc("image")%>' width='61' height='21'>-->
            <%=rsc("class")%><br> 
            <%do while not rsm.eof
			if instr(menu,","&rsm("ID")&",") then%>
            <a href='<%=rsm("URL")%>'  <%if rsm("menu")<>"退出系统" then %>target='main' <%else%>target='_top'<%end if%>><%=rsm("menu")%></a><br> 
            <% end if
			rsm.movenext
			loop%>
          </td>
        </tr>
      </table></td>
  </tr>
  <tr> 
    <td height='1' colspan="3" bgcolor='D2D2D2'></td>
  </tr>
  <%
  	end if
		end if
	rsm.close
	rsc.movenext
	loop
	
Conn_m.Close
Set Conn_m = Nothing
  %>
  <TR> 
    <TD height="20"><IMG height=22 
                        src="images/Menu/lastnodeline.gif" width=16 
                        align=absMiddle border=0> </TD>
    <TD height="20" valign="top"><IMG height=16 
                        src="images/Menu/icon_exit.gif" width=16 
                        align=absMiddle border=0></TD>
    <TD height="20"><A title=退出管理系统 
                        href="logout.asp" target='_top' onClick="return confirm('您确定要退出管理系统吗？')">退出系统</A></TD>
  </TR>
  <tr> 
    <td height="100%" colspan="3">&nbsp; </td>
  </tr>
</table>
</body> </html>
