购物车问题
请教一下各位大虾:我买一本机械出版社赛奎春主编的ASP信息系统开发实例精选,可书中的融E自选网进入购物车后,明明买了东西,但点收银台付款却提示你还没有购物。因为我急需用书中融E自选网,所以希望有高手可以指点指点,万分乞求论坛高手帮助一下我这个可怜的菜鸟。
由于整个源程序太大,上传不了,我把购物车的源程序贴一下,大伙帮看看: <META http-equiv=Content-Type content="text/html; charset=gb2312"> <%
'获取存放商品名称的数组信息
arys_1=session("array")
'获取存放对应商品价格的数组信息
ary2=session("array2")
'获取对应商品的购买数量的数组信息
ary=session("array3")
'判断用户是否已经购买商品
if isarray(arys_1) then
for i=0 to ubound(arys_1)-1
str=str+arys_1(i)+","
str2=str2+cstr(ary(i))+","
str3=str3+cstr(ary2(i))+","
next
'提取订单中的参数
yonghu=session("name")
jine=request.form("jine")
names=request.form("name")
addre=request.Form("address")
email=request.Form("email")
phone=request.Form("phone")
meg=request.Form("memo")
dingdan=request.Form("hidennumber")
fangshi=request.Form("select")
yunshu=request.Form("typ")
agio=request.Form("agio")
%>
<!-- #include file="../Conn/conn.asp" -->
<%
'将订单中的参数存放到数据库中
sql="insert into tb_OrderForm values('"&dingdan&"','"&str&"','"&str2&"','"&str3&"','"&agio&"',"&jine&",'"&yunshu&"','"&names&"','"&phone&"','"&email&"','"&addre&"','"&meg&"','"&fangshi&"','新订单','无','"&date()&"')"
rs.open sql,conn
set rs=nothing
conn.close
set conn=nothing
%>
<!-- #include file="../Conn/conn.asp" -->
<%
sql="update tb_Account set Amount=Amount+"&jine&",Degree=Degree+1 where Name='"&yonghu&"'"
rs.open sql,conn
set rs=nothing
conn.close
set conn=nothing
%>
<!-- #include file="../Conn/conn.asp" -->
<%
sql="select * from tb_Account where Name='"&yonghu&"'"
rs.open sql,conn
if not rs.eof then
'获取用户的消费总额
amount=rs("Amount")
end if
'变量存储用户积分计算参数
variable=int(session("Integral"))
'计算用户的积分 公式为"消费总额/积分计算参数"
integral=int(amount/variable)
session("jifen")=integral
'计算会员的等级
if integral <5 then
step="普通会员"
agio=100
else
if integral <10 then
step="三级会员"
agio=95
else
if integral <30 then
step="二级会员"
agio=90
else
if integral <50 then
step="一级会员"
agio=80
else
if integral <100 then
step="VIP会员"
agio=65
else
step="终身会员"
agio=50
end if
end if
end if
end if
end if
%>
<!-- #include file="../Conn/conn.asp" -->
<%
sql="update tb_Account set Integral="&integral&",Agio="&agio&",Step='"&step&"' where Name='"&yonghu&"'"
rs.open sql,conn
set rs=nothing
conn.close
set conn=nothing
%>
<!-- #include file="../Conn/conn.asp" -->
<%
for i=0 to ubound(arys_1)-1
sql="update tb_Goods set Sell=Sell+"&ary(i)&" where Name='"&arys_1(i)&"'"
rs.open sql,conn
next
set rs=nothing
conn.close
set conn=nothing
session("array")=""
session("array2")=""
session("array3")=""
%>
<script language="javascript">
alert("订单已经接收!");
</script>
<object type="application/x-oleobject" id=closes classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<param name="command" value="close">
</object>
<script language="javascript">
closes.Click();
window.open("../index.asp");
</script>
<% else %>
<script language="javascript">
alert("您还没有购物呢!");
</script>
<object type="application/x-oleobject" id=closes classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<param name="command" value="close">
</object>
<script language="javascript">
closes.Click();
window.open("../index.asp");
</script>
<% end if %>