www.gusucode.com > 超文本多用户论坛程序 1.1 > bbs/reg2.asp
<!--#include file="conn.asp"--> <!--#include file="hs.asp"--> <!--#include file="MD5.asp"--> <% fg=request.cookies("fg") if fg=empty then fg=1 response.write "<html><head><meta http-equiv=Content-Type content=text/html;charset=gb2312></head><link href=imgs/skins/"& fg &"/bbs.css rel=stylesheet></script><script src=dyhbbs.js></script><script src=imgs/skins/"& fg &"/bbs.js></script>" %> <body topmargin="50%"> <% call wbfz'防止外部提交 sub bdz'表单处理 response.write "<script language='javascript'>alert ('请不要输入特殊符号');history.go(-1);</script>" end sub cnuser=trim(request("cnuser")) xb=request("xb") zsxm=trim(request("zsxm")) cnpass=trim(request("cnpass")) cnpass1=trim(request("cnpass1")) cntop="imgs/face/"& request("cntop") cnsr=request("birthday") cndh=trim(request("cndh")) cnemail=trim(request("cnemail")) cndz=request("cndz") cnqq=trim(request("cnqq")) cnqm=ZHTSF(request("cnqm"))'需要处理代码 cnwt=request("cnwt") cnda=md5(trim(request("cnda"))) CheckCode=replace(trim(Request("CheckCode")),"'","") if CheckCode<>CStr(session("CheckCode")) then response.write "<script language='javascript'>alert ('*验证码错误');history.go(-1);</script>" response.end end if '-------------------判断为空------------------- if cnuser=empty or zsxm=empty or cnpass=empty or cnpass1=empty or cnsr=empty or cnda=empty then response.write "<script language='javascript'>alert ('*号内容不能为空');history.go(-1);</script>" response.end end if '--------------------判断为空end------------------- if Fsql(cnuser)=true or Fsql(zsxm)=true or Fsql(cnpass)=true or Fsql(cndz)=true or Fsql(cnda)=true then response.write "<script language='javascript'>alert ('*你输入了特殊符号');history.go(-1);</script>" response.end end if if len(cnpass)<6 then response.write "<script language=vbscript>window.alert ""密码不能小于6位数!""</script>" response.write "<script>history.go(-1)</script>" response.end end if if cnpass<>cnpass1 then response.write "<script language=vbscript>window.alert ""两次密码不相同!""</script>" response.write "<script>history.go(-1)</script>" response.end end if if cnemail<>empty then if isemail(cnemail)<>true then response.write "<script language=vbscript>window.alert ""请输入正确邮件地址""</script>" response.write "<script>history.go(-1)</script>" response.end end if end if if cndh<>empty then if NOS(cndh)<>true then response.write "<script language=vbscript>window.alert ""请输入正确的电话号码""</script>" response.write "<script>history.go(-1)</script>" response.end end if end if if cndh<>empty then if len(cndh)<>11 then response.write "<script language=vbscript>window.alert ""你的电话是国外的吧?本站暂时不支持国外电话,请换成中国号码!""</script>" response.write "<script>history.go(-1)</script>" response.end end if end if if cnqq<>empty then if NOS(cnqq)<>true then response.write "<script language=vbscript>window.alert ""请输入正确QQ号码""</script>" response.write "<script>history.go(-1)</script>" response.end end if if len(cnqq)<5 then response.write "<script language=vbscript>window.alert ""你的QQ还不错,能卖给我我吗?""</script>" response.write "<script>history.go(-1)</script>" response.end end if end if %> <% sqluser="select cnuser from zwuser where cnuser='"&cnuser&"'" set rs=conn.execute(sqluser) if not rs.eof then response.write "<script language='javascript'>alert ('对不起用户名以存在!请更换一个把!');history.go(-1);</script>" response.end end if %> <% cnpass=md5(cnpass) '--------------------用户资料添加---------------------- sql="INSERT into zwuser(cnuser,xb,zsxm,cnpass,cntop,cnsr,cndh,cnemail,cndz,cnqq,cnqm,cnwt,cnda)values('"&cnuser&"','"&xb&"','"&zsxm&"','"&cnpass&"','"&cntop&"','"&cnsr&"','"&cndh&"','"&cnemail&"','"&cndz&"','"&cnqq&"','"&cnqm&"','"&cnwt&"','"&cnda&"')" conn.execute(sql) '--------------------end------------------------------ rs.close set rs=nothing dbclose %> <SCRIPT>valigntop()</SCRIPT> <table class="a2" cellSpacing="0" cellPadding="0" width="97%" align="center" border="0"> <tr> <td height="106"> <table cellSpacing="1" cellPadding="6" width="100%" border="0"> <tr> <td class="a1" align="middle" width="100%" height="20"><b>论坛提示信息</b></td> </tr> <tr bgColor="#ffffff"> <td vAlign="top" align="left" height="122"><b> </b> <table cellSpacing="0" cellPadding="5" width="100%" border="0"> <tr> <td width="83%"> <ul> <li>注册用户成功 </li> <li> <a href="index.asp?ltbh=<%=request(ltbh)%>"> 返回论坛首页登陆</a> </li> </ul> </td> <td width="17%"> <img height="97" src="imgs/succ.gif" width="95"></td> </tr> </table> </td> </tr> </table> </td> </tr> </table> <SCRIPT>valignbottom()</SCRIPT> </body>