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

📄 buycar_see.asp

📁 《网上图书管理系统》 开发及测试环境 操作系统:Windows 2000 Server 后台数据库:Access 2000 Web服务器:IIS 5.0  系统在该环境下测试通过运行。
💻 ASP
字号:
<!-- #include file="connections/conn.asp" -->
<% if request.Form("jiezhang")="到收银台结账" then
response.Redirect("checkout.asp")
end if 
If Len(session("BookIDList")) <> 0 Then 
sql = "Select * From DB_bookinfo Where BookID In (" &_
 session("bookIDList") & ") Order By BookID"
Set rs = conn.Execute( sql )
else
Response.Redirect "buycar_empty.asp"
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>查看购物车</title>
<link href="style.css" rel="stylesheet">
<script language="JavaScript">
function stand()
{
window.location.href="./stand.asp";}
</script>
<style type="text/css">
<!--
.style3 {color: #ECF5FF}
-->
</style>
</head>

<body leftmargin="0" topmargin="0">
<table width="640" height="133" border="0" cellpadding="-1" cellspacing="-1">
  <tr>
    <td background="images/buycar_top.jpg">&nbsp;</td>
  </tr>
</table>
<table width="640" height="306" border="0" cellpadding="-1" cellspacing="-1">
  <tr>
    <td valign="top" background="images/buycar_bottom.jpg"> 
      <div align="center">
	   <form name="form1" method="post" action="buycar_see.asp">
          <table width="97%" height="52" border="1" align="center" cellpadding="0"
		   cellspacing="0" bordercolordark="#0099FF" bordercolorlight="#FFFFFF"
		    bordercolor="#FFFFFF">
            <tr> 
              <td width="14%" height="16"><div align="center">书号</div></td>
              <td width="41%"><div align="center">书名</div></td>
              <td width="15%"><div align="center">单价</div></td>
              <td width="9%"><div align="center">数量</div></td>
              <td width="14%"><div align="center">金额</div></td>
              <td width="7%"><div align="center">移去</div></td>
            </tr>
		<% i=0 
		sum=0
		session("sl")=""
		session("checkBook")=""
		%>
        <% while not rs.eof%>
            <tr> 
              <td height="16">&nbsp;<%=rs("BookID")%></td>
              <td>&nbsp;<%=rs("BookName")%></td>
			  <% i=i+1 %>
			  <% sl = CInt(Request( "sl"&i))
				If sl <= 0 Then sl = 1
					Sum = Sum + CDbl(rs("Price")) * sl %>
              <td><div align="right"> 
                  <input name=<%= "price"&i%> type="text" class="Sytle_auto"
				   id="price" value=<%=rs("price")%>
				   size="6" readonly="yes">
                  (元)</div></td>
              <td><div align="center"> 
                  <input name=<%= "sl"&i%> type="text" class="Sytle_auto_s" id="sl"
				   onChange="JScript:form1.submit();" value=<%= sl%> size="4">
                </div></td>
              <td><div align="right"> 
                  <input name=<%= "je"&i%> type="text" class="Sytle_auto"
				   id="je" value=<%=rs("price")*sl%> size="6" readonly="yes">
                  (元)</div></td>
				  
              <td><div align="center"><a href="move.asp?clickBookID=<%=rs("BookID")%>">
			  <img src="images/move.gif" width="18" height="17" border="0"></a></div></td>
            </tr>
		<%
			if len(session("sl"))=0 then
				session("sl")=sl
			else 
				session("sl")=session("sl")&", "&sl 
			end if 
			if len(session("checkBook"))=0 then
				session("checkBook")="'"& rs("BookID")& "'"
			else 
				session("checkBook")=session("CheckBook")&", '"& rs("BookID")& "'"
			end if 
            rs.movenext
		wend %>
          </table>  
          <table width="97%" height="40" border="0" cellpadding="-1"
		   cellspacing="-1" class="Sytle_auto">
            <tr>
              <td><div align="right">合计金额:
				<input name="sum" type="text" class="Sytle_auto" id="sum2"
				 value=<%= sum %> size="10" readonly="yes">
                  (元)</div></td>
            </tr>
          </table>

        <table width="97%" height="39" border="0" cellpadding="-1" cellspacing="-1">
          <tr> 
            <td width="79%"><div align="center"> 
                  <input type="submit" name="modifysl" value="修改数量">
                <input type="submit" name="jiezhang" value="到收银台结账">
                  <input type="button" name="goon" value="继续选择图书" onClick="stand()">
                  <a href="clear.asp"> &nbsp;</a></div></td>
            <td width="5%"><div align="center"><a href="clear.asp">
			<img src="images/emptybuycar.gif" width="20" height="20" border="0"></a></div></td>
            <td width="16%"><a href="clear.asp">清空购物车 </a></td>
          </tr>
        </table>
        </form>		
      </div></td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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