?? order_check.asp
字號(hào):
<!--#include file="inc/conn.asp" -->
<%
Sub PutToShopBag( Product_Id, ProductList )
If Len(ProductList) = 0 Then
ProductList = "'" & Product_Id & "'"
ElseIf InStr( ProductList, Product_Id ) <= 0 Then
ProductList = ProductList & ", '" & Product_Id & "'"
End If
End Sub
%>
<html>
<head>
<title>buy car</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="Author" content="heweiqun">
<meta name="Contact" content="hdz2008@163.com">
<link href="mt_style.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
<%
'如果購買車為空,轉(zhuǎn)入提示界面
ProductList = Session("ProductList")
If Len(ProductList) = 0 Then
Response.write "<table height=100% width=100% ><tr><td align=center>Hello!Shopping car is null ,do you <a href='javascript:window.close()'><b>ContinueShopping</b></a>?</td></tr></table>"
response.end
end if
'判斷是否支付,如支付轉(zhuǎn)到支付頁面,并生成在線支付所需數(shù)據(jù)參數(shù)
if request("payment")="payment" then
response.redirect "payment.asp"
end if
'取消要購買物品的處理
Quatityt=""
subslist=""
If Request("cmdShow") = "Yes" Then
ProductList = ""
Products = Split(Request("Product_Id"), ", ")
For I=0 To UBound(Products)
PutToShopBag Products(I), ProductList
Next
Session("ProductList") = ProductList
End If
if productlist<>"" then
Set rsc=Server.CreateObject("ADODB.RecordSet")
sqlc="select * from Productwygk where Product_Id in ("&productlist&") order by Product_Id"
rsc.open sqlc,conn,1,1
else
Response.write "<table height=100% width=100% ><tr><td align=center>hello,Shopping car is null ,do you need <a href='../helpcenter.asp' target='blank_'><b>HELP</b></a>?or <a href='javascript:window.close()'><b>Continue</b></a>?</td></tr></table>"
response.end
end if
%>
<table width="630" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td colspan="4" height="47"> The following is a products inventory that you choose:</td>
</tr>
<tr>
<td colspan="4" height="88">
<table border="0" cellspacing="1" cellpadding="0" align="center" width="567" bgcolor="#000000">
<form action="order_check.asp" method="POST" name="check">
<tr bgcolor="#FFFFFF">
<td width="56" height="25">
<div align="center"><font color="B0266D">cancel</font></div>
</td>
<td width="283">
<div align="center"><font color="B0266D">ProductName</font></div>
</td>
<td width="57">
<div align="center"><font color="B0266D">ProductQuantity</font></div>
</td>
<td width="85">
<div align="center"><font color="B0266D">unit price/font></div>
</td>
<td width="85">
<div align="center"><font color="B0266D">total</font></div>
</td>
</tr>
<%
Sum = 0
While Not rsc.EOF
Quatity = CInt( Request( "Q_" & rsc("Product_Id")) )
If Quatity <= 0 Then
Quatity = CInt( Session(rsc("Product_Id")) )
If Quatity <= 0 Then Quatity = 1
End If
if len(Quatityt)=0 then
Quatityt=Quatity
else
Quatityt=Quatityt&","&Quatity
end if
if len(subslist)=0 then
subslist=rsc("Title")
else
subslist=subslist&","&rsc("Title")
end if
Session(rsc("Product_Id")) = Quatity
Sum = Sum + csng(rsc("Price")) * Quatity
Sum=FormatNumber(Sum,1)
%>
<tr bgcolor="#FFFFFF">
<td width="56" height="20" align="center">
<input type="CheckBox" name="Product_Id" value="<%=rsc("Product_Id")%>" Checked>
<input type="hidden" name="subs" value="<%=rsc("Title")%>">
</td>
<td width="283"> <font color="B0266D"><%=rsc("Title")%></font></td>
<td width="57" align="center">
<input type="Text" name="<%="Q_" & rsc("Product_Id")%>" value="<%=Quatity%>" size="2" class="form">
</td>
<td width="85" align=center><font color="B0266D"><%=FormatNumber(rsc("Price"),1)%></font></td>
<td width="85" align=center><font color="B0266D"><%=FormatNumber(csng(rsc("Price"))*Quatity,1)%></font></td>
</tr>
<%
rsc.MoveNext
Wend
rsc.close
set rsc=nothing
%>
<tr bgcolor="#FFFFFF">
<td colspan="2" height="35" align="center">
<input type="submit" name="order" value="updating quantity">
<input type="submit" name="payment" value="payment">
<input type="button" value="ContinueShopping" language=javascript onClick="javascript:window.close()" name="button">
<input type="hidden" name="cmdShow" value="Yes">
</td>
<td colspan="3" align="right">
<b> <font color="B0266D">total prices = <%=Sum%> </font></b>
</td>
</tr>
</form>
<tr><td colspan="5" bgcolor="#ffffff">
<UL>
<LI>Notice: Change " quantity of the products " and " buy ", need to click the button " alter the quantity "!
’
</UL></td></tr>
</table>
</td>
</tr>
</table>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -