📄 check.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<!-- IFRAME自动高度代码 -->
<script language="Javascript">
var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
//extra height in px to add to iframe in FireFox 1.0+ browsers
var FFextraHeight=getFFVersion>=0.1? 16 : 0
function dyniframesize(iframename) {
var pTar = null;
if (document.getElementById){
pTar = document.getElementById(iframename);
}
else{
eval('pTar = ' + iframename + ';');
}
if (pTar && !window.opera){
//begin resizing iframe
pTar.style.display="block"
if (pTar.contentDocument && pTar.contentDocument.body.offsetHeight){
//ns6 syntax
pTar.height = pTar.contentDocument.body.offsetHeight+FFextraHeight;
}
else if (pTar.Document && pTar.Document.body.scrollHeight){
//ie5+ syntax
pTar.height = pTar.Document.body.scrollHeight;
}
}
}
</script>
<!-- IFRAME自动高度代码 END-->
<%
Sub PutToShopBag( Prodid, ProductList )
If Len(ProductList) = 0 Then
ProductList =Prodid
ElseIf InStr( ProductList, Prodid ) <= 0 Then
ProductList = ProductList&", "&Prodid &""
End If
End Sub
%>
<html>
<style type="text/css">
<!--
.style1 {
color: #FFFFFF;
font-weight: bold;
}
.style3 {color: #000000}
body {
background-image: url(admin/images/bg.gif);
}
.STYLE4 {
color: #FF0000;
font-weight: bold;
}
-->
</style>
<head>
<title><%=webname%>--您的购物车</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="Robots" content="index,follow">
</head>
<body text="#000000" leftmargin="0" topmargin="0">
<%
dim ProductList,Products,I,ddadurl,ddad,rsCheck,LstPrice,strsql
ProductList = Session("ProductList")
Products = Split(Request("id"), ",")
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("ProdId"), ", ")
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="check.asp" method="POST" name="check">
<table width="700" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="80"><A HREF=<%=ddadurl%> TARGET="_blank"><IMG SRC=<%=ddad%> width="700" height="60" BORDER="0"></A></td>
</tr>
<tr><td>
<table border="0" cellspacing="1" cellpadding="4" align="center" width="100%" bgcolor="#CCCCCC">
<%
Set rsCheck=Server.CreateObject("ADODB.RecordSet")
strsql="select ID,Name,Score,Price1,Price2," & LstPrice & ",amount,VipPrice,Stock,Pic,Code from Product where ID in ("&Session("ProductList")&") order by ID"
rsCheck.open strsql,conn,1,1
Sum = 0
SumS = 0
Quatity = 1
Do While Not rsCheck.EOF
Quatity = CInt( Request.Form( "Q_" & rsCheck("ID")) )
If Quatity <= 0 Then
Quatity = CInt( Session(rsCheck("ID")) )
If Quatity <= 0 Then Quatity = 1
End If
Session(rsCheck("ID")) = Quatity
IF rsCheck("Stock") < Quatity Then
Quatity = 1
Session(rsCheck("ID")) = 1
response.write "<script language=javascript>alert('对不起,"&rsCheck("Name")&"暂时库存不足,请过段时间再来购买该商品!');window.close();</script>"
Response.End()
Conn.Close
Set Conn = Nothing
End IF
'Dim YourPrice,strprice2,strvipprice,ProScore
strprice1 = Round(rsCheck("Price1"),2)
strprice2 = Round(rsCheck("Price2"),2)
strvipprice = Round(rsCheck("VipPrice"),2)
ProScore = rsCheck("Score")
YourPrice = Round(rsCheck("" & LstPrice & ""),2)
Sum = Sum + (YourPrice + strvipprice)*Quatity
Sum=Round(Sum,2)
SumS = SumS + ProScore*Quatity
%>
<tr bgcolor="#f7f7f7" height="25" align="center">
<td width="40" bgcolor="#f7f7f7"> <input type="CheckBox" name="ProdId" value="<%=rsCheck("ID")%>" Checked></td>
<td width="141" bgcolor="#FFFFFF"><a href="#### target="_blank"><img src="image\<%=rsCheck("Pic")%>" width="100" height="100" border="0"></a></td>
<td width="491" bgcolor="#FFFFFF"><table width="98%" 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("ID")%>" target="_blank"><strong><%=rsCheck("Name")%>(编号:<%=rsCheck("Code")%>)</strong></a></td>
</tr>
<tr>
<td align="right" bgcolor="#f7f7f7"><strong>数量:</strong></td>
<td width="20%" bgcolor="#FFFFFF"><input type="Text" name="<%="Q_" & rsCheck("ID")%>" value="<%=Quatity%>" size="1" class="input_sr">
<input name="imageField" type="image" src="image/gx.gif" align="middle"></td>
<td width="20%" align="right" bgcolor="#f7f7f7"><strong>所赠积分:</strong></td>
<td width="15%" bgcolor="#FFFFFF"><%=ProScore %> 分</td>
<td width="15%" align="right" bgcolor="#f7f7f7"><strong>市场价:</strong></td>
<td width="13%" bgcolor="#FFFFFF"><%=strprice1 %> 元</td>
</tr>
<tr>
<td align="right" bgcolor="#f7f7f7"><strong>会员价:</strong></td>
<td bgcolor="#FFFFFF"><%=strprice2 %> 元</td>
<td align="right" bgcolor="#f7f7f7"><strong>成交价:</strong></td>
<td bgcolor="#FFFFFF"><%=YourPrice %> 元</td>
<td align="right" bgcolor="#f7f7f7"><strong>总计:</strong></td>
<td bgcolor="#FFFFFF"><span class="STYLE4"><%=Round((YourPrice + strvipprice)*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>
您的用户等级为:<%= strTitle %> | <span class="STYLE4"><strong>价格总计:<%=Round(Sum,2) %>元</strong></span> | 获得积分:<%=SumS %>分</td>
<td width="25%" align="center" bgcolor="#FFCC00">
<input name="payment" type="submit" class="input_bot" value="去收银台">
<input name="button" type="button" class="input_bot" onClick="javascript:window.close()" value="继续购物" language=javascript></td>
</tr>
</table></td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -