www.gusucode.com > 超文本多用户论坛程序 1.1 > bbs/reg_2.asp
<head> <meta http-equiv="Content-Language" content="zh-cn"> <link href=css.css rel=stylesheet type=text/css> <title>超文本论坛 免费申请论坛第三步</title> </head> <body topmargin=0 style="background-attachment: fixed"> <!--#include file="hs_.asp"--> <!--#include file="MD5.asp"--> <!--#include file="conn.asp"--> <% dim mhurl'设置网站域名 on error resume next mhurl=Request.ServerVariables("SERVER_NAME") call wbfz'防止外部提交 sub bdz'表单处理 response.write "<script language='javascript'>alert ('请不要输入特殊符号');history.go(-1);</script>" end sub cnuser=trim(request("cnuser")) xb=request("xb") zsxm=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"))) ltmc=ZHTSF(request("ltmc"))'处理 ltvip=cint(request("ltvip")) ltlx=request("ltlx") ltdb="<td bgcolor=white><img src=images/logo.gif> <font color=red>请登陆后修改此项!登陆管理可以换自己的论坛标志和放自己的广告!</font></td>" '需要定义 ltbq=ZHTSF(request("ltbq")) ltmb=cint(request("ltmb")) ltbh=cstr(year(date) & month(date) & day(date) & hour(now) & minute(now) & second(now)) '自动生成论坛编号 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 cndh=empty or cndz=empty or cnda=empty or ltmc=empty or ltbq=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 NOS(cndh)<>true then response.write "<script language=vbscript>window.alert ""请输入正确的电话号码""</script>" response.write "<script>history.go(-1)</script>" response.end end if if len(cndh)>15 or len(cndh)<7 then response.write "<script language=vbscript>window.alert ""电话号码输入错误!""</script>" response.write "<script>history.go(-1)</script>" response.end 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,ltbh)values('"&cnuser&"','"&xb&"','"&zsxm&"','"&cnpass&"','"&cntop&"','"&cnsr&"','"&cndh&"','"&cnemail&"','"&cndz&"','"&cnqq&"','"&cnqm&"','"&cnwt&"','"&cnda&"','"<bh&"')" conn.execute(sql) '--------------------end------------------------------ '--------------------论坛配置---------------------- sqlltpz="INSERT into zwltpz (ltmc,ltlx,ltmb,ltdb,ltbq,ltbh,ltvip) values ('"<mc&"','"<lx&"','"<mb&"','"<db&"','"<bq&"','"<bh&"','"<vip&"')" conn.execute(sqlltpz) '----------------------end-------------------------- dbclose %> <table cellpadding="0" cellspacing="0" width="50%" align=center> <tr> <td height="256" align="center"><a href="http://www.textbbs.com"><img src="images/logo.gif" border="0"></a><br> <p align="center"><b><font color="#FF0000">恭喜!免费论坛申请成功,感谢你对超文本免费论坛的支持!</font></b></p> <p align="center">以下是你的论坛地址(请记住或<a href="http://www.zdns.com.cn" target="_blank">申请其他域名转向</a>):<font color="#0000FF"><a href="<%="?ltbh="<bh%>">http://<%=mhurl & "/bbs?ltbh="<bh%></a></font></p> <p align="center">你的用户名:<font color="#0000FF"><%=cnuser%></font></p> <p align="center">密码:<font color="#0000FF"><%=cnpass1%></font><font color="#FF0000"> (*请妥善管理)</font></p> <p align="center"> <font color="#000080">请登陆自己的论坛在进行后台管理</font></td> </tr> </table> <script src="http://www.wa.sh.cn/count/c.asp?user_name=yiloo"></script> </body>