menuitemoa.asp
来自「功能齐全的oa系统」· ASP 代码 · 共 88 行
ASP
88 行
<%option explicit%>
<!-- #include virtual="include/DataEnvi.asp" -->
<!-- #include virtual="include/String.asp" -->
<%
Dim C,ObjDB,ObjRS,i,StrSQL
Dim ID
Dim StrRows,StrFrames
Dim StrRoleIDs, AccountName, Password
ID = Request.QueryString("ID")
Set C = Server.CreateObject("CMS2003.DBHandle")
Set ObjDB = Server.CreateObject("Adodb.Connection")
OpenDB ObjDB
C.Init(ObjDB)
StrSQL = "Select AccountName, RoleIDs From t_OA_SYS_Account Where ID = " & Session("AccountID")
Set ObjRS = ObjDB.Execute(StrSQL)
StrRoleIDs = ObjRS("RoleIDs")
AccountName = ObjRS("AccountName")
Password = Session("Password")
'Response.Write(Password)
'Response.End
If IsNull(StrRoleIDs) Then StrRoleIDs = ""
If StrRoleIDs = "" Then StrRoleIDs = "0"
StrSQL = "Select DISTINCT MenuName,Icon,BasicPath,OrderID From v_Base_Menu_Role_Permission Where RoleID In (" & StrRoleIDs & ") And MenuParentID = " & ID & " Order By OrderID"
Set ObjRS = ObjDB.Execute (StrSQL)
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title></title>
<base target="_self">
<style>
<!--
td { font-size: 12px }
-->
</style>
</head>
<body bgcolor="#E1F2FF" leftmargin="20" rightmargin="0">
<div align=center>
<table border="0" cellpadding="0" cellspacing="0">
<%
While Not ObjRS.Eof
%>
<tr><td align=center height=50 valign=bottom>
<%
if ObjRS("BasicPath") = "Doc" then
%>
<img border="0" style="cursor=hand" onclick="parent.parent.IframeMain.location='../../Doc/help_index.html'"
src="../../Images/Menu/<%=ObjRS("ICON")%>1.gif" onmouseover="this.src='../../Images/Menu/<%=ObjRS("ICON")%>2.gif'"
onmouseout="this.src='../../Images/Menu/<%=ObjRS("ICON")%>1.gif'">
<%
elseif ObjRS("BasicPath") = "SubRole" then
%>
<img border="0" style="cursor=hand" onclick="parent.parent.IframeMain.location='../../SubRoles/'"
src="../../Images/Menu/<%=ObjRS("ICON")%>1.gif" onmouseover="this.src='../../Images/Menu/<%=ObjRS("ICON")%>2.gif'"
onmouseout="this.src='../../Images/Menu/<%=ObjRS("ICON")%>1.gif'">
<%
else
%>
<img border="0" style="cursor=hand" onclick="parent.parent.IframeMain.location='../../<%=ObjRS("BasicPath")%>/'"
src="../../Images/Menu/<%=ObjRS("ICON")%>1.gif" onmouseover="this.src='../../Images/Menu/<%=ObjRS("ICON")%>2.gif'"
onmouseout="this.src='../../Images/Menu/<%=ObjRS("ICON")%>1.gif'">
<%
end if
%>
</td></tr>
<tr><td align=center height=20>
<%=ObjRS("MenuName")%>
</td></tr>
<%
ObjRS.MoveNext
'Response.End
Wend
objRS.Close()
Set objRS = Nothing
objDB.Close()
Set objDB = Nothing
%>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?