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

📄 reg.asp

📁 BJXSHOP购物管理系统是一个功能完善、展示信息丰富的电子商店销售平台;针对企业与个人的网上销售系统;开放式远程商店管理;完善的订单管理、销售统计、结算系统;强力搜索引擎支持;提供网上多种在线支付方
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="connection.asp"-->
<!--#include file="admin/ubb.asp"-->
<!--#include file="webconfig.asp"-->
<!--#include file="char.asp"-->
<%dim action,sendmailZ
action=request.QueryString("action")%>
<html>
<head>
<title><%=webname%>--新用户注册</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<STYLE type=text/css>
.pad {
	PADDING-LEFT: 150px
}
</style>
<link href="images/default.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onMouseOver="window.status='【<%=webname%>】<%=weburl%> 如果您喜欢本站,别忘了把本站介绍给您的好友哦!:)';return true">
<!--#include file="webtop.asp"-->
<table width="10" height="7" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height=7></td>
  </tr>
</table>
<%select case action
case ""%><table width="776" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FF8E19">
  <tr> 
    <td height="78" valign="top" bgcolor="#FFFFFF"><br> <table width="90%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#FDE6A4">
        <tr> 
          <td height="18"><div align="center"><br><b><font size=2><%=webname%>注册条约</font></b></div></td>
        </tr>
        <tr> 
          <td> <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr> 
                <td> <%call tiaoyue()%> </td>
              </tr>
            </table><br></td>
        </tr>
      </table>
      
        <div align="center">
          <table width="50%" border="0" align="center" cellpadding="0" cellspacing="0">
            <form name="form1" method="post" action="reg.asp?action=yes"><tr>
              <td height="36"><br>
<div align="center"><font color="#FF6600">请选择用户类型:</font> 
                  <input name="grtt" type="radio" value="0" checked>
                  个人用户&nbsp;&nbsp;&nbsp; 
                  <input type="radio" name="grtt" value="1">
                  团体用户<br>
                  <br>
                  <input type="submit" name="Submit" value="我 同 意">
                  &nbsp;&nbsp; 
                  <input type="button" name="Submit2" value="我 不 同 意" onClick="location.href='index.asp'">
                  <br><br>

                </div></td>
            </tr></form>
          </table>
          
        </div>
    </td>
  </tr>
</table><%case "yes"
session("grtt")=""
session("grtt")=int(request("grtt"))%>
<table width="776" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FF8E19">
  <tr>
    <td height="230" bgcolor="#FFFFFF"><div align="center"><font color="#FF6600"><%if session("grtt")=1 then
response.write "请填写团体用户信息"
else
response.write "请填写个人用户信息"
end if%></font> 
      </div>
      <table width="90%" border="0" align="center" cellpadding="2" cellspacing="1" >
        <form name="userinfo" method="post" action="reg.asp?action=save" >
          <tr> 
            <td class=pad bgcolor="#FDE6A4"><font color="#FF6600"> 
              <%if session("grtt")=1 then
			response.write "公司邮箱:"
			else
			response.write "E-Mail&nbsp;&nbsp;:"
			end if%>
              </font> <input name="useremail" type="text" id="useremail"> <br>
            请填写您有效的邮件地址,以便于我们为您提供有效的服务。</td>
          </tr>
          <tr> 
            <td class=pad bgcolor="#FDE6A4"><font color="#FF6600">用 户 名:</font> 
              <input name="username" type="text" id="username" onkeyup="value=value.replace(/[\W]/g,'') "onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"> 
              <br>
            用于登陆时使用,用户名长度不能小于4且使用英文字母。</td>
          </tr>
          <%if session("grtt")=1 then%>
          <tr> 
            <td class=pad bgcolor="#FDE6A4"><font color="#FF6600">公司名称:</font> 
            <input name="companyname" type="text" id="companyname" ></td>
          </tr>
          <%end if%>
          <tr> 
            <td class=pad bgcolor="#FDE6A4"><font color="#FF6600"> 
              <%if session("grtt")=1 then
			response.write "联 系 人:"
			else
			response.write "真实姓名:"
			end if%>
              </font><font color="#cb6f00"> 
              <input name="userzhenshiname" type="text" id="userzhenshiname" >
              <br>
            </font> <%if session("grtt")=0 then
			  response.write "以便发货确认。"
			  else
			  response.write "以便我们与贵公司联系。"
			  end if%> </td>
          </tr>
          <tr>
            <td class=pad bgcolor="#FDE6A4"><font color="#FF6600">
              <%if session("grtt")=0 then
			response.write "住宅电话:"
			else
			response.write "办公电话:"
			end if%> 
              <input name="zhuzhaitel" type="text" id="zhuzhaitel">
              <br>
            </font>请按正确格式填写。例如:0317-2783033</td>
          </tr>
          <tr> 
            <td class=pad bgcolor="#FDE6A4"><font color="#FF6600">移动电话: 
              <input name="yidongtel" type="text" id="yidongtel" value="" onkeypress= "return regInput(this,/^[0-9]*$/,	String.fromCharCode(event.keyCode))" onpaste= "return regInput(this,/^[0-9]*$/, window.clipboardData.getData('Text'))" ondrop= "return regInput(this,/^[0-9]*$/,event.dataTransfer.getData('Text'))" maxlength=11 >
              <br>
            </font>此项可选,我们将为您保密。 </td>
          </tr>
          <tr> 
            <td class=pad bgcolor="#FDE6A4"><font color="#FF6600">密&nbsp;&nbsp;&nbsp;&nbsp;码:</font><font color="#cb6f00"> 
              <input name="userpassword" type="password" id="userpassword">
              <br>
              </font>长度必须大于6个字符小于50个字符,只能为英语字、数字,例如:ajok等。<font color="#cb6f00">&nbsp; 
            </font></td>
          </tr>
          <tr> 
            <td class=pad bgcolor="#FDE6A4"><font color="#FF6600">确认密码:</font><font color="#cb6f00"> 
              <input name="userpassword1" type="password" id="userpassword1">
              <br>
            </font>请将输入的密码再次输入,以免设置密码出错。<font color="#cb6f00">&nbsp; </font></td>
          </tr>
          <tr> 
            <td class=pad bgcolor="#FDE6A4"><FONT color=#FF6600>密码提问:</FONT><FONT color=#cb6f00> 
              <input name="quesion" type="text" id="quesion" value="">
            </FONT>(用于密码遗忘时使用)<FONT color=#cb6f00>&nbsp; </FONT></td>
          </tr>
          <tr> 
            <td class=pad bgcolor="#FDE6A4"><FONT color=#FF6600>密码答案:</FONT><FONT color=#cb6f00> 
              <input name="answer" type="text" id="answer">
            </FONT>(密码遗忘时将验证此答案) </td>
          </tr>
          <tr> 
            <td bgcolor="#FDE6A4" class=pad> <%if session("grtt")=1 then%> <input onClick="return checkcompany();" type="submit" name="Submit3" value="提  交" id=ddd> 
              <%else%> <input onClick="return checks();" type="submit" name="Submit3" value="提  交"  id=ddd> 
            <%end if%></td>
          </tr>
        </form>
      </table>
      <table width="10" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td height="7"></td>
        </tr>
      </table></td>
  </tr>
