📄 showcart.asp
字号:
<html>
<head><title>Shopping Cart</title>
<style TYPE="text/css">
<!--
P {font-size: 10pt; text-align: left; font-family: Arial; font-color: blue}
P.large {font-size: 12pt; text-align: left; font-family: Arial; font-color: blue}
TD {font-size: 9pt; font-family: Arial; font-color: blue; font-weight: bold}
TD.small {font-size: 9pt; font-family: Arial; font-color: blue; font-weight: bold}
TD.medium {font-size: 10pt; font-family: Arial; font-color: blue; font-weight: bold}
-->
</style>
<!--<SCRIPT RUNAT=Server LANGUAGE="VBSCRIPT"> Function Fiks(FixWhat) if (isnull(FixWhat) or FixWhat="") then Fiks="<CENTER> - </CENTER>" else Fiks=trim(FixWhat) end if End Function</SCRIPT>-->
</head>
<body BGCOLOR="black">
<!-- #INCLUDE FILE="odbc_connection.inc" -->
<%
on error resume next
'====================
'Show Shopping Cart
'====================
intSessionID=Session.SessionID
session("GotCustInfo")=0
session("PurchaseStage")=0
%><!-- #INCLUDE FILE="openShoppingCartToShow.inc" --><%
if rows>0 then
%>
<center>
<table border="0" width="97%" cellpadding="0" cellspacing="0">
<tr><td colspan="4" bgcolor="black" class="small" align="center"><font color="white"><b>Use Categories Field Above to Add More Items to Cart</b></font></td></tr>
<tr>
<td width="5" bgcolor="gold"> </td>
<td bgcolor="gold" valign="center" align="left"><img src="images/logo_small.gif" border="0" WIDTH="172" HEIGHT="71"></td>
<td bgcolor="gold" align="center"><a href="EmptyCart.asp"><img src="images/Wheelbarrow_empty.gif" border="0" alt="Remove All Items From Your Shopping Cart" WIDTH="126" HEIGHT="78"></a></td>
<td bgcolor="gold" valign="center" align="right" class="medium">
<!--font color='gold'><b>Purchase</b></font--><a href="GetCustInfo.asp">
<img src="images/rcr_arrow_right.gif" alt="Purchase or Get Quote" border="0" WIDTH="54" HEIGHT="51"></a>
</td>
</tr>
</table>
</center>
<center>
<table border="0" width="97%">
<tr bgcolor="black">
<td valign="center" align="center">
<font color="white"><b>Your Shopping Cart holds the following items:</b></font>
</td>
</tr>
</table>
</center>
<center>
<table align="center" width="97%" border="1" cellspacing="1" cellpadding="1">
<tr bgcolor="gold">
<td class="small" align="center"><font face="arial" size="1" color="black"><b>Description</b></font></td>
<td class="small" align="right"><font face="arial" size="1" color="black"><b>Price </b></font></td>
<td class="small" align="center"><font face="arial" size="1" color="black"><b>Qty</b></font></td>
<td class="small" align="right"><font face="arial" size="1" color="black"><b>Total</b></font></td>
</tr>
<form name="Form1" method="post" action="ReCalcCart.asp">
<%
SubTotal=0
Do Until RS.EOF
if RS("intQuantity")>0 then
Response.Write "<tr valign=center align=center bgcolor=white>"
Response.Write "<td align=left><font face=arial size=1>" & Fiks(RS("s_Description")) & "</font></TD>"
Response.Write "<td align=right><font face=arial size=1>" & FormatCurrency(RS("Price")) & "</font></TD>"
Response.Write "<td align=center><font face=arial size=1><input name='" & RS("s_Item_No") & "' type='text' size=4 value='" & RS("intQuantity") & "'></font></TD>"
LineTotal=RS("Price")*RS("intQuantity")
SubTotal=SubTotal+LineTotal
Response.Write "<td align=right><font face=arial size=1>" & FormatCurrency(LineTotal) & "</font></TD>"
Response.Write "</tr>"
end if
RS.MoveNext
Loop
RS.Close
SET RS = Nothing
%>
<tr bgcolor="black">
<td colspan="3" align="right"><input type="submit" value=" Recalculate "></td>
<td align="right"><font color="white"><b><%=FormatCurrency(SubTotal)%></b></font></td>
</tr>
</form>
</table>
</center>
<br>
<center><font face="ARIAL" color="gold"><b>Note: You can remove any single item<br>by changing its quantity to zero.</b></font></center>
<%
else
response.redirect "inventory.asp"
end if
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -