<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--#include file="conn.asp"--->
<!--#include file="util.asp"--->
<%
strCpbm=request("cpbm")
ProductList=session("ProductList")
Products=Split(request("cpbm"),",")
for I=0 to UBound(Products)
PutToShopBag Products(I),ProductList
Next
session("ProductList")=ProductList
Head="以下是你所选购的CD"
ProductList=session("ProductList")
if len(ProductList)=0 then
response.redirect"nothing.asp"
response.End
end if
if request("MySelf")="Yes" then
ProductList=""
Products=split(request("cpbm"),",")
for I=0 to UBound(Products)
PutToShopBag Products(I),ProductList
Next
session("ProductList")=ProductList
end if
if len(ProductList)=0 then
response.redirect"nothing.asp"
response.End
end if
set rs=server.CreateObject("adodb.recordset")
sql="Select * From product"
sql=sql &" Where Product_Id In("&ProductList&")"
rs.open sql,conn,3,3
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>以下是你多选购的CD</title>
<style type="text/css">
<!--
.style2 {color: #333333}
-->
</style>
</head>
<script language="javascript">
function funCheckNUM(NUM)
{ var i,j,strTemp;
strTemp="0123456789"
if (NUM.length==0)
return 0
for(i=0;i<NUM.length;i++)
{
j=strTemp.indexOf(NUM.charAt(i));
if(j==-1)
{
return 0;
}
}
return 1;
}
function clean()
{
window.location.href="clear.asp"
}
</script>
<script language=javascript >
<!--
function form1_onsubmit()
{ newprice="Q_"&rs("Product_Id")
if((funCheckNUM(document.FORM1.newprice.value)==0))
{
alert("会员价有非法字符,请填写正确的会员价!@");
document.FORM1.newprice.focus();
return false;
}
//-->
}
</script>
<body topmargin="5">
<center>
<div align="center">
<center>
<table width="80%" border="0" cellpadding="0">
<tr>
<td width="80%" valign="top"><p align="center"></p>
<p align="center"><font color="#666666"><%=Head%></font></p>
<!--Webbot BOT="GeneraredScript" PREVIEW="" startspan-->
<script language="javascript"><!--
function FrontPage_Form1_Validator(theForm)
{
var checkOK="0123456789-";
var checkStr=theForm.<%="Q_"&rs("Product_Id")%>.value;
var allValid=true;
var decPoints=0
var allNum=""
for(i=0;i<checkStr.length;i++)
{ ch=checkStr.charAt(i);
for(j=0;j<checkOK.length;j++)
if(ch==checkOK.charAt(j))
break;
if(j==checkOK.length)
{ allValid=false;
break;
}
allNum+=ch;
}
if(!allValid)
{
alert("请输入正确的商品数量!(1~4个字符)");
theForm.<%="Q_"&rs("Product_Id")%>.focus();
return(false);
}
return(true);
}
//-->
</script>
<!--Webbot BOT="GeneraredScript" PREVIEW="" endspan-->
<form action="eshop.asp" method="post" onSubmit="return FrontPage_Form1_Validator(this)" name="FrontPage_Form1">
<input type="hidden" name="MySelf" value="Yes">
<div align="center"><center>
<table border="0" cellspacing="1" width="550" class="main" bgcolor="#CCCCCC">
<tr bgcolor="#CCCCFF"></tr>
<td align="center" width="82" height="22" bgcolor="#CCFFFF"><span class="style2">CD编号</span></td>
<td align="center" width="82" height="22" bgcolor="#CCFFFF"><span class="style1">CD名称</font></td>
<td align="center" width="82" height="22" bgcolor="#CCFFFF"><span class="style1">CD价格</font></td>
<td align="center" width="82" height="22" bgcolor="#CCFFFF"><span class="style1">数量</font></td>
<td align="center" width="82" height="22" bgcolor="#CCFFFF"><span class="style1">购买</font></td>
<td align="center" width="82" height="22" bgcolor="#CCFFFF"><span class="style1">总价</font></td>
</tr>
<%
Sum=0
While Not rs.EOF
Quatity=Cint(request("Q_"&rs("Product_Id")))
if Quatity<=0 then
Quatity=Cint(session(rs("Product_Id")))
if Quatity<=0 then Quatity=1
end if
session(rs("Product_Id"))=Quatity
Sum=Sum+ccur(rs("P_Newprice"))*Quatity
%>
<tr>
<td align="center" width="82" bgcolor="#eeeeee"><%=rs("Product_Id")%></td>
<td align="center" width="170" bgcolor="#eeeeee"><%=rs("Product_Name")%></td>
<td align="center" width="72" bgcolor="#eeeeee"><%=rs("P_Newprice")%></td>
<td align="center" width="76" bgcolor="#eeeeee" ><!--Webbot
bot="Validation" S-Display-Name="请输入正确的CD数量!" S-Data-Type="Integer" S-Number_Separators="x"
--><input name="<%="Q_"&rs("Product_Id")%>" value="<%=rs("Quatity")%>" size="3"> '报错位置
</td>
<td align="center" width="60" bgcolor="#EEEEEE"><input type="checkbox" name="cpbm" value="<%=rs("Product_Id")%>"Checked>
</td>
<td align="center" width="72" bgcolor="#eeeeee"><%=ccur("P_Newprice")*Quatity%>.00元</td>
</tr>
<%
rs.moveNext
Wend
%>
<tr>
<td align="right" colspan="6" width="546" bgcolor="#EEEEEE"><font color="#FF0000">总价格=人民币<%=Sum%>.00元</font></td>
</tr>
</table></center></div>
<blockquote><p align="center">
<input type="submit" value="更改数量" name="B1" style="font-size:9px">
<input type="button" value="继续购物" name="B2" onClick="window.close();"style="font-size:9px">
<input type="button" value="订单取消" name="B3" onClick="clean()" style="font-size:9px">
<input type="button" value="去收银台" onClick="window.open('ment.asp',window.close(),'Sample','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scollbars=yes,resizable=yes,copyhistory=yes,width=610,height=600,left=100,top=100')" name="B4"style="font-size:9px">
<p align="center"><font color="#FF0000">注意:更改CD数量需要按“更改数量”</font></p>
</p></blockquote></form>
</td></tr>
</table>
</center>
</div>
<% rs.close
conn.close
%>
</body>
</html>
错误类型:
ADODB.Recordset (0x800A0CC1)
在对应所需名称或序数的集合中,未找到项目。
/eshop.asp, 第 149 行
数据库表的名称:product
表项的名称:
Product_No
Product_Id
Product_Class
Class_1
Class_2
Product_Name
Product_Intro
Product_Show
P_Newprice
P_Oldprice
P_Pic
P_Pill_Pic
Regtime
Look_Count