</table>

<%case "save"%>
<!--#include file="admin/md5.asp"-->
<%call saveuser()
end select%>
<!--#include file="service.asp"-->
<!--#include file="copyright.asp"-->
</body>
</html>
<%sub tiaoyue()
set rs=server.CreateObject("adodb.recordset")
rs.Open "select regtiaoyue from shop_config",conn,1,1
response.Write showdoc(trim(rs("regtiaoyue")))
rs.Close
set rs=nothing
end sub
sub saveuser()
if session("regtimes")=minute(now) then
response.Write "<div align=center><font color=red size=60>对不起,您刚注册过用户。<br>请稍后再进行注册!</font></div>"
response.End
end if

set rs=server.CreateObject("adodb.recordset")
rs.open "select username,useremail from [shop_users] where username='"&trim(request("username"))&"'",conn,1,1
if not rs.eof and not rs.bof then
call usererr()
rs.close
else
rs.close
rs.open "select * from [shop_users]",conn,1,3
rs.addnew
rs("username")=trim(request("username"))
rs("userpassword")=md5(trim(request("userpassword1")))
rs("useremail")=trim(request("useremail"))
rs("quesion")=trim(request("quesion"))
rs("answer")=md5(trim(request("answer")))
rs("userzhenshiname")=HTMLEncode(trim(request("userzhenshiname")))
rs("zhuzhaitel")=htmlencode(trim(request("zhuzhaitel")))
rs("yidongtel")=trim(request("yidongtel"))
rs("adddate")=now()
rs("lastlogin")=now()
rs("Usergwq")=0
rs("logins")=0
rs("youbian")=0
rs("zhifufangshi")=0
rs("songhuofangshi")=0
if session("grtt")=0 then rs("grtt")=0 else rs("grtt")=2 end if
rs("yufukuan")=0
if session("grtt")=1 then
rs("companyname")=htmlencode(trim(request("companyname")))
end if
rs.update
rs.close
set rs=nothing
call sendemail()
response.Cookies("bookshop")("username")=trim(request("username"))
if session("grtt")=0 then response.cookies("bookshop")("grtt")=0 else response.cookies("bookshop")("grtt")=2 end if
'response.Cookies("bookshop").expires=date+1
session("regtimes")=minute(now)
session.Timeout=1
response.Write "<table width=776 border=0 align=center cellpadding=0 cellspacing=1 bgcolor=#FF8E19><tr><td height=100 bgcolor=#FFFFFF>"
response.Write "<br><table width=90% border=0 align=center cellpadding=0 cellspacing=0><tr><td height=80 bgcolor=#FDE6A4 class=pad><br><font color=#FF6600>用户注册成功</font><br>"
response.Write "恭喜"&request.Cookies("bookshop")("username")&",您已注册成为《"&webname&"》正式用户。<br>"
if session("grtt")=1 then response.write "做为团体用户,您需要通过我们的审核后方可享受我们为您提供的团体购书价格!<br>" 
Response.Write  sendmailZ '邮件发送状态
response.Write "选择下一步操作:<br>"
if session("grtt")=1 then
response.Write "·<a href=myuser.asp?action=shouhuoxx>填写公司联系方式及收货信息</a><br>·<a href=index.asp>返回书店首页</a><br><br></td></tr></table><br></td></tr></table>"
else
response.Write "·<a href=myuser.asp?action=shouhuoxx>填写收货人详细资料</a><br>·<a href=index.asp>返回书店首页</a><br><br></td></tr></table><br></td></tr></table>"
end if

end if
end sub
sub usererr()
response.write "<table width=776 height=80 border=0 align=center cellpadding=0 cellspacing=1 bgcolor=#FF8E19><tr>"
response.write "<td bgcolor=#FFFFFF><br><table width=90% border=0 align=center cellpadding=2 cellspacing=0><tr><td class=pad bgcolor=#FDE6A4><br><font color=#FF6600>用户注册失败</font></td></tr><tr>"
response.write "<td class=pad bgcolor=#FDFADD ><font color=#FF0000>·您输入的用户名已存在,请返回重新输入!<br>·<a href=javascript:history.go(-1)><font color=red>点击返回上一页</font></a> </font><br><br></td></tr></table><br></td></tr></table>"
end sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -