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

📄 purchase.asp

📁 能实现用户注册
💻 ASP
字号:
<!-- #include file="shared_checkBrowser.inc" -->
<!-- #INCLUDE FILE="shared_styles.inc" -->
<%
on error resume next

if session("GotCustInfo")=0 then response.redirect "GetCustInfo.asp"
'if session("PurchaseStage")=2 then response.redirect "PurchaseSelectPmt.asp"
'if session("PurchaseStage")=3 then response.redirect "PurchaseFinal.asp"
session("PurchaseStage")=2

session("EmptyCart")=0
intSessionID=Session.SessionID
CustomerID=Session("CustomerID")
if (len(CStr(CustomerID))=0 or CustomerID="") then response.redirect "inventory.asp"

'write a cookie if we can
%>
<!-- #INCLUDE FILE="sendCookies.inc" -->

<html>
<head><title>Shopping Cart</title>
<!--<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

Function Numbers(FixWhat)	
         dim CharCount	
         if isnull(FixWhat) then		
                 Numbers="<CENTER>-0-</CENTER>"	
         else		
                 FixWhat=trim(FixWhat)		
                 CharCount=CInt(Len(FixWhat)-3)		
                 if CharCount<1 then			
                         Numbers=FixWhat		
                 else			
                         select case CharCount				
                                 case 1: Numbers=Left(FixWhat,1)				
                                 case 2: Numbers=Left(FixWhat,2)				
                                 case 3: Numbers=Left(FixWhat,3)				
                                 case 4: Numbers=Left(FixWhat,4)				
                                 case 5: Numbers=Left(FixWhat,5)				
                                 case 6: Numbers=Left(FixWhat,6)			
                         end select			
                         Numbers=Numbers & ","			
                         Numbers=Numbers & Right(FixWhat,3)		
                  end if	
           end if
End Function

</SCRIPT>
-->
</head>
<body BGCOLOR="white">

<!-- #INCLUDE FILE="odbc_connection.inc" -->
<!-- #INCLUDE FILE="openShoppingCartToShow.inc" -->
<%
if rows>0 then
%>
<center>
<table border="0" width="97%" cellpadding="0" cellspacing="0">
<tr>
	<td colspan="5" 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">&nbsp;</td>

	<td bgcolor="gold" valign="center" align="left"><img src="images/logo_small.gif" border="0" WIDTH="172" HEIGHT="71"></td>

	<td valign="center" align="right" bgcolor="gold">
	<a href="ShowCart.asp">
	<img src="images/Wheelbarrow.gif" alt="Show/Modify Shopping Cart Contents" border="0" WIDTH="126" HEIGHT="78"></a>
	</td>

	<td valign="center" align="right" bgcolor="gold">
	<a href="PurchaseFinal.asp">
	<img src="images/rcr_arrow_right.gif" alt="<%=session("purchase")%>" border="0" WIDTH="54" HEIGHT="51"></a>
	</td>

	<td width="5" bgcolor="gold">&nbsp;</td>
</tr>

<tr>
	<td colspan="5" bgcolor="black" class="small" align="center">
	<% if session("purchase")="Purchase" then %>
	<font color="white"><b>Please confirm your purchase of the following items by pressing the spinning right arrow</b></font>
	<% else %>
	<font color="white"><b>Please confirm these are the items you wish to get a quote on. Press the spinning right arrow.</b></font>
	<% end if %>
	</td>
</tr>

</table>
</center>

<center>
<table width="100%"><tr><td BGCOLOR="WHITE">

<center>
<table align="center" width="97%" border="1" cellspacing="1" cellpadding="1">
	<tr bgcolor="gold">
	<td align="center"><font color="black"><b>Description</b></font></td>
	<td align="right"><font color="black"><b>Price </b></font></td>
	<td align="center"><font color="black"><b>Qty</b></font></td>
	<td align="right"><font color="black"><b>Total</b></font></td>
	</tr>


<%
	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>" & Numbers(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"><font color="white">SubTotal </font></td>
<td align="right"><font color="white"><%=FormatCurrency(SubTotal)%></font></td>
</tr>

<!-- #INCLUDE FILE="custTblGetData.inc" -->

<%
if session("ysnTaxExempt")=true then
	TaxPct=0
else
	TaxPct=0
	if (s_State="FL" or s_State="Fl" or s_State="Florida") then TaxPct=0.065
end if

if TaxPct>0 then
	Tax=SubTotal*TaxPct
else
	Tax=0
end if

Total=FormatCurrency(SubTotal+Tax)
Tax=FormatCurrency(Tax)
Total=FormatCurrency(Total)
%>

<tr bgcolor="black">
<td colspan="3" align="right"><font color="red">Tax&nbsp;@&nbsp;<%=TaxPct*100%>%&nbsp;</font></td>
<td align="right"><font color="red"><%=Tax%></font></td>
</tr>

<tr bgcolor="black">
<td><font size="-1" color="white">note: Shipping fees not shown</font></td>
<td colspan="2" align="right"><font color="white">Total&nbsp;</font></td>
<td align="right"><font color="white"><%=Total%></font></td>
</tr>

</form>
</table></center>
</td></tr></table></center>

<%
else
'CART IS EMPTY! GO BACK TO INVENTORY PAGE
response.redirect "inventory.asp"
%>


<% end if %>
</body>
</html>

⌨️ 快捷键说明

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