⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 menu_expert.asp

📁 ASP程序实现的科技期刊系统
💻 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">&nbsp;</td>
    <td width="82" valign="top">&nbsp;</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 + -