📄 isadmin.asp
字号:
<%
'从Session变量中读取用户信息
UserName = Trim(Session("UserName"))
UserPwd = Trim(Session("UserPwd"))
'用户名是否为空
If UserName <> "" Then
sql = "Select * From Users Where UserName='" & UserName & "' And UserPwd='" & UserPwd & _
"' And UserType Like '%售后%'"
'是否存在此用户信息
Set rs = Conn.Execute(sql)
If rs.EOF Then
Response.Write "<script>alert('您没有权限');window.close()</script>"
End If
Else
Response.Write "<script>alert('您没有权限');window.close()</script>"
End If
Function isAdmin()
isAdmin = -1
'从Session变量中读取用户信息
UserName = Trim(Session("UserName"))
UserPwd = Trim(Session("UserPwd"))
'用户名是否为空
If UserName <> "" Then
sql = "Select * From Users Where UserName='" & UserName & "' And UserPwd='" & UserPwd & "'"
'是否存在此用户信息
Set rsUser = Conn.Execute(sql)
If Not rsUser.EOF Then
If InStr(Trim(rsUser("UserType")),"售后管理员")>0 Then '售后管理员
isAdmin = 1
ElseIf InStr(Trim(rsUser("UserType")),"售后主管")>0 Then '售后主管
isAdmin = 2
ElseIf InStr(Trim(rsUser("UserType")),"售后工程师")>0 Then '售后工程师
isAdmin = 3
End If
End If
Else
isAdmin = -1
End If
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -