\+")
str = Replace(str, "[", "\[")
str = Replace(str, "]", "\]")
str = Replace(str, "<", "\<")
str = Replace(str, ">", "\>")
str = Replace(str, ".", "\.")
str = Replace(str, "/", "\/")
str = Replace(str, "?", "\?")
str = Replace(str, "=", "\=")
str = Replace(str, "|", "\|")
str = Replace(str, "$", "\$")
CorrectPattern = str
End Function
''=============================================================
''函数名:UserGroupSetting
''作 用:取用户级权限设置
''参 数:gradeid ----等级ID
''=============================================================
Public Function UserGroupSetting(ByVal gradeid)
If Not IsNumeric(gradeid) Then
gradeid = 0
End If
On Error Resume Next
Dim Rs, SQL
Name = "GroupSetting" & gradeid
If ObjIsEmpty() Then
SQL = "Select Groupname,GroupSet from [NC_UserGroup] where Grades =" & gradeid
Set Rs = Execute(SQL)
If Rs.BOF And Rs.EOF Then
UserGroupSetting = ""
Set Rs = Nothing
Exit Function
End If
Value = Rs("GroupSet") & Rs("Groupname")
Set Rs = Nothing
End If
UserGroupSetting = Value
End Function
Private Sub LoadGroupSetting()
Dim strGroupSetting
Dim Rs, SQL
Dim Grades
Grades = CInt(membergrade)
On Error Resume Next
If Grades > 0 And memberid > 0 Then
If binUserLong = False Then
Set Rs = Execute("SELECT userid FROM [NC_User] WHERE password=''" & CheckRequest(memberpass, 45) & "'' And UserGrade=" & Grades & " And UserLock=0 And userid =" & memberid)
If Rs.BOF And Rs.EOF Then
Grades = 0
Response.Cookies(Cookies_Name) = ""
binUserLong = False
Else
binUserLong = True
End If
Set Rs = Nothing
End If
End If
Name = "GroupSetting" & Grades
If ObjIsEmpty() Then
SQL = "Select Groupname,GroupSet from [NC_UserGroup] where Grades =" & Grades
Set Rs = Execute(SQL)
If Rs.BOF And Rs.EOF Then
Response.Cookies(Cookies_Name) = ""
Set Rs = Nothing
Exit Sub
End If
Value = Rs("GroupSet") & Rs("Groupname")
Set Rs = Nothing
End If
blnGroupSetting = True
strGroupSetting = Value
arrGroupSetting = Split(strGroupSetting, "|||")
End Sub
Public Property Get GroupSetting(i)
If Not blnGroupSetting Then LoadGroupSetting
GroupSetting = arrGroupSetting(i)
End Property
Public Function ReadContent(ByVal strContent)
On Error Resume Next
Dim re, i
Dim sContentKeyword, strKeyword