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

📄 reg.asp

📁 网上购物系统:一个经过完善设计的经典网上购物系统
💻 ASP
📖 第 1 页 / 共 2 页
字号:
                            <td colspan="2" valign="middle" bgcolor="#f1f1f1"><span class="style7">&gt;&gt; 用户详细资料</span></td>
                          </tr>
                          <tr bgcolor="#FFFFFF">
                            <td width=30% align=right>您的真实姓名:</td>
                            <td class=pad><input class="wenbenkuang" name="userzhenshiname" type="text" id="userzhenshiname" size="10">
                                <font color=red>**</font> 以便发货确认 </td>
                          </tr>
                          <tr bgcolor="#FFFFFF">
                            <td width=30% align=right>您的身份证号:</td>
                            <td class=pad><input class="wenbenkuang" name="MoMNo" type="text" id="MoMNo" maxlength="18" onKeyPress="event.returnValue=IsDigit();">
                            </td>
                          </tr>
                          <tr bgcolor="#FFFFFF">
                            <td width=30% align=right>姓  别:</td>
                            <td class=pad><input type=radio name=babysex id=Select1 value=0 checked>
                                <input type=radio name=babysex id=Select1 value=1>
                                女 </td>
                          </tr>
                          <tr bgcolor="#FFFFFF">
                            <td width=30% align=right>用户性质:</td>
                            <td class=pad><input type=radio name=dadyname value="个人用户" checked>
                              个人用户
                                <input type=radio name=dadyname value="企业用户">
                                企业用户 </td>
                          </tr>
                          <tr bgcolor="#FFFFFF">
                            <td width=30% align=right>收货(通讯)地址:</td>
                            <td class=pad><input class="wenbenkuang" name="shouhuodizhi" type="text" id="shouhuodizhi" size="40" maxlength="30">
                                <font color=red>**</font> </td>
                          </tr>
                          <tr bgcolor="#FFFFFF">
                            <td width=30% align=right>邮  编:</td>
                            <td class=pad><input class="wenbenkuang" name="youbian" type="text" id="youbian" maxlength="6" size="10" onKeyPress="event.returnValue=IsDigit();">
                                <font color=red>**</font> </td>
                          </tr>
                          <tr bgcolor="#FFFFFF">
                            <td width=30% align=right>联系电话:</td>
                            <td class=pad><input class="wenbenkuang" name="usertel" maxlength="18" type="text" id="usertel">
                                <font color=red>**</font> </td>
                          </tr>
                          <%
'////////////送货方式
response.Write "<tr bgcolor=#FFFFFF><td width=30% align=right>送货方式:</td><td class=pad><select class=wenbenkuang name=songhuofangshi 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 bgcolor=#FFFFFF><td width=30% align=right>支付方式:</td><td class=pad><select class=wenbenkuang name=zhifufangshi 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 bgcolor="#FFFFFF">
                            <td width=20% align="right"></td>
                            <td class=pad><input class="go-wenbenkuang" onClick="return checkuserinfo();" type=submit name="submit" value=" 提交信息 ">
                                <input class="go-wenbenkuang" onclick="ClearReset()" type=reset name="Clear" value=" 重新填写 ">
                            </td>
                          </tr>
                        </table>
                    </form></td>
                </tr>
            </table></td>
          </tr>
        </table>
        <table width="760" align="center" border="0" cellspacing="0" cellpadding="0" class="table-zuoyou" bordercolor="#CCCCCC">
          <tr>
            <td bordercolor="#FFFFFF" bgcolor="#FFFFFF"><%case "save"%>
                <!--#include file="user/md5.asp"-->
                <%call saveuser()%>
                <%
end select%>
                <%sub tiaoyue()
set rs=server.CreateObject("adodb.recordset")
rs.Open "select regtiaoyue from shop_setup",conn,1,1
response.Write trim(rs("regtiaoyue"))
rs.Close
set rs=nothing
end sub

sub saveuser()
if session("regtimes")=1 then
response.Write "<table width=760 border=0 cellspacing=0 cellpadding=0 align=center><tr><td height=300 align=center><font color=red>对不起,您刚注册过用户,请稍后再进行注册!</font></td></tr></table>"
response.End
end if

set rs=server.CreateObject("adodb.recordset")
rs.open "select * from [Dv_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 [Dv_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("userzhenshiname")=trim(request("userzhenshiname"))
rs("shouhuodizhi")=trim(request("shouhuodizhi"))
rs("youbian")=trim(request("youbian"))
rs("usertel")=trim(request("usertel"))
rs("songhuofangshi")=trim(request("songhuofangshi"))
rs("zhifufangshi")=trim(request("zhifufangshi"))
rs("adddate")=now()
rs("lastlogin")=now()
rs("logins")=1

