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

📄 empmain_checkright.asp

📁 欢迎大家分享本系统为bs架构的asp+access版本。<br>包含:员工信息
💻 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 + -