<!--#include file="inc/Conn.asp"-->
<!--#include file="inc/md5.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<%
If request.form("P_UserName")="" Then
Response.Write("<script language=""JavaScript"">alert(""错误提示：您的用户名不能为空！！"");history.go(-1);</script>")
response.end
end if
If request.form("P_PassWord")="" Then
Response.Write("<script language=""JavaScript"">alert(""错误提示：您的密码不能为空！！"");history.go(-1);</script>")
response.end
end if

If request.form("P_PassWord")<>request.form("P_PassWord2") Then
Response.Write("<script language=""JavaScript"">alert(""错误提示：您输入的密码与确认密码不相同！！"");history.go(-1);</script>")
response.end
end if

If request.form("CheckCode")="" Then
Response.Write("<script language=""JavaScript"">alert(""错误提示：验证码不能为空！！"");history.go(-1);</script>")
response.end
end if

If request.form("CheckCode")<>CStr(session("CheckCode")) Then
Response.Write("<script language=""JavaScript"">alert(""错误提示：验证码不正确！！"");history.go(-1);</script>")
response.end
end if

Dream_UserName=trim(request("P_UserName"))
Dream_PassWord=md5(trim(request("P_PassWord")))
Dream_FullName=trim(request("P_FullName"))
Dream_UPhone=trim(request("P_Phone"))
Dream_QQ=trim(request.form("P_QQ"))
Dream_Sex=trim(request.form("P_Sex"))
Dream_Tjr=trim(request.form("P_Tjr"))


Set rs = Server.CreateObject("ADODB.Recordset")
sql="select top 1 * from Dream_User where Dream_UserName='"&Dream_UserName&"'"
rs.open sql,conn,1,3
if rs.eof then
rs.addnew()
rs("Dream_UserName")=Dream_UserName
rs("Dream_PassWord")=Dream_PassWord
rs("Dream_FullName")=Dream_FullName
rs("Dream_Phone")=Dream_UPhone
rs("Dream_QQ")=Dream_QQ
rs("Dream_Sex")=Dream_Sex
rs("Dream_Tjr")=Dream_Tjr
rs("Dream_Rok")=true
rs("Dream_UpdateTime")=Now()
rs.update
else
Response.Write("<script language=""JavaScript"">alert(""错误提示：此用户名已注册！！"");history.go(-1);</script>")
response.end
end if
rs.close
Response.Write("<script language=""JavaScript"">alert(""提示：注册成功！！"");this.location.href='login.asp';</script>")
response.end
%>