2470, 12471, 12472, 12473, 12474, 12475, 12476, 12477, 12478, 12479, 12480, 12481, 12482, 12483, 12485, 12486, 12487, 12488, 12489, 12490, 12496, 12497, 12498, 12499, 12500, 12501, 12502, 12503, 12504, 12505, 12506, 12507, 12508, 12509, 12510, 12532, 12533, 65339, 65340)
For i = 1 To UBound(FobWords, 1)
If InStr(keyword, ChrW(FobWords(i))) > 0 Then
CheckQuery = False
Exit Function
End If
Next
FobWords = Array("~", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "_", "+", "=", "`", "[", "]", "{", "}", ";", ":", """", "''", "<", ">", ".", "/", "\", "|", "?", "about", "after", "all", "also", "an", "and", "another", "any", "are", "as", "at", "be", "because", "been", "before", "being", "between", "both", "but", "by", "came", "can", "come", "could", "did", "do", "each", "for", "from", "get", "got", "had", "has", "have", "he", "her", "here", "him", "himself", "his", "how", "if", "in", "into", "is", "it", "like", "make", "many", "me", "might", "more", "most", "much", "must", "my", "never", "now", "of", "on", "only", "or", "other", "our", "out", "over", "said", "same", "see", "should", "since", "some", "still", "such", "take", "than", "that", "the", "their", "them", "then", "there", "these", "they", "this")
keyword = Left(keyword, 100)
keyword = Replace(keyword, "!", " ")
keyword = Replace(keyword, "]", " ")
keyword = Replace(keyword, "[", " ")
keyword = Replace(keyword, ")", " ")
keyword = Replace(keyword, "(", " ")
keyword = Replace(keyword, " ", " ")
keyword = Replace(keyword, "-", " ")
keyword = Replace(keyword, "/", " ")
keyword = Replace(keyword, "+", " ")
keyword = Replace(keyword, "=", " ")
keyword = Replace(keyword, ",", " ")
keyword = Replace(keyword, "''", " ")
For i = 0 To UBound(FobWords, 1)
If keyword = FobWords(i) Then
CheckQuery = False
Exit Function
End If
Next
CheckQuery = True
End Function
''================================================
''函数名:IsValidStr
''作 用:判断字符串中是否含有非法字符
''参 数:str ----原字符串
''返回值:False,True -----布尔值
''================================================
Public Function IsValidStr(ByVal str)
IsValidStr = False
On Error Resume Next
If IsNull(str) Then Exit Function
If Trim(str) = Empty Then Exit Function
Dim ForbidStr, i
ForbidStr = "and|chr|:|=|%|&|$|#|@|+|-|*|/|\|<|>|;|,|^|" & Chr(32) & "|" & Chr(34) & "|" & Chr(39) & "|" & Chr(9)
ForbidStr = Split(ForbidStr, "|")
For i = 0 To UBound(ForbidStr)
If InStr(1,str, ForbidStr(i),1) > 0 Then
IsValidStr = False
Exit Function
End If
Next
IsValidStr = True
End Function
''=================