📄 empmain_checkright.asp
字号:
<%
response.expires = 0
response.expiresabsolute = Now() - 1
response.addHeader "pragma","no-cache"
response.addHeader "cache-control","private"
Response.CacheControl = "no-cache"
%>
<%
if trim(request.Cookies("UserName")) = "" then
response.Write("您还没有正确登录本系统!")
response.end
end if
%>
<%
Function fnCheckRight(PageName,RightID)
Dim UR
Dim UR_numRows
Set UR = Server.CreateObject("ADODB.Recordset")
UR.ActiveConnection = MM_EmpMain_STRING
UR.Source = "SELECT * FROM UserRight where ID = "& request.Cookies("ID") &" and " & PageName & " like '%" & RightID & "%'"
UR.CursorType = 0
UR.CursorLocation = 2
UR.LockType = 1
UR.Open()
if UR.eof then
response.Write("没有权限!")
response.End
end if
End function
Function fnCreateLog(PageName)
UserID = request.Cookies("ID")
ProcessName = PageName
Set MM_editCmd = Server.CreateObject("ADODB.Command")
MM_editCmd.ActiveConnection = MM_EmpMain_STRING
MM_editQuery = "insert into logMainTain (UserID,ProcessName) values ("&UserID&",'"&ProcessName&"')"
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
End function
Function createSel(selName,stdValue)
Set SCode = Server.CreateObject("ADODB.Recordset")
SCode.ActiveConnection = MM_EmpMain_STRING
SCode.Source = "SELECT * FROM SelectMain where selectName = '"& selName &"'"
SCode.CursorLocation = 2
SCode.LockType = 1
SCode.Open()
HTMLOption = "<option></option>"
strOptions = SCode("OptionContent")
if trim(strOptions) <> "" Then
aryOptions = split(strOptions,",")
For i = 0 to UBound(aryOptions)
if aryOptions(i) = stdValue Then
strSelected = "selected"
else
strSelected = ""
End if
HTMLOption = HTMLOption + "<option "&strSelected&" value='"&aryOptions(i)&"'>"&aryOptions(i)&"</option>"
Next
End if
createSel = HTMLOption
End function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -