?? menu_expert.asp
字號:
<!--#include file="../Include/AdoConn.asp"-->
<%
set objres=server.CreateObject ("adodb.recordset")
objres.CursorType =3
objres.CursorLocation =3
objres.LockType =2
set objres2=server.CreateObject ("adodb.recordset")
objres2.CursorType =3
objres2.CursorLocation =3
objres2.LockType =2
'讀取該用戶所有模塊權限的一級模塊
usercode=session("usercode")
strsql="select 模塊編碼,模塊名稱 from XT_VP_ModuleUserRole where 用戶編碼= '"& usercode & "' and len(模塊編碼)=2"
objres.Open strsql,strconn
dim module1sum '一級模塊個數
module1sum=objres.RecordCount
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="CssLib/Menu.css" >
<script language="javascript" src="../js/MenuList.js">
</script>
</head>
<body scroll="no" style="MARGIN: 0px" bgcolor="#3777BC">
<table width="150" border="0" cellspacing="2" cellpadding="0">
<tr>
<td width="62" valign="top"> <font color="#FFFFFF"> 當前用戶: </font></td>
<td width="82" valign="top"> <font color="#FFFFFF">
<% response.write session("username")%>
</font></td>
</tr>
<tr>
<td width="62" valign="top"> <font color="#FFFFFF"> 用戶角色: </font></td>
<td width="82" valign="top"> <font color="#FFFFFF">
<%
if session("rolebiaoshi")="Y" then
for i=0 to ubound(session("role"))-1
response.write session("role")(i)
response.write "、<br>"
next
end if
%>
</font></td>
</tr>
<tr>
<td width="62" valign="top"> </td>
<td width="82" valign="top"> </td>
</tr>
</table>
<A id="menuCount" value="7" >
<script language="javascript">
<!--
menu_start = 1;
menu_end = 7;
--></script>
</A>
<TABLE border=0 cellPadding=0 cellSpacing=0 style="LEFT: 0px; TOP: 122px " width=153 >
<SCRIPT language=javascript>
<!--
last_id = 1;
-->
</SCRIPT>
<%
if module1sum>0 then
function endstr(int1) '計算“end ”處的值
if int1=1 then
endstr="1"
else
if int1=module1sum then
endstr="3"
else
endstr="2"
end if
end if
end function
for i=1 to module1sum-6 '循環處理每個一級模塊
%>
<TR>
<TD><A href="javascript:showmenu(<%=i%>)"><IMG align=absMiddle border=0
height=20 id=img_design_<%=i%>
<%if i=1 then%>
src="images/minus_start.gif"
<%else %>
src="images/plus.gif"
<%end if%>
width=19><IMG align=absMiddle border=0 height=20 id=img_folder_<%=i%>
<%if i=1 then%>
src="images/folder_open.gif"
<%else%>
src="images/folder_close.gif"
<%end if%>
width=19> <%=objres("模塊名稱")%></A></TD></TR>
<TR id=menu_<%=i%><%if i<>1 then %> style="DISPLAY: none"<%end if%> end="<%=endstr(i)%>">
<TD>
<%
strsql2="select 模塊名稱,模塊路徑 from XT_VP_ModuleUserRole where 用戶編碼= '"& usercode & "' and 模塊編碼 like'"+objres.Fields("模塊編碼").Value+"%' and len(模塊編碼)<>2"
objres2.Open strsql2,strconn
for j=0 to objres2.RecordCount -1 '循環讀取每個一級模塊的下級模塊
%>
<IMG align=absMiddle border=0 height=20
src="images/line.gif"
width=19><IMG align=absMiddle border=0 height=20
src="images/line_tri.gif"
width=19> ◇ <A href="<%=objres2.Fields("模塊路徑").Value%>"
target=frmRight><%=objres2.Fields("模塊名稱").Value %></A><BR>
<%
objres2.MoveNext
next
objres2.Close
objres.MoveNext
%>
</TD></TR>
<%
next
objres.Close
set objres=nothing
set objres1=nothing
end if
%>
</TABLE>
</body></html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -