<%@ LANGUAGE="VBScript" %>
<!--#include file="Inc/Conn.asp" -->
<!--#include file="Lock.asp"-->
<!--#include file="Inc/Util.asp" -->
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="ziyan/Style.css" rel="stylesheet" type="text/css">
<TITLE>商品结算</TITLE>
</HEAD>
<BODY leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<%
Set rsid = Server.CreateObject("ADODB.recordset")
sql="Select ID From [Product]"
rsid.open sql,conn,1,1
chkstr = ""
Do until rsid.Eof
If Session("C_"&rsid("ID"))<>"" Then 
chkstr = chkstr & Session("C_"&rsid("ID"))
End if
rsid.MoveNext
Loop
rsid.Close
Set rsid=Nothing
If Len(chkstr)=0 Then 
Response.Write "<br><center><font size=3>你没有购买任何产品!请关闭再选择你所购买的产品...</font><br><br><br>"
Session("ProductList") = ""
Session("Product_ID")=""
Response.Write "<input type='button' value=' 关 闭 ' name='B4' onclick='javascript:window.close()'></center>"
Else

ProductList = Session("ProductList")
set rs=Server.CreateObject("Adodb.recordset")
sql = "Select * From [Product] Where [Product_ID] In (" & ProductList & ")"
rs.open sql,conn,1,1
%>
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="Style2.css" rel="stylesheet" type="text/css">
<TITLE>商品结算</TITLE>
</HEAD>
<BODY leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<br>
<FORM name="FORM1" action="ShopCheck3.asp" method=post>
<input type=hidden Name="username" Value="<%=Request.form("username")%>" >
<input type=hidden Name="Comane" Value="<%=Request.form("Comane")%>" >
<input type=hidden Name="Somane" Value="<%=Request.form("Somane")%>" >
<input type=hidden Name="Add" Value="<%=Request.form("Add")%>" >
<input type=hidden Name="Zip" Value="<%=Request.form("Zip")%>" >
<input type=hidden Name="Phone" Value="<%=Request.form("Phone")%>" >
<input type=hidden Name="Fox" Value="<%=Request.form("Fox")%>" >
<input type=hidden Name="Email" Value="<%=Request.form("email")%>" >
<TABLE cellSpacing=0 cellPadding=0 width=100%>
<TBODY>
<TR>
<TD align=middle width="100%">
<div align="center">
<center>
              <TABLE width=98% align="center" cellSpacing=1 bgColor=#CCCCCC >
                <TBODY> 
                  <TR bgColor=#eeeeee> 
                    <TD height="22"  colSpan=2> 
                      <div align="center">购物结算--(第二步)购物信息及付款方式</div></TD></TR>
                  <tr bgcolor="#FFFFFF"> 
                    <TD height=7 colspan="2" align="right"> 
                      <div align="center"><br>
                        <table border="0" cellspacing="1" width="580"  height="61" bgcolor="#666666" bordercolorlight="#000000" bordercolordark="#FFFFFF">
                          <tr bgcolor="#006699"> 
                            <td align="center" width="117"  height="22" bgcolor="#eeeeee">商品编号</td>
                            <td align="center" width="335"  height="22" bgcolor="#eeeeee">商品名称</td>
                            <td align="center" width="118" height="22" bgcolor="#eeeeee">商品数量</td>
                          </tr>
<%
Do 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
%>
                          <tr> 
                            <td align="center" width="117" height="23" bgcolor="#FFFFFF"><%=rs("Product_ID")%> 
                            </td>
                            <td align="center" width="335" height="23" bgcolor="#FFFFFF"><%=rs("Name")%>
                            </td>
                            <td align="center" width="118" height="23" bgcolor="#FFFFFF">
<input name="<%Response.Write "Q_"&rs("Product_ID")%>" type="text" id="Quatity" value="<%=Quatity%>" size="5" maxlength="5">
                            </td>
                          </tr>
<%
rs.MoveNext
Loop
%>
                          <tr bgcolor="#FFFFFF"> 
                            <td Align="Right" ColSpan="3" height="22">&nbsp;</td>
                          </tr>
                        </table>  
</div><blockquote>  
</blockquote>  
</TD>  
</tr>  
<tr>  
                    <TD  width=250 bgcolor=#FFFFFF height=7>我们提供三家银行的账号供您汇款,请您选择:</TD>  
                    <TD  width=501 height=7 bgcolor="#FFFFFF"> 
                      <select size="1" name="Bank">  
<option>招商银行一卡通</option> 
<option>交通银行太平洋卡</option> 
<option>建设银行龙卡储蓄卡</option> 
  </select>
                    </TD> 
</tr> 
<tr> 
                    <TD width=250 bgcolor=#FFFFFF height=7>订单备注: 
                      <p>　</p>
</TD>
                    <TD  width=501 height=7 bgcolor="#FFFFFF"> 
                      <textarea rows="6" name="Remark" cols="45"></textarea>
                    </TD>
</tr>

                  <TR bgColor=#FFFFFF> 
                    <TD height="22"  colSpan=2> 
                      <DIV align=center>&nbsp; 
                        <input type="button" value="上一步" name="B4" onclick="javascript:window.history.go(-1)">
                         <INPUT type=submit size=3 value=下一步 name=Submit2>  
</DIV></TD></TR></TBODY></TABLE>  
</center>  
</div>  
</TD></TR></TBODY></TABLE><BR></FORM>  
</BODY></HTML>  
<%
rs.close
conn.close
End if%>
