📄 power
字号:
Private clsHash
Private intStatus
Private Sub Class_Initialize()
Set clsHash = Server.CreateObject(PROGID_HASH)
Dim arr, ptr
arr = Split("ConfigWeb|ConfigIndex|ConfigPlus|ConfigDownload|ConfigIPRule|ConfigUARule|ViewSpace|ChangePassword|AddStaple|DeleteStaple|ModifyStaple|AddContent|DeleteContent|ModifyContent|DeleteRemark|ViewUser|DeleteUser|ModifyUser|ViewUserRecord|ViewHitRecord|ViewStapleRecord|ViewContentRecord|ViewDownloadRecord|AddForum|DeleteForum|ModifyForum|DeleteArticle|ViewTrade|DeleteTrade|ViewGuestBook|ConfigGuestBook|DeleteGuestBook|ReplyGuestBook|AddMatter|DeleteMatter|ModifyMatter|AddTemplet|DeleteTemplet|ModifyTemplet|ViewCoop|DeleteCoop|ModifyCoop|AddAds|ViewAds|DeleteAds|ModifyAds|ViewMISCRecord|AddManager", "|")
For Each ptr In arr
clsHash(ptr) = 0
Next
intStatus = 0
End Sub
Private Sub Class_Terminate()
Set clsHash = Nothing
End Sub
Public Property Get keys()
keys = clsHash.keys
End Property
Public Default Property Get Item(ByVal strKey)
Item = clsHash(strKey)
End Property
Public Property Let Item(ByVal strKey, vtIn)
clsHash(strKey) = vtIn
End Property
Public Property Let Status(ByVal intIn)
intStatus = intIn
End Property
Public Property Get Status()
Status = intStatus
End Property
Public Function toString()
Dim ret, arr, i
arr = clsHash.Items
For i = 0 To UBound(arr)
ret = arr(i) & ret
Next
Do While i < 64
ret = 0 & ret
i = i + 1
Loop
toString = 1 & intStatus & ret
End Function
Public Sub fromString(ByVal strPower)
Dim arr, i
arr = clsHash.keys
For i = 0 To UBound(arr)
clsHash(arr(i)) = atoi(MidC(strPower, Len(strPower) - i, 1))
Next
intStatus = atoi(MidC(strPower, 2, 1))
End Sub
Private Function MidC(ByVal strIn, ByVal iPos, ByVal iLen)
If iPos > 0 Then
MidC = Mid(strIn, iPos, iLen)
Else
MidC = "0"
End If
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -