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

📄 buy.asp

📁 网络购物
💻 ASP
字号:
<%'=========================================''         凡人网络购物系统V4.0免费版'    FreeDown.Net info@freedown.net '            www.freedown.net'     版权所有·免费版仅供研究测试只用'            商业使用请购买正版''=========================================%>
<!--#include file="conn.asp"--><head>
<link href=css.css rel=STYLESHEET type=text/css>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%if session("user_name")<>"" then%>
<%=session("user_name")%>的购物车
<%else
response.write "购物车"
end if%>
</title>
</head> 
<body topmargin="0">
<font color="#000000"><b> 
<%
if session("user_name")="" then
        response.write  "<br>"
	response.write "<center>"
	response.write  "1.您尚未登录!请登录后再订购本站商品!"
        response.write "<br>"
	response.write  "<br>2.第一次来本站,请先<a href=reg.asp target=_blank>注册会员</a>!"
	response.write  "<br>"
	response.write  "<br><SCRIPT SRC=http://duduad2.kisswin.com/main/adview.php?user=14|159&border=0&db=dudukisswin&log=yes></SCRIPT>"
    response.end
end if

dim sql,rs
set rs=server.createobject("adodb.recordset")
if request("action")="buy" then

if request("count")="" then
    count=1
else
    count=request("count")
end if

if request("hw_id")="" then
    response.write "没有此货物!"
else
    hw_id=request("hw_id")
end if

sql="select * from basket where hw_id='"&hw_id&"' and user_name='"&session("user_name")&"' and basket_check=false"
rs.open sql,conn,3,3
if rs.eof then
rs.addnew
rs("hw_id")=hw_id
rs("user_name")=session("user_name")
rs("basket_count")=count
rs("basket_date")=now()
rs("hw_name")=request("hw_name")
rs("hw_cash")=request("hw_cash")
else
rs("basket_count")=int(rs("basket_count"))+int(count)
end if
rs.update
rs.close
%>
</b></FONT> 
<%end if%>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr> 
    <td align="center">
    <img border="0" src="img/promo_list_top.gif" width="100%" height="4"></td>
  </tr>
  <tr> 
    <td height="18" align="center" bgcolor="#DBC2B0">当前你已订购的商品</td>
  </tr>
  <tr> 
    <td valign="top"><table border="0" width="100%" cellspacing="0" height="34" cellpadding="0">
        <tr> 
          <td bgcolor="#F5EFE7"><div align="center">
              <center> 
            <table width="90%" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
              <tr background="img/pics/tile_bg.gif"> 
                <td width="155" height="25"> <div align="center">商品名称</div></td>
                <td width="80"> <div align="center">商品单价</div></td>
                <td width="80"> <div align="center">订购数量</div></td>
                <td width="80"> <div align="center">订购时间</div></td>
                <td width="80"> <div align="center">合计</div></td>
              </tr>
              <%sql="select * from basket where user_name='"&session("user_name")&"' and basket_check=false"
              rs.open sql,conn,3,3
              do while not rs.eof%>
              <tr> 
                <td width="155" height="25"> <div align="center"><a href="clear.asp?basket_id=<%=rs("basket_id")%>"><font color="#FF0000"><%=rs("hw_name")%></font></a></div></td>
                <td width="65" height="25"> <div align="center"> 
                    <%=rs("hw_cash")%> 元</div></td>
                <td width="65" height="25"> <div align="center"><%=rs("basket_count")%> 
                  </div></td>
                <td width="65" height="25"> <div align="center"><%=rs("basket_date")%> 
                  </div></td>
                <%a=0%>
                <td width="65" height="25"> <div align="center"> 
                    <%=rs("hw_cash")*rs("basket_count")%> 元 </div></td>
                <%totalcash=totalcash+(rs("hw_cash")*rs("basket_count"))%>
              </tr>
              <%rs.movenext
              loop
              rs.close
              %>
              <tr> 
                <td width="321" height="25" colspan="4"><div align="center">总计:</div></td>
                <td width="65" height="25"><div align="center"><%=totalcash%>
                  元</div></td>
            </table>
              </center>
          </div>
            <table width="100%" height="25" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td valign="middle"><div align="center"><img src="img/pics/seperator.gif" width="359" height="1"></div></td>
              </tr>
            </table></td>
          <td valign="top" bgcolor="#F5EFE7"><div align="right"></div></td>
        </tr>
      </table></td>
  </tr>
  <tr> 
    <td height="30" bgcolor="#F5EFE7"><table width="83%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td width="33%"><a href="buy.asp"><img src="img/pics/lookbcar.gif" width="100" height="20" border="0"></a></td>
          <td width="33%"><a href="clear.asp"><img src="img/pics/relbcar.gif" width="100" height="20" border="0"></a></td>
          <td width="33%"><a href="cash.asp"><img src="img/pics/gobuy.gif" width="100" height="20" border="0"></a></td>
        </tr>
      </table></td>
  </tr>
  <tr> 
    <td><SCRIPT SRC=http://duduad2.kisswin.com/main/adview.php?user=14|159&border=0&db=dudukisswin&log=yes></SCRIPT></td>
  </tr>
</table>

⌨️ 快捷键说明

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