<!--#include file="../../../conn/conn4.asp" -->
<!--#include file="top.asp" -->
<%

M_login=session("M_login")

if M_login="" then
Response.Write"<script>alert('请先登录!');window.location='login.asp';</script>"
end if

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='order.asp';</script>"
end if

%>
<!DOCTYPE html> 
<html> 
<head> 
	<meta charset="gb2312" />
    <meta name="viewport" content="user-scalable=no,width=device-width" />
    <meta name="format-detection" content="telephone=no"/>
<title>订单记录-<%=title%></title>
<meta name="keywords" content="<%=keywords%>" />
<meta name="description" content="<%=content%>" />
    <link rel="stylesheet" href="style/mobile.css" /> 
    <script src="jquery/jquery-1.10.1.min.js"></script>    
    <script src="jquery/myjs.js"></script>    
</head> 
<body onResize="loadtop();loadmain();loadfoot();">
<script src="js/0.js"></script>
<script src="js/1.js"></script>

<div id="dvtopbg"><img src="images/bg_header.png" ></div>
<div id="dvtop" >
<p id="topback"><a href="javascript:history.go(-1);"><img src="images/ico_back.png"></a></p>
<p id="tophome"><a href="index.asp"><img src="images/ico_home.png"></a></p>
<p id="toplogo"><img onLoad="loadlogo(this);" id="tiglog" style="display:none;" src="../../../media/<%=C_mlogo%>" /></p>
</div>

<script>loadtop();</script>

<div id="dvmain">
<%

if split(GetBody(D_domain),"|")(1)="1" then
%>
<%else%>
<div align='center' style='margin:10px 10px 10px 10px;padding:5px 5px 5px 5px;border:1px solid #ff0000'><font color='red' size='+1'>您使用的为免费版！请尽快升级到商业授权版保证正常使用！</font></div>
<%
end if
%>
<table width="100%" border="1" bordercolor="#000000" style="border-collapse:collapse;">
<tr><td>商品名称</td><td>图片</td><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&"' 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
		if rs("O_state")=0 then
		O_state="未付款"
		O_pay="<a href='../../../alipay/alipayapi.asp?O_id="&rs("O_id")&"' target='_blank'><img src='../../../image/pay.png'></a>"
		end if
		if rs("O_state")=1 then
		O_state="未发货"
		O_pay="已付款"
		end if
		if rs("O_state")=2 then
		O_state="已发货(<a href='member_wuliu.asp?O_id="&rs("O_id")&"'>查物流</a>)"
		O_pay="<a href='OK.asp?O_id="&rs("O_id")&"'>确认/退款</a>"
		end if
		if rs("O_state")=3 then
		O_state="已确认"
		O_pay="已确认"
		end if
		if rs("O_state")=4 then
		O_state="已申请退款"
		O_pay="等待卖家处理"
		end if
		if rs("O_state")=5 then
		O_state="已退款"
		O_pay="交易结束"
		end if
		
		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>"&O_state&"</td><td>"&O_pay&"</td><td><a href='order.asp?action=del&O_id="&rs("O_id")&"'><img src='../admin/img/icondel.gif'>删除</a></td></tr>"
		rs.movenext
		loop
end if
rs.close
set rs=nothing
%>
</table>

</div>
	 
	 </div>
	 
	 <img onClick="this.style.width='0px';this.style.display='none';" id="imgpromptf88a0" style="z-index:999; position:absolute; display:none;"><script src="js/2.js"></script>
<script>loadmain();</script>
<div id="dvfoot"><ul><li><a id="aphone" href="tel:<%=C_mobile%>"><img src="images/butphone.jpg" /></a><a id="aemail" href="mailto:<%=C_email%>"><img src="images/butemail.jpg" /></a><a id="amap" href="map.asp"><img src="images/butmap.jpg" /></a><a id="ashare" onClick="shareopen();"><img src="images/butshare.jpg" /></a><a id="aleave" style="border:0px;" href="guestbook.asp"><img src="images/butleave.jpg" /></a></li></ul></div>
<script>loadfoot();</script>
</body>
</html>
