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

📄 subuser.asp

📁 网上商场 帐户管理方面     1.实现了购物车和收藏夹的功能。     2.实现了历史订单查询以及即时订单跟踪。     3.实现了个人资料修改,查询以及送货人信息修改和查询。  
💻 ASP
📖 第 1 页 / 共 3 页
字号:
<!--#include file="userfunction.asp"-->
<%
'////////////////////////我的购物车
sub gouwu()
if request.cookies("bookshop")("username")="" then
response.Redirect "myuser.asp?action=login"
response.End
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select shop_action.actionid,shop_action.bookid,shop_books.bookname,shop_books.shichangjia,shop_books.huiyuanjia,shop_books.dazhe from shop_books inner join  shop_action on shop_books.bookid=shop_action.bookid where shop_action.username='"&request.cookies("bookshop")("username")&"' and shop_action.zhuangtai=7",conn,1,1 
'//html
response.write "<table width=96% border=0 align=center cellpadding=1 cellspacing=1 bgcolor=#FFFFFF>"
if action="gouwu" then '判断表单是否另开窗口,在用户界面中需要另开窗口
response.write "<form action='shopping.asp' target=ckxp onsubmit=""javascript:window.open('','ckxp','width=632,height=388,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');"">"
else
response.write "<form name='form1' method='post' action=shopping.asp>"
end if
response.write "<tr><td width=7% bgcolor=#5F95D3><div align=center><font color=#FFFFFF>选 择</font></div></td>"
response.Write "<td width=45% bgcolor=#5F95D3><div align=center><font color=#FFFFFF>商品名称</font></div></td>"
response.Write "<td width=14% bgcolor=#5F95D3><div align=center><font color=#FFFFFF>市场价</font></div></td>"
response.Write "<td width=13% bgcolor=#5F95D3><div align=center><font color=#FFFFFF>会员价</font></div></td>"
response.Write "<td width=12% bgcolor=#5F95D3><div align=center><font color=#FFFFFF>折 扣</font></div></td>"
response.Write "<td width=9% bgcolor=#5F95D3><div align=center><font color=#FFFFFF>删 除</font></div></td></tr>"
do while not rs.eof
response.write "<tr><td bgcolor=#EFF5FE><div align=center><input name=bookid type=checkbox checked value="&rs("bookid")&" ></div></td>"
response.write "<td bgcolor=#EFF5FE STYLE='PADDING-LEFT: 5px'><div align=left><a href=product.asp?id="&rs("bookid")&" target=_blank>"&rs("bookname")&"</a></div></td>"		  
response.write "<td bgcolor=#EFF5FE><div align=center>"&formatnumber(rs("shichangjia"),2)&"元</div></td>"	
response.write "<td bgcolor=#EFF5FE><div align=center><font color=#FF6600>"&formatnumber(rs("huiyuanjia"),2)&"元</font></div></td>"
response.write "<td bgcolor=#EFF5FE><div align=center>"&formatnumber(rs("dazhe")*100,2)&"%</div></td>"
response.write "<td bgcolor=#EFF5FE><div align=center>"
'//判断所在页面
if action<>"gouwu" then
response.Write "<a href=gouwu.asp?action=del&actionid="&rs("actionid")&">"
else
response.Write "<a href=gouwu.asp?action=del&actionid="&rs("actionid")&"&ll=22>"  '这里是在用户页面做删除动作,来区别删除后的返回位置!
end if
'/////
response.Write "<img src=images/trash.gif width=15 height=17 border=0></a></div></td></tr>"
rs.movenext
loop
rs.close
set rs=nothing
response.write "<tr><td height=36 colspan=6 bgcolor=#EFF5FE><div align=center><input style='background-color: #A5C1E0; background-repeat: repeat; background-attachment: scroll; color: #000000; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; height: 18px; line-height: normal; border: 1px solid #000000; background-position: 0% 50%' type=submit name=Submit value=去下订单 >&nbsp;&nbsp;&nbsp;&nbsp;"
if action<>"gouwu" then
response.write "<input style='background-color: #A5C1E0; background-repeat: repeat; background-attachment: scroll; color: #000000; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; height: 18px; line-height: normal; border: 1px solid #000000; background-position: 0% 50%' type=button name=Submit2 value=继续采购 onclick=javascript:window.close()>"
end if
response.write "</div></td></tr></form></table>"
end sub
%>
<%
'////////////////////////我的收藏架
sub shoucang()
if request.cookies("bookshop")("username")="" then
response.Redirect "myuser.asp?action=login"
response.End
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select shop_action.actionid,shop_action.bookid,shop_books.bookname,shop_books.shichangjia,shop_books.huiyuanjia,shop_books.dazhe from shop_books inner join  shop_action on shop_books.bookid=shop_action.bookid where shop_action.username='"&request.cookies("bookshop")("username")&"' and shop_action.zhuangtai=6",conn,1,1 
'//html
response.write "<table width=96% border=0 align=center cellpadding=1 cellspacing=1 bgcolor=#FFFFFF>"
if action="shoucang" then '判断表单是否另开窗口,在用户界面中需要另开窗口
response.write "<form method='post' action=gouwu.asp?action=change&type=1>"
'response.write "<form action='gouwu.asp?action=change' target=ckxp onsubmit=""javascript:window.open('','ckxp','width=632,height=388,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');"">"
else
response.write "<form name='form1' method='post' action=gouwu.asp?action=change>"
end if
response.write "<tr><td width=7% bgcolor=#5F95D3><div align=center><font color=#FFFFFF>选 择</font></div></td>"
response.Write "<td width=45% bgcolor=#5F95D3><div align=center><font color=#FFFFFF>商品名称</font></div></td>"
response.Write "<td width=14% bgcolor=#5F95D3><div align=center><font color=#FFFFFF>市场价</font></div></td>"
response.Write "<td width=13% bgcolor=#5F95D3><div align=center><font color=#FFFFFF>会员价</font></div></td>"
response.Write "<td width=12% bgcolor=#5F95D3><div align=center><font color=#FFFFFF>折 扣</font></div></td>"
response.Write "<td width=9% bgcolor=#5F95D3><div align=center><font color=#FFFFFF>删 除</font></div></td></tr>"
do while not rs.eof
response.write "<tr><td bgcolor=#EFF5FE><div align=center><input name=bookid type=checkbox checked value="&rs("bookid")&" ></div></td>"
response.write "<td bgcolor=#EFF5FE STYLE='PADDING-LEFT: 5px'><div align=left><a href=product.asp?id="&rs("bookid")&" target=_blank>"&rs("bookname")&"</a></div></td>"		  
response.write "<td bgcolor=#EFF5FE><div align=center>"&formatnumber(rs("shichangjia"),2)&"元</div></td>"	
response.write "<td bgcolor=#EFF5FE><div align=center><font color=#FF6600>"&formatnumber(rs("huiyuanjia"),2)&"元</font></div></td>"
response.write "<td bgcolor=#EFF5FE><div align=center>"&formatnumber(rs("dazhe")*100,2)&"%</div></td>"
response.write "<td bgcolor=#EFF5FE><div align=center>"
'//判断所在页面
if action<>"shoucang" then
response.Write "<a href=shoucang.asp?action=del&actionid="&rs("actionid")&">"
else
response.Write "<a href=shoucang.asp?action=del&actionid="&rs("actionid")&"&ll=22>"  '这里是在用户页面做删除动作,来区别删除后的返回位置!
end if
'/////
response.Write "<img src=images/trash.gif width=15 height=17 border=0></a></div></td></tr>"
rs.movenext
loop
rs.close
set rs=nothing
response.write "<tr><td height=36 colspan=6 bgcolor=#EFF5FE><div align=center><input  style='background-color: #A5C1E0; background-repeat: repeat; background-attachment: scroll; color: #000000; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; height: 18px; line-height: normal; border: 1px solid #000000; background-position: 0% 50%'type=submit name=Submit value=加入购物车 >&nbsp;&nbsp;&nbsp;&nbsp;"
if action<>"shoucang" then
response.write "<input  style='background-color: #A5C1E0; background-repeat: repeat; background-attachment: scroll; color: #000000; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; height: 18px; line-height: normal; border: 1px solid #000000; background-position: 0% 50%'type=button name=Submit2 value=继续采购 onclick=javascript:window.close()>"
end if
response.write "</div></td></tr></form></table>"
end sub
%>
<%'////////////////////////收货人资料
sub shouhuoxx()
dim rs2
if request.cookies("bookshop")("username")="" then
response.Redirect "myuser.asp?action=login"
response.End
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select shouname,shousex,shouname,shengshi,shouhuodizhi,youbian,usertel,songhuofangshi,zhifufangshi from [user] where username='"&request.cookies("bookshop")("username")&"' ",conn,1,1
response.Write "<table width=96% border=0 align=center cellpadding=1 cellspacing=1 bgcolor=#FFFFFF>"
response.Write "<form name=shouhuoxx method=post action=saveuserinfo.asp?action=shouhuoxx>"
response.Write "<tr bgcolor=#5F95D3><td height=15 colspan=2><div align=center><font color=#FFFFFF>请您仔细填写以下收货人的信息,以便所购买的商品能够及时投递。</font></div></td></tr>"
response.Write "<tr><td width=18% height=16 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'>收货人姓名:</td>"

