<!--#include file="include/config.asp" -->
<html><head><title>购物车-<%=sitename%>-<%=siteurl%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="Robots" content="index,follow">
<LINK href="images/css.css" type=text/css rel=stylesheet>
<LINK href="list/newhead.css" type=text/css rel=stylesheet>
	<style type="text/css">
	<!--
	 td{font-size:12px; font-family: "宋体"; line-height: 20px}
	input.buttonface {
		font-size: 12px; color: #000000; font-family: "宋体";  font-weight: bold
	}
	input.smallInput
	{
	font-size: 12px; height: 18px; color: #000000; font-family: "宋体"
	; border: 1px #000000 solid
	}
	textarea.border
	{
	font-size: 12px; height: 60px; color: #000000; font-family: "宋体"
	; border: 1px #000000 solid
	}
	.ab{font-size:12px; color:#FF0000; line-height:150%; font-weight: bold; font-family: "宋体"}
	.ba{font-size:12px; color:#ffffff; line-height:150%; font-family: "宋体"; font-weight: bold}
	.title1{font-size:12px; color:#000000; font-family: "宋体"; font-weight: bold}
	.title2{font-size:14px; color:#FF6600; font-family: "宋体"; font-weight: bold}
	.other{font-size:12px; color:#000000; font-family: "宋体"; font-weight: bold}
	.shich_zc {  font-size: 12px; line-height: 22px; color:#990000; text-decoration: none; ; font-family: "宋体"}
	.link {  font-size: 12px; text-decoration: underline; line-height: 12px; color:red; font-family: "宋体"}
	.style1 {  font-size: 18px; line-height: 12px; color:ff0000; font-family: "宋体"; font-weight: bold}
	.shich_cont {  text-decoration: line-through ; color:#000000; font-size: 12px; font-family: "宋体"}
	.form_font1{font-size:12px; color:#FF0000; font-family: "宋体"; font-weight: bold}
	.form_font2{font-size:12px; color:#FF9900; font-family: "宋体"; font-weight: bold}
	a:link {  color: #263487; text-decoration: none}
	a:visited {  color: #AB3033; text-decoration: none}
	a:hover { text-decoration: underline}
	.style2 {color: #581658}
	-->
	</style>

</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="20" onload="self.focus();">
<center>
  <!--#include file="top.asp"-->

  <%
call aspsql()
userkou=checkuserkou()
buylist=request.cookies("buyok")("cart")
if trim(request("del"))<>"" then 
buylist=replace(buylist,trim(request("del")),"XXXXXXXX")
response.cookies("buyok")("cart")=buylist
end if
If Request("edit") = "ok" Then
buylist = ""
buyid = Split(Request("ProdId"), ", ")
For I=0 To UBound(buyid)
if i=0 then
buylist = "'" & buyid(I) & "', '"&request(buyid(I))&"'"
else
buylist = buylist & ", '" & buyid(I) & "', '"&request(buyid(I))&"'"
end if
Next
response.cookies("buyok")("cart") = buylist
End If
Set rs=conn.execute("select * from bproduc where ProdId in ("&buylist&") order by ProdId")
%>
<table width="768" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
      <td height="30"><table width="768" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr> 
            <td><img src="order/gouwuche/800buy_car_step.gif" width="160" height="48"></td>
            <td background="order/gouwuche/800buy_car_bg.gif"><img src="order/gouwuche/800buy_car_step7.gif" width="153" height="48"></td>
            <td background="order/gouwuche/800buy_car_bg.gif"><img src="order/gouwuche/800buy_car_step2.gif" width="153" height="48"></td>
            <td background="order/gouwuche/800buy_car_bg.gif"><img src="order/gouwuche/800buy_car_step8.gif" width="154" height="48"></td>
            <td><img src="order/gouwuche/800buy_car_step4.gif" width="108" height="48"></td>
          </tr>
        </table>
        <font color="#FF3333">&nbsp;</font></td>
    </tr>
<tr><td>
<table border="0" align="center" width="724" cellpadding="0" cellspacing="0">
          <form action="check.asp" method="POST" name="check">
            <tr align="center" bgcolor="#EEEEEE"> 
<td>
<table width="100%"  border="0" cellpadding="0" cellspacing="1" bgcolor="#999999">
                  <tr bgcolor="#f0f0f0"> 
                    <td height="22" align="center">商 品 名 称</td>
                    <td width="60" align="center">市场价</td>
                    <td width="60" align="center">优惠价</td>
                    <td width="60" align="center">会员价</td>
                    <td width="80" align="center">数 量</td>
                    <td width="80" align="center">优惠价小计</td>
                    <td width="60" align="center">获得积分</td>
                    <td width="60" align="center">删除</td>
                  </tr>
                  <%
Sum = 0
While Not rs.eof
buynum=split(replace(buylist,"'",""),", ")
for i=0 to ubound(buynum)
if rs("prodid")=buynum(i) then
Quatity=buynum(i+1)
exit for
end if
next
if not isNumeric(Quatity) then Quatity=1
If Quatity <= 0 Then Quatity = 1
Sum = Sum + csng(rs("PriceList"))*Quatity*checkuserkou()/10
shichangSum = shichangSum + csng(rs("PriceOrigin"))*Quatity*checkuserkou()/10
jifenSum = jifenSum + csng(rs("jifenzhi"))*Quatity
%>

                  <tr bgcolor="#FFFFFF"> 
                    <td height="20" align="center" valign="middle"><input type="hidden" name="ProdId" value="<%=rs("ProdId")%>"> 
                      <a href='list.asp?ProdId=<%=rs("ProdId")%>'><%=rs("ProdName")%></a></td>
                    <td align="center" class="shich_cont"><%=FormatNum(rs("PriceOrigin"),2)%></td>
                    <td align="center"><font color="#FF0000"><b><%=FormatNum(rs("PriceList"),2)%></b></font></td>
                    <td align="center"><font color="#FF0000"><b>
                      <%	if request.cookies("buyok")("userid")="" then 
	response.write "<font color=red>"&huiyuanjia&"</font><br>"
	else
	response.write "<font color=red>"&FormatNum(rs("PriceList")*checkuserkou()/10,2)&"</font><br>"
	end if
%>
                      </b></font></td>
                    <td align="center"> <input type="Text" name="<%=rs("ProdId")%>" value="<%=Quatity%>" size="4" maxlength="4" class="smallInput" > 
                      <input type="submit" name="order" value="修改"> </td>
                    <td align=center><font color="#FF0000"><%=FormatNum(rs("PriceList")*Quatity*checkuserkou()/10,2)%></font></td>
                    <td align=center><%=rs("jifenzhi")%></td>
                    <td align=center><a href=check.asp?del=<%=rs("ProdId")%>>删除</a></td>
                  </tr>
                  <%
rs.MoveNext
Wend
rs.close
set rs=nothing
%>
                </table>

</td>
            </tr>
            <tr align="left"> 
              <td colspan="6" bgcolor="#ffffff" height=35><table width="724" height="35" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="620">购物款总计：<font color="#FF0000">￥<%=FormatNum(Sum,2)%></font> 
                      　 节省：<font color="#A72B31">￥<%=FormatNum(shichangsum-sum,2)%></font> 
                      　共获得积分：<font color="#FF0000"><%=jifensum%></font> </td>
                    <td>&nbsp;</td>
                  </tr>
                </table></td>
            </tr>
            <tr>
              <td colspan="6" bgcolor="#ffffff" height=40 align=center><table width="724" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
                  <tr> 
                    <td width="350">&nbsp; </td>
                    <td width="119" align="right"><a href="index.asp"><img src="order/gouwuche/800buy_gwc_jx.gif" alt="" width="125" height="39" border="0"></a></td>
                    <td width="40">&nbsp;</td>
                    <td width="259"> 
                      <% if request.cookies("buyok")("userid")="" then

	  response.write "<a href=denglu.asp><img src=order/gouwuche/800buy_gwc_buy.gif width=125 height=39 border=0></a>"
        else
	  response.write "<a href=payment.asp><img src=order/gouwuche/800buy_gwc_buy.gif width=125 height=39 border=0></a>"
		end if
		%>
                      <script>document.cookie='newyear_flag1=0;path=/cgi-bin';</script>
                      <input type="hidden" name="edit" value="ok"> </td>
                  </tr>
                </table></td>
            </tr>
            <tr> 
              <td colspan="6" bgcolor="#ffffff" height=20 align=center> &nbsp;&nbsp;&nbsp; 
                &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </td>
            </tr>
          </form>
        </table>
</td></tr></table>

  <!--#include file="down.asp"-->
</center>
</body></html>
<%
sum=FormatNum(sum,2)
response.cookies("buyok")("total")=sum
conn.close
set conn=nothing
%>