rs("reglx")=1
rs("jifen")=0
rs("jiaoyijine")=0
rs("sex")=1
rs("userlastip")=Request.ServerVariables("REMOTE_ADDR")
'rs("dadyname")=trim(request("dadyname"))
'rs("szShi")=trim(request("szShi"))
'rs("MoMname")=trim(request("MoMname"))
'rs("MoMNo")=trim(request("MoMNo"))
'rs("yuchan")=trim(request("yuchan"))
'rs("babysex")=trim(request("babysex"))

'论坛的
	rs("face")="userface/image1.gif"
	Rs("width")=request("width")
	Rs("height")=request("height")
	rs("bbstype")=request("bbstype")
	rs("userclass")="新手上路"
	rs("userWealth")=100
	rs("userEP")=50
	rs("usercP")=50
	rs("lockuser")=0
	Rs("showRe")=1
	rs("userinfo")="||||||||||||||||||||||||||||||||||||||||||"
	rs("usersetting")="1|||0"
	rs("titlepic")="level0.gif"
	rs("usergroupid")=4

rs.update
	conn.execute("update config set usernum=usernum+1,lastuser='"&username&"'")
rs.close
set rs=nothing
set rs=conn.execute("select top 1 userid,face from [Dv_User] order by userid desc")
userid=rs(0)
response.Cookies("shopxp")("username")=trim(request("username"))
response.Cookies("shopxp")("jiaoyijine")=0
response.Cookies("shopxp")("jifen")=0
response.Cookies("shopxp")("reglx")=1
response.Cookies("shangcheng").expires=date+1


	Response.Cookies("aspsky")("username") = trim(request("username"))
	Response.Cookies("aspsky")("password") = trim(request("userpassword"))
	Response.Cookies("aspsky")("userclass") = "新手上路"
	Response.Cookies("aspsky")("userid") = userid
	Response.Cookies("aspsky")("userhidden") = 2
	Response.Cookies("aspsky").path="/shop/bbs/"
 	Response.Cookies("aspsky")("usercookies") = 1
	Response.Cookies("aspsky").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_setup",conn,1,1
mailaddress=rs("mailaddress")
mailusername=rs("mailusername")
mailuserpass=rs("mailuserpass")
mailname=rs("mailname")
mailsend=rs("mailsend")
rs.close
set rs=nothing

'发送邮件
'if Forum_Setting(47)=1 then
	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 & "欢迎您注册" & webname & "网上商城,我们将提供给您最好的服务!<br>"
	mailbody=mailbody & "下面是您在" & webname & "网上商城的注册信息:<br><br>"
	mailbody=mailbody & "注册名:"&trim(request("username"))&"<br>"
	mailbody=mailbody & "密  码:"&getpass&"<br>"
	mailbody=mailbody & "<br><br>"
	mailbody=mailbody & "<center><font color=red>再次感谢您注册" & webname & "网上商城!</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="<p>· 您的注册信息已经发往您的邮箱,请注意查收!</p>"
	else
	sendmsg="<p>· 系统出错,注册信息资料未能发送到您的邮箱!</p>"
	end if
	'response.write mailbody
'end if

response.Write "<table width=760 align=center border=0 cellspacing=0 cellpadding=0 class=table-zuoyou bordercolor=#CCCCCC><tr><td bordercolor=#FFFFFF bgcolor=#FFFFFF align=center> "
response.Write "<table width=450 border=0 align=center cellpadding=0 cellspacing=0><tr><td height=260>"
response.Write "<p>· <font color=red>用户注册成功!</font></p><p>· 恭喜您注册成为 ["&webname&"] 的正式用户,请记好您的用户名及密码!</p>"
response.Write "<p>· <a href=index.asp>返回首页</a></p></td></tr></table></td></tr></table>"
end if
end sub

sub usererr()
response.write "<table width=760 align=center border=0 cellspacing=0 cellpadding=0 class=table-zuoyou bordercolor=#CCCCCC><tr><td bordercolor=#FFFFFF bgcolor=#FFFFFF align=center>"
response.write "<table width=450 border=0 align=center cellpadding=2 cellspacing=0><tr><td height=260>"
response.write "<p>· <font color=red>用户注册失败!</font></p><p>· 您输入的用户名或e-mail地址已存在,请返回重新输入!</p><p>· <a href=javascript:history.go(-1)>返回上一页</a></p> </td></tr></table></td></tr></table>"
end sub
%>
            </td>
          </tr>
        </table></TD>
        
      <td width="1" background="img/xiao/bgbg.gif"></td>
    </TR>
  </TBODY>
</TABLE>
<!--#include file="copyright.asp"-->
</body>
</html>

⌨️ 快捷键说明

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