<!--#include file="check.asp"-->
<%

Call hrPower(2.3,0)
dim action
action=request.QueryString("action")
if action="xiangxi" then
id = Request("ID")

If id = "" Then
	Response.Write("<script>alert('参数错误！');history.back();</script>")
	response.End()
End If

	Set prs = Conn.Execute("Select * from mobile1 where ID="&ID)
		  If not (prs.Eof and prs.Bof) Then

%>


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Pragma" content="no-cache"> 
<meta http-equiv="Cache-Control" content="no-cache"> 
<meta http-equiv="Expires" content="0"> 
<title>订单详细信息</title>
<style type="text/css">
<!--
.STYLE1 {font-size: 16px}
-->
</style>
<script>
document.onkeydown=function(){if(event.keyCode==27){window.close();}}
function Cancel(){
	window.close();
}
</script>
</head>


<body>

  <table width="363" height="61" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#666666">
	    <tr>
      <td width="124" height="1" align="right" bgcolor="#E9E9E9">商户名：</td>
      <td width="220" height="1" align="left" bgcolor="#ffffff"><%=prs("username")%></td>
    </tr>
	    <tr>
      <td width="124" height="1" align="right" bgcolor="#E9E9E9">分区ID：</td>
      <td width="220" height="1" align="left" bgcolor="#ffffff"><%=prs("wooolid")%></td>
    </tr>
    <tr>
      <td width="124" height="1" align="right" bgcolor="#E9E9E9">玩家帐号：</td>
      <td width="220" height="1" align="left" bgcolor="#ffffff"><%=prs("number")%></td>
    </tr>
	    <tr>
      <td width="124" height="1" align="right" bgcolor="#E9E9E9">商户订单号：</td>
      <td width="220" height="1" align="left" bgcolor="#ffffff"><%=prs("Num")%>                  </td>
    </tr>
	<tr>
      <td width="124" height="1" align="right" bgcolor="#E9E9E9">充值卡号：</td>
      <td width="220" height="1" align="left" bgcolor="#ffffff"><%=prs("usercode")%></td>
    </tr>
	<tr>
      <td width="124" height="1" align="right" bgcolor="#E9E9E9">充值卡密码：</td>
      <td width="220" height="1" align="left" bgcolor="#ffffff"><%=prs("usercode2")%></td>
    </tr>
	<tr>
      <td width="124" height="1" align="right" bgcolor="#E9E9E9">订单金额：</td>
      <td width="220" height="1" align="left" bgcolor="#ffffff"><%=zero(formatnumber(prs("Price")))%></td>
    </tr>
	<tr>
      <td width="124" height="1" align="right" bgcolor="#E9E9E9">实付金额：</td>
      <td width="220" height="1" align="left" bgcolor="#ffffff"><%=zero(formatnumber(prs("okPrice")))%></td>
    </tr>
	<tr>
	      <td height="1" align="right" bgcolor="#E9E9E9">提交时间：</td>
	      <td height="1" align="left" bgcolor="#ffffff"><%=prs("time")%></td>
    </tr>
	  <tr>
      <td width="124" height="1" align="right" bgcolor="#E9E9E9">通道系统备注：</td>
      <td width="220" height="1" align="left" bgcolor="#ffffff"><%=prs("des")%></td>
    </tr>
	  <tr>
      <td width="124" height="1" align="right" bgcolor="#E9E9E9">提交者IP：</td>
      <td width="220" height="1" align="left" bgcolor="#ffffff"><%=prs("ip")%></td>
    </tr>
	  <tr>
      <td width="124" height="1" align="right" bgcolor="#E9E9E9">提交者IP地址：</td>
      <td width="220" height="1" align="left" bgcolor="#ffffff"><%=showCountry(""&prs("ip")&"") %></td>
    </tr>
	  <tr>
      <td width="124" height="1" align="right" bgcolor="#E9E9E9">订单状态：</td>
      <td width="220" height="1" bgcolor="#ffffff">
	  <%
if prs("stat")=1 or prs("stat2")=1 then

	num=prs("num")
	set rsd=server.CreateObject("adodb.recordset")
	rsd.open "select * from MirMoUrl1 where num='"&num&"'",conn,1,1
	if rsd.eof or rsd.bof then
	result="<font color=blue>定单失败 无发货记录</font>"
	else

	If rsd("flag")<>1 then
	result="<font color=#339900>发货失败:</font><font color=red>"&rsd("message")&"</font>"
	'result=rsd("flag")
	else
	result="<font color=blue>发货成功</font>"
	end if

	end if

