<% Action=CheckStr(trim(Request("Action"))) Select Case Action Case "Save" Call UserSave() Case Else Call UserReg() End Select Function UserReg() %> 注册会员 <%=Web_Name%>
当前位置 > <%=Web_Name%> > 注册会员
邮箱: * 必填,用于登陆和找回密码用,一旦注册不可修改!
呢称: * 必填,类似QQ网名
密码: * 必填
确认密码: * 和上面一样
<% End Function Function UserSave() 'If Request.cookies("qqp3_User")="OK" Then 'Call Err_Js_D("您已经注册过了,请不要重复操作!","login.asp") 'response.End 'End If Dim UserName,UserId,UserPassWord,UserPassWordB,UserEmail UserName=CheckStr(Request("UserName")) UserId=CheckStr(Request("UserId")) UserPassWord=CheckStr(Request("UserPassWord")) UserPassWordB=CheckStr(Request("UserPassWordB")) UserEmail=CheckStr(Request("UserEmail")) If UserName ="" Then Call Err_Js_C("请输入呢称!") If UserPassWord ="" Then Err_Js_C("请输入密码!") If UserPassWord<>UserPassWordB Then Call Err_Js_C("两次密码不一致!") If len(UserPassWord)<6 then Call Err_Js_C("密码不能少于6位!") If instr(UserEmail,"@")<1 or instr(UserEmail,".")<1 then Call Err_Js_C("请正确填写邮箱!") 'countuser=conn.execute("select count(*) from [MusicUser] where UId='"&UserId&"'")(0) 'If countuser>0 Then Call Err_Js_C("不好意思用户名已经存在") countemail=conn.execute("select count(*) from [MusicUser] where UserEmail='"&UserEmail&"'")(0) If countemail>0 Then Call Err_Js_C("电子邮箱已经存在") Set Rs=qqp3_conn("Select top 1 * From MusicUser",3) Rs.AddNew Rs("UId")="" Rs("UserName")=UserName Rs("UserPassWord")=Md5(UserPassWord,0) Rs("UserEmail")=UserEmail Rs("UserQQ")="888888" Rs("UserPic")="pic/No.jpg" Rs("UserSex")="1" Rs("UserAge")="1" Rs("UserAddress")="中国-辽宁" Rs("UserHits")=0 Rs("PicOk")=0 UserIp1 = Request.ServerVariables("HTTP_X_FORWARDED_FOR") UserIp2 = Request.ServerVariables("REMOTE_ADDR") If UserIp1 = "" Then UserIp = UserIp2 Else UserIp = UserIp1 End If Rs("LoginTime")=Now() Rs("LoginIp")=UserIp Rs("LoginTimeB")=Now() Rs("LoginIpB")=UserIp Rs("sType")=0 Rs.Update Rs.Close Set Rs=Nothing Response.Cookies("qqp3_User")="OK" Response.Cookies("qqp3_User").Expires=date+1 Call Err_Js_D("注册成功,登陆后即可使用所有功能!","login.asp") End Function %>