用户名已经存在,注册的时候还被判断可以注册如何修复(2)_动易Cms教程

编辑Tag赚U币
教程Tag:暂无Tag,欢迎添加,赚取U币!

Set rtext = Nothing
End If
End If
End If
End If
End Sub

替换成下列的内容

Sub usercheck()
Dim rtext, UserNameLimit, UserNameMax, UserName_RegDisabled

If InStr(iname, "=") > 0 Or InStr(iname, "%") > 0 Or InStr(iname, Chr(32)) > 0 Or InStr(iname, "?") > 0 Or InStr(iname, "&") > 0 Or InStr(iname, ";") > 0 Or InStr(iname, ",") > 0 Or InStr(iname, "'") > 0 Or InStr(iname, ".") > 0 Or InStr(iname, Chr(34)) > 0 Or InStr(iname, Chr(9)) > 0 Or InStr(iname, "?") > 0 Or InStr(iname, "$") > 0 Or InStr(iname, "*") Or InStr(iname, "|") Or InStr(iname, """") > 0 Then
Response.write "2" '含有非法字符
Exit Sub
End If

If strLength(iname) >= 4 And (LCase(Right(iname, 4)) = ".asp" Or LCase(Right(iname, 4)) = ".asa" Or LCase(Right(iname, 4)) = ".cer" Or LCase(Right(iname, 4)) = ".cdx") Then
Response.write "2" '含有非法字符
Exit Sub
End If

Set rtext = Conn.Execute("select top 1 UserNameLimit,UserNameMax,UserName_RegDisabled from PE_Config")
If Not (rtext.bof And rtext.EOF) Then
UserNameLimit = rtext("UserNameLimit")
UserNameMax = rtext("UserNameMax")
UserName_RegDisabled = rtext("UserName_RegDisabled")
Else
UserNameLimit = 4
UserNameMax = 20
End If
rtext.Close

If strLength(iname) > 20 Or strLength(iname) < UserNameLimit Then
Response.write "3" '长度不合
Else
If FoundInArr(UserName_RegDisabled, iname, "|") = True Then
Response.write "4" '禁止注册
Else
Set rtext = Conn.Execute("select top 1 UserName from PE_User where UserName='" & iname & "'")
If rtext.bof And rtext.EOF Then
Response.write "0"
Else
Response.write "1" '重复
End If
Set rtext = Nothing
End If
End If
End Sub

2.下载附件里的程序,覆盖到Inc目录下,即可修复

下载地址: 注册名判定修复补丁

查看更多 动易Cms教程  动易Cms模板

共2页上一页12下一页
来源:模板无忧//所属分类:动易Cms教程/更新时间:2007-08-28
相关动易Cms教程