response.write "<font color=blue>成功</font>"
else 
response.write "<font color=red>失败</font>" 
	result="<font color=blue>定单失败 无发货记录</font>"
end if
%>
		</td>
    </tr>
	  <tr>
      <td width="124" height="1" align="right" bgcolor="#E9E9E9">订单发送状态：</td>
      <td width="220" height="1" align="left" bgcolor="#ffffff"><%=result%></td>
    </tr>

  </table>



</body>
</html>



<%
	response.End()
			Else
	Response.Write("非此商户定单")
	response.End()
			End if

end if



upline=request.QueryString("upline")
Nowpage=cint(request.QueryString("page"))
id=cint(request.QueryString("id"))
upline=request("upline")
startdate=request("startdate")
if startdate="" or isnull(startdate) then startdate=date()
enddate=request("enddate")
if enddate="" or isnull(enddate) then enddate=date()
wanjia=request("wanjia")
numid=request("numid")
kaid=request("kaid")
Pname = cint(Request("Pname"))


%>



<!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>
<link href="images/main.css" rel="stylesheet" type="text/css" media="all" />
<script src="js/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
<script>var   AutoRefresh=setTimeout('window.location.href=window.location.href',30000);</script>
</head>
<!--#include file="top.asp"-->

<script language="javascript">
try{
    var nav="H03";
    var subnav="L0302";
	
    document.getElementById(nav).className="current";
    document.getElementById(subnav).className="first current";
    document.getElementById(subnav).parentNode.parentNode.style.display="block";

}catch(e){
	document.getElementById("H03").className="current";
}
</script>
<div id="systime"><p id="servertime"></p></div>
<div id="mainBody" >

<div class="space">&nbsp;</div>
<div class="list">

<script   language="JavaScript">   
  function   ValidateInput()   
  {   

      document.form1.submit();   
      document.form1.Submit.disabled=true;   
  }   
  </script> 


<table class="listtable">

             <form name="form1" method="get" action="send.asp">
<tr>
              <td height="30" colspan="13" align="center">商户名&nbsp;&nbsp;
                <input name="upline" type="text" class="inputbox" id="upline" value="<%=upline%>" size="10"><input name="action" type="hidden" value="search">
玩家名&nbsp;&nbsp;
                <input name="wanjia" type="text" class="inputbox" id="wanjia" value="<%=wanjia%>" size="10">
&nbsp;&nbsp;&nbsp;开始时间&nbsp;&nbsp;
<input name="startdate" type="text" class="inputbox" id="startdate" size="10" value="<%=startdate%>" onClick="WdatePicker()" readonly>
&nbsp;&nbsp;&nbsp;&nbsp;结束时间&nbsp;&nbsp;
<input name="enddate" type="text" class="inputbox" id="enddate" value="<%=enddate%>" size="10" onClick="WdatePicker()" readonly> 
<br>
&nbsp;&nbsp;&nbsp;&nbsp;通  道&nbsp;&nbsp;
                            <select name="Pname">
                              <%Call payoption(Pname)%>
                          </select>
&nbsp;&nbsp;&nbsp;&nbsp;订单号&nbsp;&nbsp;
<input name="numid" type="text" class="inputbox" id="numid" value="<%=numid%>" size="20">
&nbsp;&nbsp;&nbsp;&nbsp;卡号&nbsp;&nbsp;
<input name="kaid" type="text" class="inputbox" id="kaid" value="<%=kaid%>" size="20">
<input type="button" name="Submit" onClick="JavaScript:ValidateInput();" value="立即查询" id="Submit" /></td>
             </td>
			 
              </tr></form>
</table>



