📄 reg.asp
字号:
next
else
%>
new Option('','0'));
<%
end if
rs_s1.close
set rs_s1=nothing
rs_s.movenext
next
rs_s.close
set rs_s=nothing
%>
function chsel(){
with (document.shouhuoxx){
if(szSheng.value) {
szShi.options.length=0;
for(var i=0;i<selects[szSheng.value].length;i++){
szShi.add(selects[szSheng.value][i]);
}
}
}
}
</script>
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="1" bgcolor="#C9C9C8"><img src="images/block.gif" width="1" height="1"></td>
<td><table width="98%" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td height="1" bgcolor="cccccc"><img src="images/dot_03.gif" width="9" height="1" border="0"></td>
</tr>
<tr>
<td height="25" bgcolor="#efefef"><strong> <img src="images/dot_03.gif" width="9" height="9" border="0"> </strong><b>新用户注册</b></td>
</tr>
<tr>
<td height="1" bgcolor="cccccc"><img src="images/dot_03.gif" width="9" height="1" border="0"></td>
</tr>
</table>
<form action="reg.asp?action=save" method="post" name="shouhuoxx" id="shouhuoxx">
<table width="90%" border="0" align="center" cellpadding="1" cellspacing="1">
<tr>
<td colspan="2"><br>
<b>请您仔细填写以下详细资料信息,以便所购买的商品能够及时投递。</b><br></td>
</tr>
<tr>
<td width="18%"><div align="center">真实姓名:</div></td>
<td width="82%">
<input name="userzhenshiname" type="text" class="wenbenkuang" id="userzhenshiname2"></td>
</tr>
<tr>
<td><div align="center">所在省/市</div></td>
<td>
<select size="1" name="select" onChange=chsel() class="wenbenkuang">
<option value="xxx" selected>请选择省份……</option>
<%
set rs_s=server.createobject("adodb.recordset")
rs_s.open "select * From shop_szSheng order by shengorder",conn,1,1
while not rs_s.eof
%>
<option value="<%=rs_s("ShengNo")%>"><%=trim(rs_s("ShengName"))%></option>
<%
rs_s.movenext
wend
rs_s.close
set rs_s=nothing
%>
</select>
<select name="select" size="1" class="wenbenkuang" id="select">
<option value="xxx" selected>请选择城市……</option>
</select></td>
</tr>
<tr>
<td><div align="center">详细地址:</div></td>
<td>
<input name=shouhuodizhi type=text class="wenbenkuang" id=shouhuodizhi2 size=40 value="">
*</td>
</tr>
<tr>
<td><div align="left"> 邮编:</div></td>
<td>
<input name=youbian class="wenbenkuang" type=text id=youbian2 value="" maxlength="6" onKeyPress="event.returnValue=IsDigit();">
*</td>
</tr>
<tr>
<td><div align="center">联系电话:</div></td>
<td>
<input name=usertel class="wenbenkuang" type=text id=usertel2 value="">
*</td>
</tr>
<tr>
<td><div align="left"> 性别:</div></td>
<td>
<select name=select id=select class="wenbenkuang">
<option value=3 selected>请选择</option>
<option value=0>男</option>
<option value=1>女</option>
</select></td>
</tr>
<tr>
<td colspan="2"><div align="center">
<input name="Submit5" type="submit" class="go-wenbenkuang" value="提交信息" onClick="return checkshouhuoxx();">
<input name="Submit24" type="reset" class="go-wenbenkuang" value="重置">
<input name="Submit35" type="button" class="go-wenbenkuang" value="返回" onClick="javascript:window.history.go(-1)">
<input type="hidden" name="useremail3" value="<%=request("useremail")%>">
<!--<input type="hidden" name="userzhenshiname" value="<%=request("userzhenshiname")%>">-->
<input type="hidden" name="username3" value="<%=request("username")%>">
<input type="hidden" name="userpassword3" value="<%=request("userpassword")%>">
<input type="hidden" name="quesion3" value="<%=request("quesion")%>">
<input type="hidden" name="answer3" value="<%=request("answer")%>">
<input type="hidden" name="babyname2" value="<%=request("babyname")%>">
<input type="hidden" name="babybirth2" value="<%=request("babybirth")%>">
</div></td>
</tr>
</table>
</form></td>
<td width="1" bgcolor="#C9C9C8"><img src="images/block.gif" width="1" height="1"></td>
</tr>
</table>
<table width="748" border="0" cellspacing="0" cellpadding="0" align="center" background="images/bj_x.gif">
</table><%case "save"%>
<!--#include file="md5.asp"-->
<%call saveuser()%>
<%
end select%>
<%sub tiaoyue()
set rs=server.CreateObject("adodb.recordset")
rs.Open "select regtiaoyue from shop_config",conn,1,1
response.Write trim(rs("regtiaoyue"))
rs.Close
set rs=nothing
end sub
sub saveuser()
if session("regtimes")=1 then%>
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="1" bgcolor="#C9C9C8"><img src="../images/block.gif" width="8" height="8"></td>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="100"><div align="center"><img src="images/block.gif" width="1" height="1"> <strong>对不起,您刚注册过用户。请稍后再进行注册!</strong></div></td>
</tr>
</table></td>
<td width="1" bgcolor="C9C9C8"><img src="../images/block.gif" width="1" height="1"></td>
</tr>
</table><%response.End
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from [shop_user] where useremail='"&trim(request("useremail"))&"' or username='"&trim(request("username"))&"'",conn,1,1
if rs.recordcount>0 then
call usererr()
rs.close
else
rs.close
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from [shop_user]",conn,1,3
rs.addnew
rs("username")=trim(request("username"))
rs("userpassword")=md5(trim(request("userpassword")))
rs("useremail")=trim(request("useremail"))
rs("quesion")=trim(request("quesion"))
rs("answer")=md5(trim(request("answer")))
rs("adddate")=now()
rs("lastlogin")=now()
rs("logins")=1
rs("zhifufangshi")=0
rs("songhuofangshi")=0
rs("reglx")=1
rs("jifen")=0
rs("jiaoyijine")=0
Rs("sex")=1
rs("userlastip")=Request.ServerVariables("REMOTE_ADDR")
rs.update
rs.close
set rs=nothing
set rs=conn.execute("select top 1 userid from [shop_user] order by userid desc")
userid=rs(0)
response.Cookies("snsn")("username")=trim(request("username"))
response.Cookies("snsn")("jiaoyijine")=0
response.Cookies("snsn")("jifen")=0
response.Cookies("snsn")("reglx")=1
response.Cookies("shangcheng").expires=date+1
session("regtimes")=1
session.Timeout=1
set rs=server.CreateObject("adodb.recordset")
rs.Open "select mailaddress,mailusername,mailuserpass,mailname,mailsend from shop_config",conn,1,1
mailaddress=rs("mailaddress")
mailusername=rs("mailusername")
mailuserpass=rs("mailuserpass")
mailname=rs("mailname")
mailsend=rs("mailsend")
rs.close
set rs=nothing
on error resume next
'发送注册邮件
topic="您在" & webname & "的注册资料"
getpass=trim(request("userpassword"))
mailbody="<html>"
mailbody=mailbody & "<title>注册信息</title>"
mailbody=mailbody & "<body>"
mailbody=mailbody & "<TABLE border=0 width='95%' align=center><TBODY><TR>"
mailbody=mailbody & "<TD valign=middle align=top>"
mailbody=mailbody & trim(request("username"))&",您好:<br><br>"
mailbody=mailbody & "欢迎您注册本购物中心,我们将提供给您最好的服务!<br>"
mailbody=mailbody & "下面是您的注册信息:<br><br>"
mailbody=mailbody & "注册名:"&trim(request("username"))&"<br>"
mailbody=mailbody & "密 码:"&getpass&"<br>"
mailbody=mailbody & "<br><br>"
mailbody=mailbody & "<center><font color=red>再次感谢您注册本系统!</font>"
mailbody=mailbody & "</TD></TR></TBODY></TABLE><br><hr width=95% size=1>"
mailbody=mailbody & "</body>"
mailbody=mailbody & "</html>"
Set JMail=Server.CreateObject("JMail.Message")
JMail.Charset="gb2312"
JMail.ContentType = "text/html"
jmail.from = mailsend
jmail.silent = true
jmail.Logging = true
jmail.FromName = mailname
jmail.mailserverusername = mailusername
jmail.mailserverpassword = mailuserpass
jmail.AddRecipient trim(request("useremail"))
jmail.body=mailbody
JMail.Subject=topic
if not jmail.Send ( mailaddress ) then
SendMail=""
else
SendMail="OK"
end if
if SendMail="OK" then
sendmsg="<li>您的注册信息已经发往您的邮箱,请注意查收。</li>"
else
sendmsg="<li>由于系统错误,给您发送的注册资料未成功。</li>"
end if
%>
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="1" bgcolor="C9C9C8"><img src="../images/block.gif" width="1" height="1"></td>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="100"><img src="images/block.gif" width="1" height="1">
<table width=80% border=0 align=center cellpadding=0 cellspacing=0>
<tr>
<td height=80 class=pad><strong>用户注册成功<br>
</strong>
<li><strong>恭喜您已注册成为[<%=webname%>]正式用户,请记好您的用户名及密码</strong></li>
<strong><br>
<%=sendmsg%> </strong>
<li><strong><a href=index.asp>返回首页</a></strong></li></td>
</tr>
</table></td>
</tr>
</table></td>
<td width="1" bgcolor="C9C9C8"><img src="../images/block.gif" width="1" height="1"></td>
</tr>
</table><%
end if
end sub
sub usererr()
%>
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="1" bgcolor="C9C9C8"><img src="../images/block.gif" width="1" height="1"></td>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="100"><img src="images/block.gif" width="1" height="1">
<table width=80% border=0 align=center cellpadding=2 cellspacing=0>
<tr>
<td class=pad><strong>用户注册失败</strong></td>
</tr>
<tr>
<td class=pad >·您输入的用户名或Email地址已存在,请返回重新输入!<br>
·<a href=javascript:history.go(-1)>点击返回上一页</a> </td>
</tr>
</table></td>
</tr>
</table></td>
<td width="1" bgcolor="C9C9C8"><img src="../images/block.gif" width="1" height="1"></td>
</tr>
</table>
<%
end sub
%>
<!--#include file="copyright.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -