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

📄 basket.asp

📁 三鸟个人网站源码。
💻 ASP
字号:
<!--#include file="conn.asp"-->
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<LINK href="style.css" rel=stylesheet>
<title><%if session("d_webname")<>"" then%>
<%=session("d_webname")%>的购物篮
<%else
response.write "购物篮"
end if%></title>
</head>
<%
if session("d_webname")="" then
    response.write "你尚未登录或不是本站会员!"
    response.write "<br>请登录后再订购本站货物!"
    response.end
end if

if trim(request("sort_id"))="" then
    response.write "没有此货物"
    response.end
end if
sql="select * from sort where sort_id="&request("sort_id")
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,3
%>
<body>

<div align="center">
  <center>
  <table border="0" cellpadding="0" cellspacing="0" width="500" height="5">
    <tr>
      <td background="pic/line_gb.gif" height="1"></td>
    </tr>
    <tr>
      <td height="19" bgcolor="#EEEEEE">
        <p align="center">&nbsp;欢迎<%=session("d_webname")%>,以下是您新添加的产品。祝您购买顺利。</p>
      </td>
    </tr>
    <tr>
      <td height="1" background="pic/line_gb.gif"></td>
    </tr>
  </table>
  </center>
</div>

<div align="center">
  <center>
  <table border="0" cellpadding="0" cellspacing="0" width="500">
    <tr>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>
      <form method="post" action="buy.asp?action=buy&sort_id=<%=rs("sort_id")%>&sort_name=<%=rs("sort_name")%>&price=<%=rs("price")%>">
        <div align="center">
          <table border="0" cellpadding="0" cellspacing="1" width="100%">
            <tr>
              <td width="20%" bgcolor="#EEEEEE" style="border-left: 1 solid #000000" align="center">商品编号</td>
              <td width="20%" bgcolor="#EEEEEE" align="center">商品名字</td>
              <td width="20%" bgcolor="#EEEEEE" align="center">商品价格</td>
              <td width="20%" bgcolor="#EEEEEE" align="center">商品数量</td>
              <td width="20%" bgcolor="#EEEEEE" style="border-right: 1 solid #000000" align="center">确定购买</td>
            </tr>
            <tr>
              <td width="20%" bgcolor="#EEEEEE" style="border-left: 1 solid #000000" height="19" align="center"><%=rs("sort_id")%></td>
              <td width="20%" bgcolor="#EEEEEE" height="19" align="center"><%=rs("sort_name")%></td>
              <td width="20%" bgcolor="#EEEEEE" height="19" align="center"><%=rs("price")%>/元</td>
              <td width="20%" bgcolor="#EEEEEE" height="19">
                <p align="center"><select size="1" name="basket_count">
                  <option>1</option>
                  <option>2</option>
                  <option>3</option>
                  <option>4</option>
                  <option>5</option>
                  <option>6</option>
                  <option>7</option>
                  <option>8</option>
                  <option>9</option>
                  <option>10</option>
                  <option>11</option>
                  <option>12</option>
                  <option>13</option>
                  <option>14</option>
                  <option>15</option>
                </select></td> 
              <td width="20%" bgcolor="#EEEEEE" style="border-right: 1 solid #000000" height="19">
                <p align="center"><input type="submit" value="购买" name="B1"></p>
              </td>
            </tr>
          </table>
        </div>
      </form></td>
    </tr>
  </table>
  <%rs.close
%>
  </center>
</div>

<div align="center">
  <center>
  <table border="0" cellpadding="0" cellspacing="0" width="500">
    <tr>
      <td>&nbsp;</td>
    </tr>
  </table>
  </center>
</div>
<div align="center">
  <center>
  <table border="0" cellpadding="0" cellspacing="0" width="500" height="1">
    <tr>
      <td background="pic/line_gb.gif" height="1"></td>
    </tr>
    <tr>
      <td height="19" bgcolor="#EEEEEE">
        <p align="center">尊敬的<%=session("d_webname")%>,以下是您已购买的产品。购买完成可去收银台。</td>
    </tr>
    <tr>
      <td height="1" background="pic/line_gb.gif"></td>
    </tr>
  </table>
  </center>
</div>

<div align="center">
  <center>
  <table border="0" cellpadding="0" cellspacing="0" width="500">
    <tr>
      <td>&nbsp;</td>
    </tr>
  </table>
  </center>
</div>
<div align="center">
  <center>
  <table border="0" cellpadding="0" cellspacing="1" width="500">
    <tr>
      <td bgcolor="#EEEEEE" width="99" align="center">商品编号</td>
      <td bgcolor="#EEEEEE" width="99" align="center">商品名字</td>
      <td bgcolor="#EEEEEE" width="100" align="center">商品价格</td>
      <td bgcolor="#EEEEEE" width="100" align="center">商品数量</td>
      <td bgcolor="#EEEEEE" width="100" align="center">合计</td>
    </tr>
    <%sql="select * from basket where d_webname='"&session("d_webname")&"' and basket_check=false"
        rs.open sql,conn,3,3
        if rs.eof then
        %>
    <tr>
      <td bgcolor="#EEEEEE" colspan="5" width="494">
        <p align="center">您未选择任何商品!!!</td>
    </tr>
    <%else
        do while not rs.eof%>
    <tr>
      <td bgcolor="#EEEEEE" width="99" align="center"><%=rs("sort_id")%></td>
      <td bgcolor="#EEEEEE" width="99" align="center"><a href="del.asp?basket_id=<%=rs("basket_id")%>&action=del" title='点击删除'><%=rs("sort_name")%></a></td>
      <td bgcolor="#EEEEEE" width="100" align="center"><%=rs("price")%>/元</td>
      <td bgcolor="#EEEEEE" width="100" align="center"><%=rs("basket_count")%></td>
      <td bgcolor="#EEEEEE" width="100" align="center"><%=rs("basket_count")*rs("price")%>元</td>
    </tr><%totalcash=totalcash+(rs("basket_count")*rs("price"))%>
    <%rs.movenext
        loop
        end if
        rs.close
        set rs=nothing
        conn.close
        set conn=nothing
        %>
    <tr>
      <td bgcolor="#EEEEEE" colspan="4" width="396">&nbsp;总计:<font color="#FF0000"><%=totalcash%></font>元</td>
      <td bgcolor="#EEEEEE" width="98">
        <p align="center"><font color="#FF0000"><%=totalcash%></font>元</td>
    </tr>
  </table>
  </center>
</div>

<div align="center">
  <center>
  <table border="0" cellpadding="0" cellspacing="1" width="500">
    <tr>
      <td>&nbsp;</td>
    </tr>
  </table>
  </center>
</div>
<div align="center">
  <center>
  <table border="0" cellpadding="0" cellspacing="1" width="500" height="1">
    <tr>
      <td background="pic/line_gb.gif" height="1" colspan="2" width="494"></td>
    </tr>
    <tr>
      <td height="19" bgcolor="#EEEEEE" align="center" width="249"><a href="buy.asp">满意去收银台</a></td>
      <td height="19" bgcolor="#EEEEEE" align="center" width="249">点击“商品名字”可删除</td>
    </tr>
    <tr>
      <td background="pic/line_gb.gif" height="1" colspan="2" width="494"></td>
    </tr>
  </table>
  </center>
</div>

</body>

</html>

⌨️ 快捷键说明

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