Else
t=t+1
End If
If t>=strlen Then
cutstr=Left(str,i) & "..."
Exit For
Else
cutstr=str
End If
Next
cutstr=Replace(Replace(Replace(Replace(replace(cutstr," "," "),Chr(34),"""),">",">"),"<","<"),"|","|")
End Function
''--------------系列验证----------------------------
''****************************************************
''函数名:CheckIsEmpty
''作 用:检查是否为空
''参 数:tstr ----字符串
''返回值:true不为空,false为空
''****************************************************
Public Function CheckIsEmpty(tstr)
CheckIsEmpty=false
If IsNull(tstr) or Tstr="" Then Exit Function
Dim Str,re
Str=Tstr
Set re=new RegExp
re.IgnoreCase =True
re.Global=True
str= Replace(str,
vbNewLine, "")
str = Replace(str, Chr(9), "")
str = Replace(str, " ", "")
str = Replace(str, " ", "")
re.Pattern="<img(.[^>]*)>"
str =re.Replace(Str,"94kk")
re.Pattern="<(.[^>]*)>"
Str=re.Replace(Str,"")
Set Re=Nothing
If Str<>"" Then CheckIsEmpty=true
End Function
''****************************************************
''函数名:isInteger
''作 用:整数检验
''参 数:tstr ----字符
''返回值:true是整数,false不是整数
''****************************************************
Public function isInteger(para)
on error resume Next
Dim str
Dim l,i
If isNUll(para) then
isInteger=false
exit function
End if
str=cstr(para)
If trim(str)="" then
isInteger=false
exit function
End if
l=len(str)
For i=1 to l
If mid(str,i,1)>"9" or mid(str,i,1)<"0" then
isInteger=false
exit function
End if
Next
isInteger=true
If err.number<>0 then err.clear
End Function
''****************************************************
''函数名:CheckName
''作 用:名字字符检验
''参 数:str ----字符串
''返回值:true无误,false有误
''****************************************************
Public Function CheckName(Str)
Checkname=true
Dim Rep,pass
Set Rep=New RegExp
Rep.Global=True
Rep.IgnoreCase=True
''匹配字母、数字、下划线、汉字且必须以字母或下划线或汉字开始
Rep.Pattern="^[a-zA-Z_u4e00-\u9fa5][\w\u4e00-\u9fa5]+$"
Set pass=Rep.Execute(Str)
If pass.count=0 Then CheckName=false
Set Rep=Nothing
End Function
''****************************************************
''函数名:CheckPassword
''作 用