📄 reg.asp
字号:
<tr bgcolor="#FFFFFF">
<td
width="25%" height="35" align="right">用户名:</td>
<script language=JavaScript>
//校验user的弹出窗口
function check_id_window(value){
window.open("check_id.asp?username="+value,"",'toolbar=no,directories=no,scrollbars=0,resizable=1,status=no,menubar=0,width=250,height=100');
}
</script>
<td height="35">
<input name="username" type="text" maxlength="20" id="username" class="wenbenkuang">
<input class=go-wenbenkuang onClick=check_id_window(document.userinfo.username.value) type=button value="检测帐号" name=Check_ID>
*</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="35" align="right">用户密码:</td>
<td height="35">
<input name="userpassword" type="password" maxlength="20" id="userpassword" class="wenbenkuang">
*(6 到 20 位)</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="35" align="right">确认密码:</td>
<td height="35">
<input name="userpassword1" type="password" maxlength="20" id="userpassword1" class="wenbenkuang">
*</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="35" align="right">E-mail:</td>
<td height="35">
<input name="useremail" type="text" maxlength="50" id="useremail" class="wenbenkuang">
*(请提供正确的地址)</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="35" colspan="2" ><div align="center">◇以下项目用于提示密码、帐号被盗用时验证用户合法性等。注册后不能修改!</div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="35" align="right">密码问题:</td>
<td height="35">
<input name="quesion" class="wenbenkuang" type="text" id="quesion">
* </td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="35" align="right">密码答案:</td>
<td height="35">
<input name="answer" class="wenbenkuang" id="answer">
*</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="35" colspan="2">
<div align="center">
<input onClick="return check();" name="Submit" type="submit" class="go-wenbenkuang" value="提交信息">
<input name="Submit2" type="reset" class="go-wenbenkuang" value="重置">
<input name="Submit3" type="button" class="go-wenbenkuang" value="返回" onClick="javascript:window.history.go(-1)">
(带<font color="#FF0000">*</font>为必填项)</div></td>
</tr>
<tr bgcolor="#ffffff">
<td colspan="2"> </td>
</tr>
</table></td>
</tr>
</table> <br>
</td>
</tr>
</table></td>
</tr>
</table></form>
<%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 trim(request("username"))="" then
response.write "<script LANGUAGE='javascript'>alert('请输入注册用户名!');history.go(-1);</script>"
response.End
elseif trim(request("userpassword"))="" then
response.write "<script LANGUAGE='javascript'>alert('请输入用户密码!');history.go(-1);</script>"
response.End
elseif trim(request("userpassword1"))="" then
response.write "<script LANGUAGE='javascript'>alert('请输入用户确认密码!');history.go(-1);</script>"
response.End
elseif trim(request("userpassword"))<>trim(request("userpassword1")) then
response.write "<script LANGUAGE='javascript'>alert('二次输入密码不一样!');history.go(-1);</script>"
response.End
elseif trim(request("useremail"))="" then
response.write "<script LANGUAGE='javascript'>alert('请填写邮箱!');history.go(-1);</script>"
response.End
elseif trim(request("quesion"))="" then
response.write "<script LANGUAGE='javascript'>alert('请填写密码问题!');history.go(-1);</script>"
response.End
elseif trim(request("answer"))="" then
response.write "<script LANGUAGE='javascript'>alert('请填写密码答案!');history.go(-1);</script>"
response.End
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from [shop_user] where useremail='"&nosql(trim(request("useremail")))&"' or username='"&nosql(trim(request("username")))&"'",conn,1,3
if rs.recordcount=0 then
rs.addnew
rs("username")=nosql(trim(request("username")))
rs("userpassword")=md5(trim(request("userpassword")))
rs("useremail")=nosql(trim(request("useremail")))
rs("quesion")=nosql(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("yucun")=0
rs("pic")="face/1.gif"
rs("manbid")=0
rs("zw")="普通会员"
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)
session("username")=trim(request("username"))
session("jiaoyijine")=0
session("jifen")=0
session("reglx")=1
response.Cookies("shangcheng").expires=date+1
session("regtimes")=1
session.Timeout=1
session("userpassword")=md5(trim(request("userpassword")))
session("manbid")=0
session("pic")="face/1.gif"
session("Cookies")=Cookies
conn.execute("update [info] set newuser='"&nosql(session("username"))&"',alluser=alluser+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 & "<head>"
'mailbody=mailbody & "<link href="../css.css" rel="stylesheet" type="text/css">"
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 & "欢迎您成为" & webname & "的会员,我们将提供给您最好的服务!<br>"
mailbody=mailbody & "下面是您的注册信息:<br><br>"
mailbody=mailbody & "注册名:"&trim(request("username"))&"<br>"
mailbody=mailbody & "密 码:"&getpass&"<br>"
mailbody=mailbody & "<br><br>"
mailbody=mailbody&""&webname&" ◎ 客户服务中心<br>"
mailbody=mailbody&"================================================== <br>电话:"&dianhua&"<br>"
mailbody=mailbody&"Email:"&webemail&"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -