<!-- #include virtual = "/include/myopen.asp" -->
<%
	set RS = Server.CreateObject("ADODB.RecordSet")
	set RS1 = Server.CreateObject("ADODB.RecordSet")
%>
<%
'IF Request.Cookies ("USER_NAME") = "" OR Request.Cookies ("USER_PASS") ="" THEN

'	descr_url=Request.ServerVariables("SCRIPT_NAME")
	'订购的登陆
	
	'没有登陆
'	Response.Redirect ("/member/login.asp?source_url=" & descr_url & "&card_no=" & request("card_no") & "&card_name=" & request("card_name") & "&card_unit=" & request("card_unit") & "&card_price=" & request("card_price") & "&card_price_a=" & request("card_price_a") & "&number=" & request("number") & "&order=all")
	
'END IF
IF REQUEST("act") = "insert" THEN
	SQL = "SELECT * FROM ORDER_TEMP WHERE USER_NAME = '" & Request.ServerVariables("REMOTE_ADDR") & "' AND CARD_NO = '" & Request("CARD_NO") & "'"
	RS.Open SQL,CONN,adOpenKeyset ,adLockReadOnly
		IF RS.RecordCount >0 THEN
		'修改数量
			SQL = "UPDATE ORDER_TEMP SET CARD_NUMBER = CARD_NUMBER + " & Request("number") & ",CARD_TOTAL = CARD_NUMBER * CARD_PRICE  WHERE USER_NAME = '" & Request.ServerVariables("REMOTE_ADDR") & "' AND CARD_NO = '" & Request("CARD_NO") & "'"
			CONN.Execute (SQL)
			SQL = "UPDATE ORDER_TEMP SET CARD_TOTAL = CARD_NUMBER * CARD_PRICE_A  WHERE USER_NAME = '" & Request.ServerVariables("REMOTE_ADDR") & "' AND CARD_NO = '" & Request("CARD_NO") & "'"
			CONN.Execute (SQL)
		ELSE
		'增加记录
			SQL = "INSERT INTO ORDER_TEMP VALUES('" & Request.ServerVariables("REMOTE_ADDR") & "','" & REQUEST("CARD_NO") & "','"
			SQL = SQL & REQUEST("CARD_NAME") & "'," &  REQUEST("CARD_PRICE_A") & ","
			SQL = SQL & REQUEST("CARD_PRICE") & ",'" & REQUEST("CARD_UNIT") & "',"
			SQL = SQL & REQUEST("NUMBER") & "," & REQUEST("NUMBER") * REQUEST("CARD_PRICE") & ",#"
			SQL = SQL & DATE & "#)"
			CONN.Execute (SQL)
		END IF
	RS.Close 
END IF	

IF REQUEST("ACT") = "确定更改" THEN
DIM LK(100)
	'有删除的操作
	CAOZUO = TRIM(REQUEST("CARD_DEL"))
		POP = INSTR(CAOZUO,",")
		I = 0
		WHILE POP >0
			LK(I) = TRIM(MID(CAOZUO,1,POP-1))
			CAOZUO = TRIM(MID(CAOZUO,POP+1))
			POP=INSTR(CAOZUO,",")
			I = I + 1
		WEND
		LK(I)=TRIM(MID(CAOZUO,1))
		FOR J = 0 TO I
		SQL = "DELETE * FROM ORDER_TEMP WHERE CARD_NO = '" & LK(J) & "' AND USER_NAME = '" & Request.ServerVariables("REMOTE_ADDR") & "'"
		CONN.Execute (SQL)
		NEXT
		
END IF
	
IF REQUEST("ACT") = "全部清空" THEN

		SQL = "DELETE FROM ORDER_TEMP WHERE USER_NAME = '" & Request.ServerVariables("REMOTE_ADDR") & "'"
		CONN.Execute (SQL)
END IF

'循环
   			
   			SQL = "SELECT * FROM ORDER_TEMP WHERE USER_NAME = '" & Request.ServerVariables("REMOTE_ADDR") & "'"
			RS.Open SQL,CONN,adOpenKeyset ,adLockReadOnly
				IF RS.RecordCount >0 THEN
