<!--#include file="inc/payconn.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>
<title>在线支付系统 - 订单查询</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link type="text/css" rel="stylesheet" href="css/reset.css" />
<link type="text/css" rel="stylesheet" href="css/main.css" />
</head>
<script language="JavaScript" type="text/javascript">
  function check()
  {
    if(form1.keyword.value=='')
	   {
	     alert('请填写查询关键字！');
		 return false;
	   }

  }
    </script>
<body>

<form name="form1" method="post" action="?action=search" id="form1" onsubmit="return check();">

<div class="aspNetHidden">

</div>
		<div style="margin:20px auto; width:95% !important; width: 1000px; max-width:1000px">
			<div>
				<span style="font-size:25px; line-height:25px; font-family:Microsoft Yahei">订单查询</span>
					&nbsp; 
				<span class="t3">(只能查询7天以内的数据)</span>
			</div>
			<div class="vspace"></div>

			<div id="searchConditions">
				<select name="id" id="id">
	<option value="num" <%if request("id")="num" then response.Write "selected"%>>系统订单号</option>
	<option value="usercode" <%if request("id")="usercode" then response.Write "selected"%>>充值卡号</option>

</select>
				<input name="keyword" value="<%=request("keyword")%>"  type="text" maxlength="24" id="keyword" style="width:160px;" /> &nbsp; &nbsp;


				<input type="submit" name="search" value="查询" id="search" class="button" style="width:70px;" />
			</div>
			<div class="lb"></div>
			<div class="lb"></div>

			<div class="gridwrap">
				<table class="grid">
					<thead>
						<th>时间</th>
						<th>系统订单号</th>
						<th>分区</th>
						<th>支付方式</th>
						<th>卡号</th>
						<th>帐号ID</th>
						<th>支付金额</th>
						<th>已付款?</th>
						<th>已发货?</th>
					</thead>
					





                <%
Action=trim(request("action"))
cid=trim(YeSqlStr(request.form("id"),3))
key=trim(YeSqlStr(request.Form("keyword"),3))

key=trim(YeSqlStr(request("keyword"),3))
cid=trim(YeSqlStr(request("id"),3))

if cid="1" then cid="num"

if cid="2" then cid="usercode" 


ComeIp = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If ComeIp = "" Then ComeIp = Request.ServerVariables("HTTP_Cdn-Src-Ip")
If ComeIp = "" Then ComeIp = Request.ServerVariables("REMOTE_ADDR")


if cid="" then cid="ip" 

if key="" then key=ComeIp 

	Call ConnectionDatabase()

%>
                <%

     set rss=server.CreateObject("adodb.recordset")
   rss.open "select top 60 *,(IsNull((select wooolname from l_woool where id=wooolid),'分区已删除')) as wname from mobile1 where "&cid&"='"&key&"' order by id desc",conn,1,1

   jl=rss.recordcount

  if jl=0 then
  %>
					<tr id="zero">
	<td colspan="9">没有符合条件的记录。</td>
</tr>
                <%
											else
  %>




                <%




											do while not rss.eof
    set rsd=server.CreateObject("adodb.recordset")
	rsd.open "select * from mobile where num='"&rss("num")&"'",conn,1,1
	if rsd.eof or rsd.bof then
	result="<span style='color:Red'>否</span>"
	else
	result="<span style='color:Green'>是</span>"
	end if
	set rsd=nothing


	set rsd=server.CreateObject("adodb.recordset")
	rsd.open "select * from MirMoUrl1 where num='"&rss("num")&"'",conn,1,1
	if rsd.eof or rsd.bof then
	result1="<span style='color:Red'>否</span>"
	else
	'result1="成功"
	If rsd("flag")<>1 then
	result1="<span style='color:Red'>否</span>"
	'result1=""&rsd("message")&""
	'result1=rsd("flag")
	else
	result1="<span style='color:Green'>是</span>"
	end if
	end if

											%>
							<tr class="alt">
                  <td bgcolor="#FFFFFF"><div align="center"><%=rss("time")%></div></td>
                  <td bgcolor="#FFFFFF"><div align="center"><%=rss("num")%></div></td>
                  <td bgcolor="#FFFFFF"><div align="center"><%=rss("wname")%></div></td>
                  <td bgcolor="#FFFFFF"><div align="center"><%=rss("Pname")%></div></td>
                  <td bgcolor="#FFFFFF"><div align="center"><%=rss("usercode")%></div></td>
                  <td bgcolor="#FFFFFF"><div align="center"><%=rss("number")%></div></td>
                  <td bgcolor="#FFFFFF"><div align="center"><%=rss("price")%></div></td>
                  <td bgcolor="#FFFFFF"><div align="center"><%=result%></div></td>
                  <td bgcolor="#FFFFFF"><div align="center"><%=result1%></div></td>
							</tr>
                  <%
											  rss.movenext
											  loop
											  end if
	%>
  


					
					<tr>
						<td colspan="10"><div id="p" class="p_left">
	<div class="p_navigates"><a class="aspNetDisabled p_current">1</a></div><div class="p_stat">页数: <span class="p_counter">1</span>/<span class="p_counter">1</span> &nbsp; &nbsp;记录数: <span class="p_counter"><%=jl%></span></div><div class="clear"></div>
</div></td>
					</tr>
				</table>
			</div>
		</form>
	</div>
	<div id="footer" style="text-align:center">
		<span id="copyright">Copyright  &copy; 2011 All Rights Reserved.</span>
	</div>
</body>
</html>



