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

📄 buy.asp

📁 ASP+ACCESS 产品报价系统 开发环境简单 主要是周杰伦FANs的交互活动
💻 ASP
字号:
<!--#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>杰拍网-购物车</title></head> 
<body topmargin="0">
<font color="#000000"><b> 
<%
if session("user_name")="" then
	response.write  "<br>"
    response.write  "1.你尚未登录!请登录后再订购本站商品!"
    response.write "<br>2.第一次来本站,请先注册会员(免费)!"
	response.write  "<br>"
	response.write  "<br>"
    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 
                  width=400 height="177" border=0 align="center" cellPadding=5 cellSpacing=1 bgColor=#999999>
  <TBODY>
    <TR> 
      <TD align=middle bgColor=#fff2d5><div align="center"><font color="#990000"><strong>当前你已订购的商品</strong></font></div></TD>
    </TR>
    <TR> 
      <TD align=middle 
                bgColor=#ffffff><table width="90%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC" style="border-collapse: collapse">
          <tr bgcolor="#FFFFFF"> 
            <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 bgcolor="#FFFFFF"> 
            <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 bgcolor="#FFFFFF"> 
            <td width="321" height="25" colspan="4"> 
              <div align="center">总计:</div></td>
            <td width="65" height="25"> 
              <div align="center"><%=totalcash%> 元</div></td>
        </table> 
        <div align="center"><br>
          -----------------------------------------------------------<br>
        </div>
        <table width="83%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr> 
            <td width="33%"><a href="buy.asp"><img src="image/lookbcar.gif" width="100" height="20" border="0"></a></td>
            <td width="33%"><a href="clear.asp"><img src="image/relbcar.gif" width="100" height="20" border="0"></a></td>
            <td width="33%"><a href="cash.asp"><img src="image/gobuy.gif" width="100" height="20" border="0"></a></td>
          </tr>
        </table></TD>
    </TR>
  </TBODY>
</TABLE>

⌨️ 快捷键说明

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