<table class="listtable">
  <thead>
    <tr>
      <th scope="col">商户名</th>
	  <th scope="col">分区ID</th>
            <th scope="col">玩家名</th>
            <th scope="col">操作时间</th>
            <th scope="col">订单号</th>
            <th scope="col">卡号</th>
            <th scope="col">所走通道</th>
            <th scope="col">订额</th>
            <th scope="col">实额</th>
            <th scope="col">通道处理信息</th>
            <th scope="col">操作</th>
    </tr>
  </thead>
  <tbody> 



           <%
		  

		   searchstr=""
		   if upline<>"" then searchstr="upline='"&upline&"'"

		   if Pname<>"0" then
		   		if searchstr<>"" then searchstr = searchstr & " and "
				searchstr=searchstr&" port="&Pname&" "
		   end if

		   if isdate(startdate) then 
		      if not searchstr="" then searchstr=searchstr+" and "
 		     searchstr=searchstr+"date >= '"&startdate&"'"
		   end if

		   if isdate(enddate) then 
		      if not searchstr="" then searchstr=searchstr+" and "
 		      searchstr=searchstr+"date <= '"&enddate&"'"
		   end if

			if wanjia<>"" then 
		      if not searchstr="" then searchstr=searchstr+" and "
 		      searchstr=searchstr+"number='"&wanjia&"'"
		   end if

			if numid<>"" then 
		      if not searchstr="" then searchstr=searchstr+" and "
 		      searchstr=searchstr+"Num='"&numid&"'"
		   end if

			if kaid<>"" then 
		      if not searchstr="" then searchstr=searchstr+" and "
 		      searchstr=searchstr+"usercode='"&kaid&"'"
		   end if




		   if not searchstr="" then searchstr=" where "+searchstr	
		   if request("action")="search" then 
		   			set Rs=GrateRs("Select * from mobile1"&searchstr&" order by id desc",1)
		   		else
					set Rs=GrateRs("Select * from mobile1"&searchstr&" order by id desc",1)

		   end if

		   Rs.PageSize=60
		   if not Rs.eof then 
		   If Nowpage=0 then Nowpage=1
		   Rs.AbsolutePage=Nowpage 
		   i=1
		   do while not Rs.eof and i<=Rs.pagesize
		   %>
<%if i mod 2 =0 then%>
         <tr class="listtr1" >
<%else%>
         <tr class="listtr2" >
<%end IF%>
              <td><%=Rs("upline")%></td>
              <td><%=Rs("wooolid")%></td>
              <td><%=Rs("number")%></td>
              <td><%=Rs("time")%></td>
              <td><%=Rs("Num")%></td>
              <td><%=Rs("usercode")%></td>
              <td><%=Rs("Pname")%></td>
              <td><%=Rs("price")%></td>
              <td><%=Rs("Okprice")%></td>
			<%
			select case Rs("des")
			case "未付"
			 response.write("<td><font color=#FE2121>未付</font></td>")
			case "等待处理"
			 response.write("<td><font color=##0000FF><strong>等待处理</strong></font></td>")
			case "支付失败"
			 response.write("<td><font color=#959595>支付失败</font></td>")
			case "支付成功"
			 response.write("<td><font color=#339900>支付成功</font></td>")
			case else
			 response.write("<td><DIV STYLE=""width: 120px;overflow: hidden; text-overflow:ellipsis""><NOBR><strong>"&Rs("des")&"</strong></NOBR></DIV></td>")
			end select
			%>
              <td><a href="send.asp?action=xiangxi&id=<%=Rs("id")%>" target="_blank">详细</a></td>
            </tr>
			<%
		   i=i+1
		   Rs.movenext
		   loop
		  %>
<tr onmouseover="this.oldcolor=this.style.backgroundColor;this.style.backgroundColor='infobackground'" onmouseout="this.style.backgroundColor=this.oldcolor" style="color:#284775;background-color:White;">
              <td height="26" colspan="13">&nbsp;<strong>翻页: :</strong>
                <%
  myurl="send.asp?action=search&upline="&upline&"&startdate="&startdate&"&enddate="&enddate&"&wanjia="&wanjia&"&Pname="&Pname&"&numid="&numid&"&kaid="&kaid&"&"
  response.write("共："&Rs.recordcount&"条记录，共:"&Rs.PageCount&"页,"&Rs.PageSize&"条/页,第"&NowPage&"页&nbsp;")
  response.write("<a href='"&myurl&"page=1'>"&"首页</a>&nbsp;")
  if NowPage>1 then response.write("<a href='"&myurl&"page="&Nowpage-1&"'>上一页</a>&nbsp;")
  if NowPage<Rs.PageCount then response.write("<a href='"&myurl&"page="&Nowpage+1&"'>下一页</a>&nbsp;")
  response.write("<a href='"&myurl&"page="&Rs.PageCount&"'>尾页</a>&nbsp;")
		%>
                &nbsp;</td>
            </tr>
			  <%else%>
<tr onmouseover="this.oldcolor=this.style.backgroundColor;this.style.backgroundColor='infobackground'" onmouseout="this.style.backgroundColor=this.oldcolor" style="color:#284775;background-color:White;">
              <td height="26" colspan="13">对不起,无记录!</td>
              </tr>
			  <%end if%>
        

          </table>
       </td>
      </tr>
	  

    </table></td>
  </tr>
</table>
</body>
</html>
<%
call DBConnEnd
%>