response.Write "<td width=82% height=28 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'><input name=shouname type=text id=shouname size=12 value="&trim(rs("shouname"))&"> &nbsp;&nbsp;&nbsp;性 &nbsp;别:"

 if trim(rs("shousex"))=0 then
response.Write "<select name=shousex ID=Select1><option value=0 selected>男</option><option value=1>女</option></select></td></tr>"
else 
response.Write "<select name=shousex ID=Select1><option value=0 >男</option><option value=1 selected>女</option></select></td></tr>"
end if
response.write "<tr><td height=16 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'>收货人省/市</td><td height=28 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'><input name=shengshi type=text id=shengshi value="&trim(rs("shengshi"))&"></td></tr>"
response.Write "<tr><td height=16 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'>详细地址:</td><td height=28 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'><input name=shouhuodizhi type=text id=shouhuodizhi size=40 value="&trim(rs("shouhuodizhi"))&"></td></tr>"
response.Write "<tr><td height=16 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'>邮编:</td><td height=28 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'><input name=youbian type=text id=youbian value="&cstr(rs("youbian"))&" 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'))'></td></tr>"
response.Write "<tr><td height=17 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'>电话:</td><td height=28 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'><input name=usertel type=text id=usertel value="&trim(rs("usertel"))&"></td></tr>"
response.Write "<tr><td height=46 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'>送货方式:</td><td height=46 bgcolor=#EFF5FE 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")
if int(rs("songhuofangshi"))=int(rs2("songid")) then 
          response.Write " selected>"
          else
          response.Write ">"
          end if
          response.Write trim(rs2("subject"))&"</option>"
rs2.MoveNext
loop
rs2.Close
response.Write "</select></td></tr>"
response.Write "<tr><td height=58 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'>支付方式:</td><td height=58 bgcolor=#EFF5FE 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")
          if int(rs("zhifufangshi"))=int(rs2("songid")) then
          response.Write " selected>"
          else

⌨️ 快捷键说明

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