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

📄 basket.asp

📁 ASP+ACCESS 产品报价系统 开发环境简单 主要是周杰伦FANs的交互活动
💻 ASP
字号:
<!--#include file="conn.asp"--><head>
<link href=css.css rel=STYLESHEET type=text/css>
</head>
<body><font color="#000000"><b>
<%
if session("user_name")="" then
    response.write "1.你尚未登录!请登录后再订购本站手机!"
    response.write "<br>2.第一次来本站,请先注册会员(免费)!"
end if

if trim(request("hw_id"))="" then
    response.write "没有此货物"
    response.end
end if
dim rs,sql
sql="select * from hw where hw_id="&request("hw_id")
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,3
%><body topmargin="0">
<br> <form method="POST" action="buy.asp?action=buy&hw_id=<%=rs("hw_id")%>&hw_name=<%=rs("hw_name")%>&hw_cash=<%if session("user_type")="会员" then%>                 <%=rs("hw_cash")%>			                  <%else%>				               <%=rs("daili")%>			                  <%end if%> ">
<table width="400" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#999999">
  <tr> 
    <td height="24" align="center" bgcolor="#fff2d5"><strong><font color="#990000">所选购的商品信息</font></strong></td>
  </tr>
  <tr> 
    <td height="16">
        <table border="0" width="100%" cellspacing="0" height="34" cellpadding="0">
          <tr bgcolor="#FFFFFF"> 
            <td width="398" bgcolor="#FFFFFF"> <div align="center"> 
                <center>
                  <br>
                  <table width="90%" border="0" cellpadding="0" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#CCCCCC" style="border-collapse: collapse">
                    <tr bgcolor="#FFFFFF" background="img/pics/tile_bg.gif"> 
                      <td width="155" height="25"> 
                        <div align="center">商品名称</div></td>
                      <td width="60" height="25"> 
                        <div align="center">商品单价</div></td>
                      <td width="60" height="25"> 
                        <div align="center">订购数量</div></td>
                      <td width="80" height="25"> 
                        <div align="center">确认购买</div></td>
                    </tr>
                    <tr bgcolor="#FFFFFF"> 
                      <td width="155" height="30"> 
                        <div align="center"><%=rs("hw_name")%></div></td>
                      <td width="60" height="30"> 
                        <div align="center"> 
                          <%if session("user_type")="会员" then%>
                          <%=rs("hw_cash")%> 
                          <%else%>
                          <%=rs("daili")%> 
                          <%end if%>
                          元</div></td>
                      <td width="60" height="30"> 
                        <div align="center"> 
                          <select size="1" name="count">
                            <%for i = 1 to 10%>
                            <option><%=i%></option>
                            <%next%>
                          </select>
                        </div></td>
                      <td width="80" height="30"> 
                        <div align="center"> 
                          <input name=B1 type=image id="B1" 
      src="image/ok.gif" alt=投诉 
      align=absMiddle width="45" height="20" cache tppabs="">
                        </div></td>
                    </tr>
                  </table>
                  <div align="center">------------------------------------------------------------ 
                  </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>
                  <br>
                </center>
              </div></tr>
        </table>
      </td>
  </tr>
  <%rs.close
%>
  <tr> 
    <td height="24" align="center" bgcolor="#fff2d5"><font color="#990000"><strong>你已选购的商品如下</strong></font></td>
  </tr>
  <tr> 
    <td height="16"> <table border="0" width="100%" cellspacing="0" height="34" cellpadding="0">
        <tr> 
          <td width="398" bgcolor="#FFFFFF"><br> <div align="center"> 
              <center>
                  <table width="90%" border="0" 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="60" height="20"> 
                        <div align="center">商品单价</div></td>
                      <td width="60" height="20"> 
                        <div align="center">订购数量</div></td>
                      <td width="80" height="20"> 
                        <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
        if rs.eof then
        %>
                    <tr bgcolor="#FFFFFF"> 
                      <td width="100%" height="25" colspan="4">  你没有选择任何商品</td>
                  </tr>
                  <%else
        do while not rs.eof%>
                    <tr bgcolor="#FFFFFF"> 
                      <td width="155" height="25"> 
                        <div align="center"><%=rs("hw_name")%> </div></td>
                      <td width="60" height="25"> 
                        <div align="center"><%=rs("hw_cash")%> 元</div></td>
                      <td width="60" height="25"> 
                        <div align="center"><%=rs("basket_count")%> </div></td>
                    <%a=0%>
                      <td width="80" height="25"> 
                        <div align="center"><%=rs("basket_count")*rs("hw_cash")%> 元</div></td>
                  </tr>
                  <%totalcash=totalcash+(rs("basket_count")*rs("hw_cash"))%>
                  <%rs.movenext
        loop
        end if
        rs.close
        set rs=nothing
        conn.close
        set conn=nothing
        %>
                    <tr bgcolor="#FFFFFF"> 
                      <td width="80%" height="25" colspan="3"> 
                        <div align="center">总计</div></td>
                      <td width="80" height="25"> 
                        <div align="center"><font color=red><%=totalcash%></font> 元</div></td>
                  </tr>
                </table>
                  <br>
                </center>
            </div></td>
        </tr>
      </table></td>
  </tr>
</table>
</form>

⌨️ 快捷键说明

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