<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR"
Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<P>&nbsp;</P>
<%
dim mysql
dim NewUserName,NewUserPWD,NewUserNickName,NewUserSex,NewQuestion,NewAnswer,NewEmail
NewUserName=Request.Form("UserName"
NewUserPWD=Request.Form("pwd1"
NewUserNickName=Request.Form("NickName"
NewUserSex=Request.Form("UserSex"
NewEmail=Request.Form("Email"
NewQuestion=Request.Form("Question"
NewAnswer=Request.Form("Answer"
set myrecord=server.CreateObject ("ADODB.Recordset"
mysql="SELECT * FROM UserInfo WHERE NickName='"
&
NewUserName &
"'"
myrecord.Open mysql,"DSN=ChatRoom",1,3
if (instr(NewUserNickName, "
"
> 0) then
Response.Write "昵称中含有非法字符!,请<a href='RegUser.asp'>重新注册</a>"
else
If ((instr(NewEmail, "@"
= 0) or ((instr(NewEmail, "."
= 0))) then
'If ( 1 <> 1) then
Response.Write "E-mail地址非法,其格式为 demo@china.com(其中demo为用户名),请<a href='RegUser.asp'>重新注册</a>"
else
if not myrecord.BOF then
Response.Write "对不起!该用户名已经存在,请<a href='RegUser.asp'>重新注册</a>"
else
myrecord.AddNew
myrecord("UserName"
=NewUserName
myrecord("UserPass"
=NewUserPWD
myrecord("NickName"
=NewUserNickName
myrecord("UserSex"
=NewUserSex
myrecord("UserQues"
=NewQuestion
myrecord("Email"
=NewEmail
myrecord("UserAns"
=NewAnswer
myrecord("LogInTime"
=Now()
myrecord("IPAdd"
=Request.ServerVariables("REMOTE_ADDR"
myrecord.Update
Response.Write ("恭喜你,你已经注册成功,在得到系统认证后,你可以<a href='Login.asp'>进入聊天室</a>"
End If
End If
End If
myrecord.Close
Set myrecord = nothing
%>
</BODY>
</HTML>
<HTML>
<BODY onload="">
<script language=vbscript>
</script>
</BODY>
</HTML>