⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 reg.asp

📁 这是惠州城市超市购物管理系统的源代码
💻 ASP
📖 第 1 页 / 共 2 页
字号:
	}
</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="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="100"><img src="images/block.gif" width="1" height="1"><br> <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>&nbsp;&nbsp;<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>
            <table width=89% border=0 align=center cellpadding=1 cellspacing=1>
              <form name=shouhuoxx method=post action=reg.asp?action=save>
                <tr> 
                  <td height=15 colspan=2> <p><br>
                      <br>
                      <b>请您仔细填写以下详细资料信息,以便所购买的商品能够及时投递。</b><br>
                      <br>
                    </p></td>
                </tr>
                <tr> 
                  <td width=18% height=16 style='PADDING-LEFT: 20px'>真实姓名:</td>
                  <td width=82% height=28 style='PADDING-LEFT: 20px'> 真实姓名: 
                    <input name="userzhenshiname" type="text" class="wenbenkuang" id="userzhenshiname2">
                    以便发货确认。 </td>
                </tr>
                <tr> 
                  <td height=16 style='PADDING-LEFT: 20px'>所在省/市</td>
                  <td height=28 style='PADDING-LEFT: 20px'> <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 size="1" name="select" class="wenbenkuang">
                      <option value="xxx" selected>请选择城市……</option>
                    </select> </td>
                </tr>
                <tr> 
                  <td height=16 style='PADDING-LEFT: 20px'>详细地址:</td>
                  <td height=28 style='PADDING-LEFT: 20px'> <input name=shouhuodizhi type=text class="wenbenkuang" id=shouhuodizhi2 size=40 value="">
                    *</td>
                </tr>
                <tr> 
                  <td height=16 style='PADDING-LEFT: 20px'>邮编:</td>
                  <td height=28 style='PADDING-LEFT: 20px'> <input name=youbian  class="wenbenkuang" type=text id=youbian2 value="" maxlength="6" onKeyPress="event.returnValue=IsDigit();">
                    *</td>
                </tr>
                <tr> 
                  <td height=17 style='PADDING-LEFT: 20px'>联系电话:</td>
                  <td height=28 style='PADDING-LEFT: 20px'> <input name=usertel class="wenbenkuang" type=text id=usertel2 value="">
                    *</td>
                </tr>
                <tr> 
                  <td width=18% height=16 style='PADDING-LEFT: 20px'>性别:</td>
                  <td width=82% height=28 style='PADDING-LEFT: 20px'> <select name=select id=select2 class="wenbenkuang">
                      <option value=3 selected>请选择</option>
                      <option value=0>男</option>
                      <option value=1>女</option>
                    </select> </td>
                </tr>
                <%'////////////送货方式
response.Write "<tr><td height=46 bgcolor=#ffffff STYLE='PADDING-LEFT: 20px'>送货方式:</td><td height=46 bgcolor=#ffffff STYLE='PADDING-LEFT: 20px'><select name=songhuofangshi size=3 id=songhuofangshi>"
set rs2=server.CreateObject("adodb.recordset")
rs2.open "select * from shop_songhuo where fangshi=0 order by songidorder",conn,1,1
do while not rs2.EOF
response.Write "<option value="&rs2("songid")&">"&trim(rs2("subject"))&"</option>"
rs2.MoveNext
loop
rs2.Close
response.Write "</select><font color=red>*</font></td></tr>"
response.Write "<tr><td height=58 bgcolor=#ffffff STYLE='PADDING-LEFT: 20px'>支付方式:</td><td height=58 bgcolor=#ffffff STYLE='PADDING-LEFT: 20px'><select name=zhifufangshi size=3 id=zhifufangshi>"
'////////////支付方式
rs2.Open "select * from shop_songhuo where fangshi=1 order by songidorder",conn,1,1
do while not rs2.EOF
response.Write "<option value="&rs2("songid")&">"&trim(rs2("subject"))&"</option>"
rs2.MoveNext
loop
rs2.Close
set rs2=nothing
response.Write "</select><font color=red>*</font></td></tr>"
%>
                <tr> 
                  <td height=48 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>
              </form>
            </table></td>
        </tr>
      </table></td>
    <td width="1" bgcolor="C9C9C8"><img src="../images/block.gif" width="1" height="1"></td>
  </tr>
</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="1" height="1"></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 + -