<!--#include file="Inc.asp"-->
<!--#include file="../md5.asp"-->
<%call head()
'--------------------------------------------
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
dim sjhm
sjhm = request("a1")
dlmm= right(request("a1"),4)
'获取会员名称
dim Rs1,Sql1,mmdd,mmnini
set Rs1=Server.CreateObject("ADODB.Recordset")
sql1="select top 1 id from [Users] order by id desc"
Rs1.open sql1,conn,1,1
if not Rs1.eof then
mmdd=Rs1("id")+1
mmnini="会员("&dlmm&")"
else
mmnini="会员(1)"
end if
Rs1.close
set Rs1=nothing
'-------------------------------------
'开始处理短信
dim rs_mobile,sql_mobile
set rs_mobile=Server.CreateObject("ADODB.Recordset")
sql_mobile="select * from [Users] where [sjhm]='"&sjhm&"';"
rs_mobile.open sql_mobile,conn,1,2
if rs_mobile.eof then
rs_mobile.addnew
rs_mobile("sjhm")=sjhm
rs_mobile("mm")=dlmm
rs_mobile("sex")=3
rs_mobile("name")=mmnini
rs_mobile("myip")=zcip
rs_mobile("regtime")=now()
rs_mobile("listnum")=8
rs_mobile("viewnum")=500
rs_mobile("review")=3
rs_mobile("relistnum")=8
rs_mobile("sid")=md5(md5(sjhm+SID_RANDOMIZE,16),32)
conn.execute("insert into guest(fid,fnr,sid) values (0,'您的ID是"&mmdd&"密码是"&dlmm&"请牢记您的个人资料','"&mmdd&"')")

response.write"<card title=""""><p>"
response.write"注册成功！"&sjhm&"密码是"&dlmm&""
response.write""&siddd&"密"
response.write"</p></card></wml>"

else
rs_mobile("mm")=dlmm
conn.execute("insert into guest(fid,fnr,sid) values (0,'您已经通过短信将密码设置为"&dlmm&"请及时修改','"&mmdd&"')")

response.write"<card title=""""><p>"
response.write"密码设置成功"&sjhm&"密码:"&dlmm&"<br/>SID:"&sid&" "
response.write"</p></card></wml>"
end if
rs_mobile.update
rs_mobile.close
set rs_mobile=nothing
conn.close
set conn=nothing
%>