📄 manager.class.asp
字号:
End If
Rs.MoveNext
Wend
Rs.Close()
Set Rs = Nothing
End Function
'函数:初始化当前用户所具有的权限列表'
Private Function SpecialList_Process(role_special_list, self_special_list)
If IsNull(role_special_list) Then
role_special_list = ""
End If
If IsNull(self_special_list) Then
self_special_list = ""
End If
If role_special_list = "" AND self_special_list = "" Then
SpecialList = ""
Exit Function
End If
Dim tempSpecialList
tempSpecialList = role_special_list
'组合权限'
If self_special_list <> "" Then
If tempSpecialList <> "" Then
tempSpecialList = tempSpecialList & ","
End If
tempSpecialList = tempSpecialList & self_special_list
End If
SpecialList = tempSpecialList
End Function
'函数:初始化当前用户所具有的目录管理权限列表'
Private Function FolderList_Process(role_folder_list, self_folder_list)
Dim XMLDoc, tmpXMLDoc, Root, newElem
Dim File_Items, File_Item
Dim I
If IsNull(role_folder_list) Then
role_folder_list = ""
End If
If IsNull(self_folder_list) Then
self_folder_list = ""
End If
If role_folder_list = "" AND self_folder_list = "" Then
FolderList = ""
Exit Function
End If
Set XMLDoc = Server.CreateObject(Cfg.XMLObject_Name)
XMLDoc.async = FALSE
XMLDoc.resolveExternals = FALSE
XMLDoc.loadXML("<?xml version=""1.0"" encoding=""ISO-8859-1""?><file></file>")
Set Root = XMLDoc.documentElement.selectSingleNode("//file")
Set tmpXMLDoc = Server.CreateObject(Cfg.XMLObject_Name)
tmpXMLDoc.async = FALSE
tmpXMLDoc.resolveExternals = FALSE
I = 0
If role_folder_list <> "" Then
tmpXMLDoc.loadXML(role_folder_list)
Set File_Items = tmpXMLDoc.documentElement.selectNodes("//file/item")
For Each File_Item In File_Items
Set newElem = xmlDoc.createElement("index")
newElem.Text = I
File_Item.appendChild newElem
Root.appendChild File_Item
I = I + 1
Next
End If
tmpXMLDoc.abort
If self_folder_list <> "" Then
tmpXMLDoc.loadXML(self_folder_list)
Set File_Items = tmpXMLDoc.documentElement.selectNodes("//file/item")
For Each File_Item In File_Items
Set newElem = xmlDoc.createElement("index")
newElem.Text = I
File_Item.appendChild newElem
Root.appendChild File_Item
I = I + 1
Next
End If
tmpXMLDoc.abort
FolderList = XMLDoc.xml
Set XMLDoc = Nothing
Set tmpXMLDoc = Nothing
End Function
'函数:注销账号'
Public Function Logoff()
Session("Manager_Logined") = False
Session("Manager_Disabled") = False
Session("Manager_UserId") = ""
Session("Manager_UserName") = ""
Session("Manager_UserIp") = ""
Session("Manager_LoginTime") = ""
Session("Manager_Remark") = ""
Session("Manager_PopedomList") = ""
Session("Manager_FolderList") = ""
Session("Manager_RootNodeList") = ""
End Function
'函数:验证当前管理员是否有此权限
'参数:权限标识
'返回:bool (true:有权限)'
Public Function CheckPopedom(Pope_Key)
If Pope_Key = "" OR PopedomList = "" Then
CheckPopedom = False
Exit Function
End If
If PopedomList = "-1" Then
CheckPopedom = True
Exit Function
End If
'查找是否具有此权限'
If Instr("," & PopedomList & ",", "," & Pope_Key & ",")>0 Then
CheckPopedom = True
Exit Function
Else
CheckPopedom = False
Exit Function
End If
End Function
Public Property Get Logined()
Logined = CBool(Session("Manager_Logined"))
End Property
Public Property Let Logined(byval val)
Session("Manager_Logined") = CBool(val)
End Property
Public Property Get Disabled()
Disabled = Session("Manager_Disabled")
End Property
Public Property Let Disabled(byval val)
Session("Manager_Disabled") = val
End Property
Public Property Get UserId()
UserId = Session("Manager_UserId")
End Property
Public Property Let UserId(byval val)
Session("Manager_UserId") = val
End Property
Public Property Get UserName()
UserName = Session("Manager_UserName")
End Property
Public Property Let UserName(byval val)
Session("Manager_UserName") = val
End Property
Public Property Get UserIp()
UserIp = Session("Manager_UserIp")
End Property
Public Property Let UserIp(byval val)
Session("Manager_UserIp") = val
End Property
Public Property Get Remark()
Remark = Session("Manager_Remark")
End Property
Public Property Let Remark(byval val)
Session("Manager_Remark") = val
End Property
Public Property Get PopedomList()
'权限清单'
PopedomList = Session("Manager_PopedomList")
End Property
Public Property Let PopedomList(byval val)
Session("Manager_PopedomList") = val
End Property
Public Property Get FolderList()
'目录列表'
FolderList = Session("Manager_FolderList")
End Property
Public Property Let FolderList(byval val)
Session("Manager_FolderList") = val
End Property
Public Property Get RootNodeList()
'根节点清单'
RootNodeList = Session("Manager_RootNodeList")
End Property
Public Property Let RootNodeList(byval val)
Session("Manager_RootNodeList") = val
End Property
Public Property Get SpecialList()
'根节点清单'
SpecialList = Session("Manager_SpecialList")
End Property
Public Property Let SpecialList(byval val)
Session("Manager_SpecialList") = val
End Property
'注消类'
Private Sub Class_Terminate
End Sub
End Class
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -