<!-- #include file="include/adovbs.inc" -->
<!-- #include file="include/dataconn.asp" -->
<!-- #include file="include/checksession.asp" -->
<%
Response.Buffer =false
Response.Expires=-1


content=rtrim(ltrim(Request("findcontent")))'查找的关键字
set HyRs=server.CreateObject("adodb.recordset")


if len(content)=0 then '判断属于查找还是列出所有信息
	sql = "select HyPickupMoneyLog.*,HyMoneyAccount.HyMoneyAccount from HyPickupMoneyLog "
	sql =sql & " left join HyMoneyAccount on HyMoneyAccount.Hynumber=HyPickupMoneyLog.HyNumber"
	sql =sql & " order by HyPickupMoneyLog.id desc"
else
	sql ="select HyPickupMoneyLog.*,HyMoneyAccount.HyMoneyAccount from HyPickupMoneyLog "
	sql =sql & "left join HyMoneyAccount on HyMoneyAccount.Hynumber=HyPickupMoneyLog.HyNumber"
	sql=sql & " where HyPickupMoneyLog.HyNumber like '%" & content & "%'  order by HyPickupMoneyLog.ID desc"
end if
'
'Response.Write sql
'Response.End 
	HyRs.Open sql,conn
	j=HyRs.RecordCount 


%>
<html>
<head>
<meta NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<link rel="stylesheet" href="include/e1.css" type="text/css">
</head>
<script>
	function openwin(page,size)
	{
		window.open(page,"newuser","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width="+ size);
	}
	function makesure()
	{
		return(confirm("你确认要进行此操作吗？"))
	}

</script>
<body leftmargin="10" topmargin="10" marginwidth="0" marginheight="0">

<form method="post" action="HyPickupMoneyLog.asp" id="form1" name="form1">
  <table width="600" border="0" height="21" cellpadding="0" cellspacing="0">
    <tr> 
      <td> 
        <div align="center">
          
         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
          查找：<input id="findcontent" name="findcontent" value="输入需要查找的关键字" size="20" onFocus="this.value=''">
          <input type="image" value="submit" src="Image/027.gif" id="image1" name="image1">
        </div>
      </td>
    </tr>
  </table>
  </form>
<%
    if j>0 then
    dim i 
    i=1
    const pagesize=15
           
    HyRs.PageSize = pagesize
    total=HyRs.PageCount 
	pageno=Request("pageno")
	if pageno="" then pageno=1
    if not isnumeric(pageno) and pageno<>"" then
	 %>
<script>alert("请输入正确的页码");
		window.history.back();</script>
<%Response.End
	End if
	if (pageno-1)*pagesize>=j then
        if (j mod pagesize)=0 then
            pageno= j \ pagesize
        else
            pageno= j \ pagesize + 1
       end if
    end if		
	if pageno<1 then 
	 %>
<script>alert("页码数不能小于１");
		window.history.back();</script>
<%Response.End
	End if	
	if (pageno>65535) then
	%>
<script>alert("页码数不能大于总数！");
		window.history.back();</script>
<%Response.End 
	end if
	
	
	if (clng(pageno)>clng(total)) then %>
<script>alert("页码数不能大于总数！");
		window.history.back();</script>
<%	
   Response.End 
	end if
    pageno=cint(pageno)	
%>


<table border="1" cellpadding="0" cellspacing="0" width="98%" bordercolordark="#FFFFFF" bordercolorlight="#AAAAAA">
  <tr class="td3"> 
    <td width="9%"> <div align="center"><font color="#FFFFFF">行</font></div></td>
    <td width="13%"> <div align="center"><font color="#FFFFFF">提款帐号</font></div></td>
    <td width="13%"> <div align="center"><font color="#FFFFFF">提款金额</font></div></td>
    <td width="13%"> <div align="center"><font color="#FFFFFF">帐号余额</font></div></td>
    <td width="13%"> <div align="center"><font color="#FFFFFF">申请日期</font></div></td>
    <td width="13%"> <div align="center"><font color="#FFFFFF">状态</font></div></td>
    <td colspan="2"> <div align="center"><font color="#FFFFFF">处理</font></div></td>
    <td width="10%"> <div align="center"><font color="#FFFFFF">处理日期</font></div></td>
  </tr>
  <%
    HyRs.absolutepage=pageno     
    dim x
	i=1
    x=2
    while (not HyRs.eof) and (i<=pagesize) 
      if x mod 2 then
 %>
  <tr class="td1"> 
    <%
 else
 %>
  <tr height="25"> 
    <%
 end if
 %>
    <td> <% =i%> </td>
    <td><%=HyRs("HyNumber")%>&nbsp;</td>
    <td><%=HyRs("PickupCount")%>&nbsp</td>
    <td><%=HyRs("HyMoneyAccount")%>&nbsp</td>
    <td> <% =HyRs("PickupDate")%> &nbsp;</td>
    <td> <% if HyRs("PickupStatus")=0 then%> <font color="#0000FF">处理中</font> <%elseif HyRs("PickupStatus")=1 then%> <font color="#009900">已支付</font> <%elseif HyRs("PickupStatus")=2 then%> <font color="#FF0000">拒绝支付</font> <%end if%> &nbsp;</td>
    <td width="8%"> <div align="center">
	<% if HyRs("PickupStatus")=0 then%>
	<a href="UpdatePickupMoney.asp?HyNumber=<%=HyRs("HyNumber")%>&PickupCount=<%=HyRs("PickupCount")%>&id=<%=HyRs("id")%>&pay=1&pageno=<%=pageno%>&amp;findcontent=<%=content%>">支付</a>
	<%end if%>&nbsp;</div></td>
    <td width="8%"><div align="center">
		<% if HyRs("PickupStatus")=0 then%>
		<a href="UpdatePickupMoney.asp?HyNumber=<%=HyRs("HyNumber")%>&PickupCount=<%=HyRs("PickupCount")%>&id=<%=HyRs("id")%>&pay=2&pageno=<%=pageno%>&amp;findcontent=<%=content%>">拒绝支付</a>
		<%end if%>&nbsp;</div></td>
    <td> <% =HyRs("ApprovedDate")%> &nbsp;</td>
    <%
	HyRs.movenext
	i=i+1
	x=x+1
	wend %>
  </tr>
  <%
  else
	Response.Write "没有提款申请！<a href='javascript:history.back()'>返回</a>"
 end if%>
</table>
<p></p>
<%if j>0 then%>
<table align="center">
  <tr> 
    <form name="thisform1" method="Post" action="HyPickupMoneyLog.asp?findcontent=<%=content%>">
      <td>到第 
        <input type="text" name="pageno" value="<% =pageno%>" size="3">
        页<a onClick="javascript:thisform1.submit();">GO</a> </font></td>
    </form>
    <td>第 
      <% =pageno %>页
      /共 
      <% =total%>
      页</font></td>
    <% if pageno<=1 then %>
    <td><font color="#cccccc">首页</font></td>
    <td><font color="#cccccc">上一页</font></td>
    <% else %>
    <td><a href="HyPickupMoneyLog.asp?pageno=1&amp;findcontent=<%=content%>"><font face="Webdings" color="#FFFFFF">9</font>首页</font></a></td>
    <td><a href="HyPickupMoneyLog.asp?pageno=<%=pageno-1%>&amp;findcontent=<%=content%>">上一页</font></a></td>
    <%end if%>
    <% if pageno>=total then %>
    <td><font color="#cccccc">下一页</font></td>
    <td><font color="#cccccc">尾页</font></td>
    <%else%>
    <td><a href="HyPickupMoneyLog.asp?pageno=<%=pageno+1%>&amp;findcontent=<%=content%>">下一页</font></a></td>
    <td><a href="HyPickupMoneyLog.asp?pageno=<%=total%>&amp;findcontent=<%=content%>">尾页</font></a></td>
    <% end if%>
  </tr>
</table>
<%end if%>
</body>
</html>
