  <% 
	data_path="../../" 'ACC连接数据库路径，对SQL无效
	numid="131"
	dir="../err.asp" 
  %>
  <!--#include file="../../conn/conn.asp"-->
<!--#include file="../../inc/safe.asp"-->
  <!--#include file="../rolecheck.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<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">
<!--
.STYLE1 {
	font-size: 14px;
	font-weight: bold;
}
body,td,th {
	font-size: 9pt;
}
a:link,a:visited{text-decoration:none; color:#3399CC;}
a:hover{text-decoration:underline; color:#660000;}
.STYLE2 {color: #FF0000}
-->
</style>
</head>

<body>
<%
'------------------------
set rs=server.CreateObject("adodb.recordset")
sql="select * from yixiang_fq_order"
sql=sql&" order by ID"
rs.open sql,conn,1,1
'-------------------------------

msg_per_page=10 '定义每页显示记录条数
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="border:1px solid #3399CC;">
  <tr>
  

    <td>
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td height="35" colspan="6" align="center" style="border-bottom:1px dashed #6DA4E4;"><span class="STYLE1">会员订单管理</span></td>
        </tr>
        <tr>
          <td height="20" colspan="6" align="left" style="border-bottom:1px dashed #6DA4E4;"><span class="STYLE2">注意</span>：①删除操作不可逆且会直接影响到会员，请慎重处理。②作废订单指交易双方均已删除的订单</td>
        </tr>		
		<%
		 if rs.eof then
		    response.Write"<tr><td height='15' colspan='6' align='left' valign='top' style='border-bottom:1px solid #3399CC;'><a href='m_order.asp?action=fail'>作废订单</a>| <a href='m_order.asp?action=suc'> 有效订单</a> | <a href='m_fq_order.asp'>会员发起订单  </a> | <a href='m_order.asp'>所有订单</a>(<span class='STYLE2'>不含发起订单</span>) |  <a href='orderdel.asp?action=fail'>删除所有作废订单</a>(<span class='STYLE2'>不含发起订单</span>) | <a href='orderdel.asp?action=fqfaila'>删除作废会员发起订单</a></td></tr>"
		 	response.Write"<tr><td align=center height='40' valgin=middle><font color='red'>暂无订单</font></td></tr>"
			response.End
		 end if
		 OCount=rs.recordcount	
		%>
				<!--#include file="../../inc/headpage.asp"-->
        <tr>
          <td height="15" colspan="6" align="left" valign="top"><a href="m_order.asp?action=fail">作废订单 </a>| <a href="m_order.asp?action=suc">有效订单</a> | <a href="m_fq_order.asp">会员发起订单  </a> | <a href="m_order.asp">所有订单  </a> (<span class="STYLE2">不含发起订单</span>)|  <a href="orderdel.asp?action=fail">删除所有作废订单</a>(<span class="STYLE2">不含发起订单</span>) | <a href="orderdel.asp?action=fqfail">删除作废会员发起订单</a></td>
        </tr>
        <tr>
          <td width="15%" height="25" align="center" bgcolor="#6DA4E4">订单号</td>
		  <td width="15%" height="25" align="center" bgcolor="#6DA4E4">产品名称</td>
          <td width="14%" height="25" align="center" bgcolor="#6DA4E4">买家名称</td>
          <td width="11%" height="25" align="center" bgcolor="#6DA4E4">卖家名称</td>
          <td width="17%" height="25" align="center" bgcolor="#6DA4E4">订单状态</td>
          <td width="16%" height="25" align="center" bgcolor="#6DA4E4">操作</td>
        </tr>
		<%
			do while not rs.eof
			'--------------------------------------
			if rs("viewkey")=0 then
				tade="未查看"
			else
				tade="已查看"
			end if
			
			'------------------------------------
			if trim(rs("fqshow"))=0 and trim(rs("buyshow"))=0 then
				tade=tade&"/<font color=red>作废</font>"
			else
				tade=tade&"/<font color=red>有效</font>"
			end if
			
		 '---------------------------------------
		  buycomid=rs("buycom")
		  salecomid=rs("fqcom")
		  '---------------------------------------------
	
	'-----------------------------买家名称------------------------	  
		  set buycom=server.CreateObject("adodb.recordset")
		  sqlbuycom="select [user] from yixiang_corporation where ID="&buycomid&""
		  buycom.open sqlbuycom,conn,1,1
		  if not buycom.eof then
		  	comuser=buycom("user")
		  else
		    comuser="未知用户"
		  end if
   '-----------------------------卖家名称------------------------ 
		  set salecom=server.CreateObject("adodb.recordset")
		  sqlsalecom="select [user] from yixiang_corporation where ID="&salecomid&""
		  salecom.open sqlsalecom,conn,1,1
		  if not salecom.eof then
		  	Scomuser=salecom("user")
		  else
		    Scomuser="未知用户"
		  end if
		%>
        <tr onMouseOver="this.style.backgroundColor='#D7E3F3'" onMouseOut="this.style.backgroundColor='#ffffff'">
          <td height="25" align="center" style="border-bottom:1px solid #3399CC;"><%=rs("billno")%></td>
		  <td height="25" align="center" style="border-bottom:1px solid #3399CC; border-left:1px solid #3399CC;"><%=left(rs("hpmc"),6)%></td>
          <td height="25" align="center" style="border-bottom:1px solid #3399CC; border-left:1px solid #3399CC;"><%=comuser%></td>
          <td height="25" align="center" style="border-bottom:1px solid #3399CC; border-left:1px solid #3399CC;"><%=Scomuser%></td>
          <td height="25" align="center" style="border-bottom:1px solid #3399CC; border-left:1px solid #3399CC;"><%=tade%></td>
          <td height="25" align="center" style="border-bottom:1px solid #3399CC; border-left:1px solid #3399CC;"><a href=# onclick=javascript:window.open('fq_orderview.asp?id=<%=rs("id")%>','','top=50,left=120,width=457,height=450,scrollbars=yes')>查看</a> | <a href="orderdel.asp?action=fq&id=<%=rs("id")%>">删除</a></td>
        </tr>
		<%
			rs.movenext
			loop
		%>
		 <tr>
          <td colspan="7" align="center"><br /><b><%=listPages("m_fq_order.asp")%></b></td>          
        </tr>
      </table>
<%
salecom.close
buycom.close
rs.close
%>
    </td>
  </tr>
</table>
</body>
</html>

