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

Call hrPower(2.2,0)
dim action
action=request.QueryString("action")


upline=request.QueryString("upline")
Nowpage=cint(request.QueryString("page"))
id=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>
</head>
<!--#include file="top.asp"-->


<script language="javascript">
try{
    var nav="H03";
    var subnav="L0301";
	
    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>

           <%
		  

		   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+"regdate >= '"&startdate&"'"
		   end if

		   if isdate(enddate) then 
		      if not searchstr="" then searchstr=searchstr+" and "
 		      searchstr=searchstr+"regdate <= '"&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 mobile"&searchstr&" order by id desc",1)
		   		else
					set Rs=GrateRs("Select * from mobile"&searchstr&" order by id desc",1)

		   end if







		   '总金额//////////////////////////////////////////
		   sqlInfot = "Select sum(price) as tp,sum(fencheng) as gmm from mobile "&searchstr&""	
		   set Rsp=GrateRs(sqlInfot,1)
		   if Rsp("tp")="" or isnull(rsp("tp")) then
		   tp=0
		   else
		   tp=rsp("tp")
		   gmm=rsp("gmm")
		   end if

 %>
<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.form2.submit();   
      document.form2.Submit.disabled=true;   
  }   
  </script>  

<table class="search_form">

<td align="right" width="100%">充值总金额： <font color="#FF0000"><b><%=formatnumber(tp)%></b></font>元 GM分成所得金额： <font color="#FF0000"><b><%=zero(formatnumber(gmm))%></b></font>元</font></td>
</tr></form></table>


<table class="listtable">
             <form name="form2" method="get" action="meber.asp">
<tr>
              <td height="30" colspan="11" 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">推广ID</th>
            <th scope="col">实付金额</th>
           <th scope="col">商户分成</th>
           <th scope="col">商户积分</th>
            <th scope="col">操作</th>
    </tr>
  </thead>
  <tbody> 





<%
		   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><%if Rs("state")=3 then response.write("<font color=red>")%><%=Rs("number")%></td>
              <td><%=Rs("regDate")&" "&Rs("regtime")%></td>
              <td><%=Rs("Num")%></td>
              <td><%=Rs("usercode")%></td>
              <td><%=Rs("usercode2")%></td>
              <td><%=Rs("Pname")%></td>
              <td><%=Rs("tuiguang")%></td>
              <td><%=Rs("price")%></td>
              <td><%=Rs("fencheng")%></td>
              <td><%=Rs("jifen")%></td>
              <td><a href="#" onClick="window.alert('注册IP为:<%=Rs("ip")%>')">来源</a>



<%select case Rs("state")
			   case 1
			     response.write("/<font color=red>已结</font>")
			   case else
			     'response.write("/<a href=""?action=delete&id="&Rs("id")&""" onClick=""return confirm('确定执行操作吗？')"">扣除</a>")
			   end select
			   %></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="11">&nbsp;<strong>翻页: :</strong>
                <%
  myurl="meber.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="11">对不起,还没有数据!</td>
              </tr>
			  <%end if%>
         





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

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