📄 shopping1.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<%
Sub PutToShopBag( bookid, ProductList )
If Len(ProductList) = 0 Then
ProductList =bookid
ElseIf InStr( ProductList, bookid ) <= 0 Then
ProductList = ProductList&", "&bookid &""
End If
End Sub
%>
<html>
<head>
<title>我要下订单</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/css.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<%
ProductList = Session("ProductList")
Products = Split(Request("bookid"), ",")
For I=0 To UBound(Products)
PutToShopBag Products(I), ProductList
Next
Session("ProductList") = ProductList
if request("payment")="去收银台" then
response.redirect "b2b_ddlcsys.asp?action=1"
end if
If Request("cmdShow") = "Yes" Then
ProductList = ""
Products = Split(Request("bookid"), ", ")
For I=0 To UBound(Products)
PutToShopBag Products(I), ProductList
Next
Session("ProductList") = ProductList
End If
If Len(Session("ProductList")) = 0 Then
Response.write "<table height=100% width=100% ><tr><td align=center>您的购物车为空,<a href=index.asp><b>继续购物</b></a> <a href=""JavaScript:onClick=window.close();""><B>关闭窗口</B></a></td></tr></table>"
Response.end
end if
%>
<form action="shopping.asp" method="POST" name="check">
<table width="700" border="0" cellspacing="0" cellpadding="0" align="center">
<tr><td>
<table border="0" cellspacing="1" cellpadding="4" align="center" width="100%" bgcolor="#CCCCCC">
<%
Set rsCheck=Server.CreateObject("ADODB.RecordSet")
strsql="select bookid,bookname,shichangjia,huiyuanjia,dazhe from shop_books where bookid in ("&Session("ProductList")&") order by bookid"
rsCheck.open strsql,conn,1,1
Sum = 0
Quatity = 1
Do While Not rsCheck.EOF
Quatity = CInt( Request.Form("ckxp"&rsCheck("bookid")))
If Quatity <= 0 Then
Quatity = CInt( Session(rsCheck("bookid")) )
If Quatity <= 0 Then Quatity = 1
End If
Session(rsCheck("bookid")) = Quatity
Dim strprice1
strprice1 =rsCheck("huiyuanjia")
strprice2 =rsCheck("shichangjia")
Sum = Sum + strprice1*Quatity
Sum=Round(Sum,2)
%>
<tr bgcolor="#f7f7f7" height="25" align="center">
<td width="40" bgcolor="#f7f7f7"> <input type="CheckBox" name="ProdId" value="<%=rsCheck("bookid")%>" Checked></td>
<td width="491" bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="7" cellspacing="1" bgcolor="#f2f2f2">
<tr>
<td width="17%" align="right" bgcolor="#f7f7f7"><strong>商品名称:</strong></td>
<td colspan="5" bgcolor="#FFFFFF"><a href="b2b_cpinfo.asp?ID=<%=rsCheck("bookid")%>" target="_blank"><strong><%=rsCheck("bookName")%>(编号:<%=rsCheck("bookid")%>)</strong></a></td>
</tr>
<tr>
<td align="right" bgcolor="#f7f7f7"><strong>数量:</strong></td>
<td width="20%" bgcolor="#FFFFFF"><input type="Text" name="<%="ckxp"&rsCheck("bookid")%>" value="<%=Quatity%>" size="1" class="input_sr">
<input name="imageField" type="image" src="image/gx.gif" align="middle"></td>
<td width="15%" align="right" bgcolor="#f7f7f7"><strong>市场价:</strong></td>
<td width="13%" bgcolor="#FFFFFF"><%=rsCheck("shichangjia")%> 元</td>
</tr>
<tr>
<td align="right" bgcolor="#f7f7f7"><strong>会员价:</strong></td>
<td bgcolor="#FFFFFF"><%=strprice1%> 元</td>
<td align="right" bgcolor="#f7f7f7"><strong>成交价:</strong></td>
<td bgcolor="#FFFFFF"><%=strprice1%> 元</td>
<td align="right" bgcolor="#f7f7f7"><strong>总计:</strong></td>
<td bgcolor="#FFFFFF"><span class="STYLE4"><%=Round((strprice1)*Quatity,2) %> 元</span></td>
</tr>
</table></td>
</tr>
<%
rsCheck.MoveNext
Loop
rsCheck.close
set rsCheck=nothing
%>
</table>
<table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td width="75%" align="right"><INPUT type=hidden value=Yes name=cmdShow>
<span class="STYLE4"><strong>价格总计:<%=sum%>元</strong></span></td>
<td width="25%" align="center" bgcolor="#FFCC00">
<input name="payment" type="submit" class="input_bot" value="去收银台">
<a href="index.asp">123</a></td>
</tr>
</table></td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -