<%
if regset="1" or regset="4" then
Call Error("手工注册已关闭!")
end if
dim sjhm,username,pass,sex,zcip,email,TP
sjhm=usb(request("sjhm"))
username=forbbs(request("username"))
pass=usb(request("pass"))
email=usb(request("email"))
sex=usb(request("sex"))
TP=usb(request("TP"))
zcip=Request.ServerVariables("REMOTE_ADDR")
if TP<>"" then
if sjhm="" or pass="" or username="" then
Call Error("请填写完整!")
end if
if len(username) > 10 then
Call Error("会员昵称不能超过10个字!")
end if
if Instr(username,"爷") or Instr(username,"奶") or Instr(username,"爸") or Instr(username,"妈") or Instr(username,"爹") then
Call Error("系统限制昵称“"&username&"”,请重新输入!")
end if
'过滤昵称
dim h
for h = 1 to len(username)
if Instr(chinahanzi,mid(username,h,1))=0 then
Call Error("会员昵称只能是汉字、字母、数字组成!")
end if
next
if ifbadchr("abcdefghijklmnopqrstuvwxyz0123456789",pass) > 0 or len(pass) < 4 or len(pass) > 15 then
Call Error("密码必须是4至15位的英文小写字母或数字的组合!")
end if
if Isnumeric(sjhm)=false then
Call Error("请输入正确的手机号!")
end if
if len(sjhm)<>11 then
Call Error("请输入正确的手机号!")
end if
if left(sjhm,2)<>13 and left(sjhm,2)<>15 then
Call Error("请输入正确的手机号!")
end if
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select name from [Users] where [name]='"&username&"'",conn,1,1
if not rs.eof then
rs.close
set rs=nothing
Call Error("该昵称已经被使用!")
end if
rs.close
set rs=nothing
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select sjhm from [Users] where [sjhm]='"&sjhm&"'",conn,1,1
if not rs.eof then
rs.close
set rs=nothing
Call Error("该该手机号已经被使用!")
end if
rs.close
set rs=nothing
dim siddd
Function SID_RANDOMIZE()
Dim c,id
randomize
c="a,A,1,b,B,2,c,C,3,d,D,4,e,E,5,f,F,6,g,G,7,h,H,8,i,I,9,j,J,0,k,K,1,l,L,2,m,M,3,n,N,4,o,O,5,p,P,6,q,Q,7,r,R,8,s,S,9,t,T,0,u,v,w,x,y,z,"
id=split(c,",")
for i=1 to 10
SID_RANDOMIZE=int(rnd()*36)&SID_RANDOMIZE
Next
SID_RANDOMIZE=SID_RANDOMIZE&minute(now)&second(now)&day(now)&month(now)
End Function
siddd=md5(md5(sjhm+SID_RANDOMIZE,16),32)
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from [Users]",conn,1,2
rs.addnew
rs("sjhm")=sjhm
rs("mm")=pass
rs("sex")=sex
rs("name")=username
rs("myip")=zcip
if email<>"" then rs("email")=email
rs("regtime")=now()
rs("listnum")=8
rs("viewnum")=500
rs("review")=3
rs("relistnum")=8
rs.update
rs.close
set rs=nothing
dim clicksendid
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select top 1 id from [Users] order by id desc",conn,1,1
sid=rs("id")&"_"&siddd
clicksendid=rs("id")
conn.Execute("update Users set sid='"&sid&"' Where id="&rs("id"))
response.write"注册成功,您的ID:"&rs("id")
response.write"用户密码为"&pass
rs.close
set rs=nothing
dim msgx
msgx = "恭喜!会员注册成功!"
msgx = msgx & "\\会员ID:" & clicksendid
msgx = msgx & "\\密码:" & pass & ""
msgx = msgx & "\\为了您的帐号安全,请您及时修改密码"
msgx = msgx & "\\(url=clickid.asp?Action=ok&sid=[sid])我要填写我的推荐人(/url)"
msgx = msgx & "\\(url=clickid.asp?Action=no&sid=[sid])我没有推荐人,不填写(/url)"
msgx = msgx & "\\ 温馨提示:推荐成功后.您的推荐人会得到"&clickjb&getcent&"的奖励,同时您也会得到"®jb&getcent&",不推荐也有"®jb&getcent&"奖励哦!"
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from guest",conn,1,2
rs.addnew
rs("fnr")=msgx
rs("sid")=clicksendid
rs("fid")=0
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write"
我的空间"
response.write"
[社区首页]"
response.write"
[网站首页]"
response.write"