%>
<html>
<head>
<title> 购物清单 </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="SYSTEM" content="CTG E-COMMERCE SYSTEM">
<meta name="DESIGNER" content="SWORD">
<meta name="PROGRAMMER" content="">
<meta name="Keywords" content="">
<meta name="DeSCRIPTion" content="">
<meta http-equiv="Content-Type" content="text/html; charset=GB2312">
<style type="text/css">
<!--
td { font-size: 9pt; }
a:hover {  color: #333333; text-decoration: underline}
-->
</style>
<link rel="stylesheet" href="../news%5B1%5D.css">
</head>
 <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0">
<script language="javaSCRIPT" src="../include/bqz_ip_fun.js"></script>
<form name="formCart" method="post" action="order_bqz.asp" language=javascript class="stylebigword">
  <table width="778" border="0" cellspacing="0" cellpadding="0">
    <tr> 
      <td width="160"><img src="../images/logo.gif" width="160" height="40"> </td>
      <td valign="middle" width="503"> 
        <div align="center"> 
          <div align="center"><!--webbot bot="HTMLMarkup" startspan --><iframe src="../banner.htm" width="468" height="40" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="NO"></iframe><!--webbot 
bot="HTMLMarkup" endspan --> </div>
        </div>
      </td>
      <td width="115"> 
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td height="20" width="29%"> 
              <div align="center"><img src="../images/ver.gif" width="16" height="16"></div>
            </td>
            <td height="20" width="71%" valign="bottom"><font color="#FFFFFF"><a href="../sales/order_bqz.asp" target="_blank">购物车/结帐</a></font></td>
          </tr>
          <tr> 
            <td height="20" width="29%"> 
              <div align="center"><img src="../images/shouquan.gif" width="16" height="16"></div>
            </td>
            <td height="20" width="71%" valign="bottom"><font color="#FFFFFF"><a href="../member/login.asp" target="_blank">订单查询</a></font> 
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
  <table width="778" border="0" cellspacing="0" cellpadding="0">
    <tr> 
      <td><img src="../images/guide.gif" width="778" height="53" usemap="#Map2" border="0"><map name="Map2"><area shape="rect" coords="486,31,551,54" href="../member/member_register.asp" target="_blank"><area shape="rect" coords="551,31,619,57" href="../member/login.asp" target="_blank"><area shape="rect" coords="618,31,685,58" href="../buyway.htm" target="_blank"><area shape="rect" coords="684,31,757,57" href="../liansuo.htm"><area shape="rect" coords="16,7,68,40" href="../default.htm"><area shape="rect" coords="80,7,144,40" href="../search/sub_default.asp?myplate=sex_baojian&amp;Class=%D0%D4%B1%A3%BD%A1%C6%B7&amp;Zlb=%D0%D4%B1%A3%BD%A1%C6%B7"><area shape="rect" coords="156,8,221,40" href="../search/sub_default.asp?myplate=sex_qiju&amp;Class=%D0%D4%B0%AE%C6%F7%BE%DF&amp;Zlb=%D0%D4%B0%AE%C6%F7%BE%DF"><area shape="rect" coords="232,7,296,40" href="../search/sub_default.asp?myplate=sex_vcd&amp;Class=%D3%B0%B5%FA&amp;Zlb=%D3%B0%B5%FA"><area shape="rect" coords="306,8,371,40" href="../search/sub_default.asp?myplate=sex_zbyx&amp;Class=%D5%ED%B1%DF%D3%CE%CF%B7&amp;Zlb=%D5%ED%B1%DF%D3%CE%CF%B7"><area shape="rect" coords="383,7,449,41" href="../search/sub_default.asp?myplate=sex_sjzm&amp;Class=%C9%CC%BC%D2%D7%A8%C2%F4&amp;Zlb=%C9%CC%BC%D2%D7%A8%C2%F4"></map></td>
    </tr>
  </table>
  <br>
  <br>
  <table width="500" border="0"  align="center" cellpadding="0" cellspacing="1" bgcolor="#9999FF">
    <tr  align="center" bgcolor="#66CCFF" > 
      <td colspan="5" height="20">购 物 车</td>
    </tr>
    <tr  align="center" bgcolor="#FFFFFF" > 
      <td height="20">商品名称</td>
      <td height="20">优惠价(元)</td>
      <td height="20">订购数量</td>
      <td height="20">小计(元)：</td>
      <td height="20">删除</td>
    </tr>
    <%
   		
				DO WHILE NOT RS.EOF 
	
   	    	 %> 
    <tr align='center' bgcolor="#FFFFFF"> 
      <td align=left height="20"> 
        <div align="center"><a href='/sales/detail.asp' target="_blank" onClick="javascript:window.close();"><%=RS("CARD_NAME")%></a></div>
      </td>
      <td height="20"><%=RS("CARD_PRICE_A")%></td>
      <td height="20"> 
        <input type="text" size="3" name="<%=RS("CARD_NO")%>" value="<%=RS("CARD_NUMBER")%>" onChange="return isInt(this.value,'数量')" class="stedit">
      </td>
      <td height="20"><%=RS("CARD_TOTAL")%></td>
      <td height="20"> 
        <input type="checkbox" name="CARD_DEL" value="<%=RS("CARD_NO")%>">
      </td>
    </tr>
    <%
				TOTAL = TOTAL + RS("CARD_TOTAL")
				RS.MoveNext 
				LOOP
				
		%> 
    <tr align="center" bgcolor="#FFFFFF"> 
      <td colspan="2" height="20">&nbsp;</td>
      <td height="20">总计(元)：</td>
      <td height="20"><font color="#ff0000"><%=TOTAL%></font></td>
      <td height="20">&nbsp; </td>
    </tr>
  </table>
  <br>
  <script>
		function checksum() {
			if (<%=TOTAL%><80) {
				alert("对不起，购物的最小金额是￥80，谢谢合作！");
				return false;
				}
				window.location='order_buy.asp?buy=yes';
		}
		</script>
		
  <table width="500"  border="0" cellpadding=2 cellspacing=0 align="center" class="styleword">
    <tr width="100%" align="center" > 
      <td width="100%" align="center"> 
        <input type="hidden" name="username" value="<%=Request.Cookies ("USER_NAME")%>">
        <input type="button" value="去收银台" onclick="javascript:return checksum();"  name="button" class="stbtm">
        <input type="submit" name="act" value="全部清空" onClick="return window.confirm('您确信要清空购物车中的所有商品吗？')" class="stbtm">
        <input type="submit" name="act" value="确定更改" class="stbtm">
        <input type="button" value="继续购物" language=javascript onClick="javascript:window.close()" name="button" class="stbtm">
      </td>
    </tr>
  </table>
  <br>
  <br>
  <table width="500" border="0" cellspacing="0" cellpadding="0" align="center">
    <tr>
      <td>
        <p>——美慎成人用品购物中心最低消费为<font color="#FF0033">80元，</font>每笔订单的总金额须大于80元</p>
        <p>——如选购商品结束，请按“去收银台”提交商品订单</p>
        <p>——需修改商品订购数量或删除某商品的订购，在修改数字或点中删除后按“确定更改”即可</p>
        <p>——需订购多种商品，只需要按“继续购物”即可</p>
        </td>
    </tr>
  </table>
  <br>
  <br>
  <table width="778" border="0" cellspacing="0" cellpadding="0" height="20">
    <tr bgcolor="#7FE7FF"> 
      <td colspan="2"> 
        <div align="center"> 网上购物步骤=> 选购商品-> 加入购物车-> 去收银台->加入会员-> 会员登录-> 选择付款配送方式-> 
          完成支付-> 购物完成 </div>
      </td>
    </tr>
  </table>
  <table width="778" border="0" cellspacing="0" cellpadding="0" align="center">
    <tr> 
      <td width="21"><img src="../images/img/gwzn.gif" width="30" height="82"></td>
      <td width="739"> 
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td height="20" width="31%"> 
              <div align="center"><b><a href="../dingou-fangshi.htm" target="_blank">订 
                购 方 式 <img src="../images/img/gwzn1.gif" border="0" width="11" height="6"></a></b></div>
            </td>
            <td height="20" width="23%"> <b><a href="../peisong-fangshi.htm" target="_blank">配 
              送 方 式 <img src="../images/img/gwzn1.gif" width="11" height="6" border="0"></a></b></td>
            <td height="20" width="23%"> <b><a href="../fukuan-fangshi.htm" target="_blank">付 
              款 方 式 <img src="../images/img/gwzn1.gif" width="11" height="6" border="0"></a></b></td>
            <td height="20" width="23%"> <b><a href="../fuwu-baozheng.htm" target="_blank">服 
              务 保 证 <img src="../images/img/gwzn1.gif" width="11" height="8" border="0"></a></b></td>
          </tr>
          <tr> 
            <td rowspan="4" width="31%"> 
              <div align="center"><img src="../images/img/new4.gif" width="8" height="8"> 
                <a href="../dingou-fangshi.htm#1" target="_blank">网 上 订 购</a> 
                <br>
                <img src="../images/img/new4.gif" width="8" height="8"> <a href="../dingou-fangshi.htm#2" target="_blank">电 
                话 订 购</a> <br>
                <img src="../images/img/new4.gif" width="8" height="8"> <a href="../dingou-fangshi.htm#3" target="_blank">邮 
                寄 订 购</a> <br>
                <img src="../images/img/new4.gif" width="8" height="8"> <a href="../dingou-fangshi.htm#4" target="_blank">传 
                真 订 购</a> </div>
            </td>
            <td rowspan="4" width="23%"> <img src="../images/img/new4.gif" width="8" height="8"> 
              <a href="../peisong-fangshi.htm#1" target="_blank">送 货 上 门</a> <br>
              <img src="../images/img/new4.gif" width="8" height="8"> <a href="../peisong-fangshi.htm#2" target="_blank">货 
              到 付 款</a> <br>
              <img src="../images/img/new4.gif" width="8" height="8"> <a href="../peisong-fangshi.htm#3" target="_blank">普 
              通 邮 寄</a> <br>
              <img src="../images/img/new4.gif" width="8" height="8"> <a href="../peisong-fangshi.htm#4" target="_blank">EMS 
              特 快 专 递</a> </td>
            <td rowspan="4" width="23%"> <img src="../images/img/new4.gif" width="8" height="8"> 
              <a href="../fukuan-fangshi.htm#1" target="_blank">货 到 付 款</a> <br>
              <img src="../images/img/new4.gif" width="8" height="8"> <a href="../fukuan-fangshi.htm#2" target="_blank">邮 
              政 汇 款</a> <br>
              <img src="../images/img/new4.gif" width="8" height="8"> <a href="../fukuan-fangshi.htm#3" target="_blank">银 
              行 汇 款</a> </td>
            <td rowspan="4" width="23%"> 
              <p><img src="../images/img/new4.gif" width="8" height="8"> <a href="../fuwu-baozheng.htm#1" target="_blank">隐 
                私 保 护</a> </p>
              <p> <img src="../images/img/new4.gif" width="8" height="8"> <a href="../fuwu-baozheng.htm#2" target="_blank">商 
                品 退 换</a> </p>
            </td>
          </tr>
          <tr> </tr>
          <tr> </tr>
          <tr> </tr>
        </table>
      </td>
    </tr>
  </table>
  <table width="778" border="0" cellspacing="0" cellpadding="0" height="20">
    <tr> 
      <td width="160" bgcolor="#9966FF"> 
        <div align="center"><font color="#FFFFFF">欢迎光临美慎成人用品商城</font></div>
      </td>
      <td bgcolor="#66CCFF"> 
        <div align="center"><a href="/default.asp">首 页</a> | <a href="/about.htm">关于我们</a> 
          | <a href="/ad.htm">广告业务</a> | <a href="../contact.htm">联系我们</a> | <a href="../buyway.htm" target="_blank">购物指南</a> 
          | <a href="/liansuo.htm" target="_blank">加盟连锁店</a><span class=channel style="FONT-SIZE: 9pt"> 
          |</span><a href="mailto:sales@mensun.com"> 批发合作</a></div>
      </td>
    </tr>
  </table>
  <table width="778" border="0" cellspacing="0" cellpadding="0">
    <tr> 
      <td colspan="2" height="45" > 
        <p align="center">Copyright 2000 - 2001 MENSUN.com, All Rights Reserved 
          <br>
          本站由 上海美慎科技发展有限公司 制作</p>
      </td>
    </tr>
  </table>
</form>
<%
			ELSE
			%> 
</body>
</html>
 

			<%
			END IF
			RS.Close 
			%>
			