<!--#include file="../../../conn/conn4.asp" -->
<!--#include file="member_check.asp" -->
<%
action=request.QueryString("action")
O_id=request.QueryString("O_id")
if action="del" then
conn.execute("delete from Orders where O_id="&O_id)
Response.Write"<script>alert('删除订单成功!');window.location='member_shop.asp';</script>"
end if
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>会员中心</title>
<style type="text/css">
			html {
				overflow:auto;
			}
			body {
			margin:0px;
				background-color: transparent; 
				font-size:12px;
				line-height:180%;
				font-family:"微软雅黑";
				
			}
			a{ font-size:12px; color:#000000; text-decoration:none;}
			a:hover {color:#0066ff;text-decoration: underline}
			a img {
	border:none;
}
</style>
</head>
<body>
<!--#include file="left.asp" -->
<div style="width:550px; float:left; padding-left:20px;">
<h2>购物车</h2>
<hr>
<table width="100%" border="1" bordercolor="#000000" style="border-collapse:collapse;">
<tr><td>商品名称</td><td>图片</td><td>单价</td><td>数量</td><td>总价</td><td>删除</td></tr>
<%
sql="select * from orders,buy where O_bid=B_id and O_member='"&M_login&"' and O_state=0 order by O_id desc"
set rs=Server.CreateObject("ADODB.RecordSet")
		rs.open sql,conn,1,1
		if not rs.eof then
		Do while Not rs.eof
		response.Write "<tr onmouseout='this.style.backgroundColor=""""' onmouseover='this.style.backgroundColor=""#F7F7F7""'><td>"&left(rs("B_title"),24)&"...</td><td><a href='../"&rs("B_pic")&"' target='_blank'><img src='../../../"&rs("B_pic")&"' height='30'></a></td><td>"&rs("O_price")&"</td><td>"&rs("O_num")&"</td><td><font color='red'><b>"&rs("O_num")*rs("O_price")&"</b></font></td><td><a href='member_order.asp?action=del&O_id="&rs("O_id")&"'><img src='img/icondel.gif'>删除</a></td></tr>"
		O_all=O_all+rs("O_num")*rs("O_price")
		if O_id<>"" then
		O_id=O_id&"|"&rs("O_id")
		else
		O_id=rs("O_id")
		end if
		rs.movenext
		loop
end if
rs.close
set rs=nothing

if O_all="" then
O_all=0
end if
%>
</table>
<hr>
<table width="100%" border="1" bordercolor="#000000" style="border-collapse:collapse;">
<tr onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#F7F7F7'"><td>姓名</td><td><%=M_name%></td><td><a href="member_edit.asp"><img src="img/iconedit.gif">修改</a></td></tr>
<tr onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#F7F7F7'" ><td>收货地址</td><td><%=M_add%></td><td><a href="member_edit.asp"><img src="img/iconedit.gif">修改</a></td></tr>
<tr onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#F7F7F7'"><td>手机号</td><td><%=M_mobile%></td><td><a href="member_edit.asp"><img src="img/iconedit.gif">修改</a></td></tr>
<tr onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#F7F7F7'" ><td>邮政编码</td><td><%=M_code%></td><td><a href="member_edit.asp"><img src="img/iconedit.gif">修改</a></td></tr>
</table>
<hr><font color="#FF0000" size="+1">总计：<%=O_all%>元</font>
<div align="right"><a href="../../../alipay/alipayapi.asp?O_id=<%=O_id%>" target="_blank"><img src="../../../image/payall.png"></a></div>
</div>
</body>
</html>