<!--#include file="../../conn/conn.asp"-->
<!--#include file="../../conn/nosql.asp"-->
<!--#include file="../../conn/config.asp"-->
 <%
if session("user")="" then
response.write "<script language='javascript'>"
response.write "alert('您没还有登录，请登录后再访问本页！');"
response.write"this.location.href='/index.asp';</SCRIPT>"
response.end
end if
if session("id")="" then 
response.write "<script language='javascript'>"
response.write "alert('您没还有登录，请登录后再访问本页！');"
response.write"this.location.href='/index.asp';</SCRIPT>"
response.end
end if

%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>交易助手管理操作平台_<%=webname%></title>
<link rel="stylesheet" href="/css.css" type="text/css">
<style type="text/css">
<!--
.style1 {color: #FF0000}
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
</head>
<body onload=showadv();shenr()><!--#include file="../../top.asp"-->
<table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>&nbsp;</td>
    <td width="970"><table width="970"  border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td width="10"><img src="/img/m_left.gif" width="10" height="20"></td>
          <td width="950" bgcolor="#FFFFFF"></td>
          <td width="10"><img src="/img/m_right.gif" width="10" height="20"></td>
        </tr>
        <tr bgcolor="#FFFFFF">
          <td height="188" colspan="3"><table width="950"  border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td width="1" bgcolor="efefef"></td>
                <td width="200" height="77" valign="top"><!--#include file="../left.asp"--></td>
                <td width="1" bgcolor="efefef"></td>
                <td valign="top"><p>&nbsp;</p>
                    <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td height="30"> <a href="my_pay.asp">所有冲值记录</a>|<a href="my_pay.asp?action=1">已冲值成功记录</a>|<a href="my_pay.asp?action=2">未冲值成功记录</a></td>
  </tr>
</table>
<%
action=request("action")
set rs=server.createobject("adodb.recordset")
if action="" then
		rs.open "select * from snsn_pay where C_username='"&session("user")&"' order by C_date desc",conn,1,1
		elseif action=1 then
				rs.open "select * from snsn_pay where C_username='"&session("user")&"' and c_bankzt=1 order by C_date desc",conn,1,1
		elseif action=2 then
				rs.open "select * from snsn_pay where C_username='"&session("user")&"' and c_bankzt=0 order by C_date desc",conn,1,1
		elseif action=9 then
if isChkInteger(request("id")) then
id=request("id")
else
Response.Redirect ("../index.asp")
end if
				sql="delete from [snsn_pay] where C_username='"&session("user")&"' and id in ("&id&")"
				conn.execute sql
				response.Write "<script language='javascript'>alert('操作成功！');window.location.href='my_pay.asp';</script>"
                response.end
        else
				rs.open "select * from snsn_pay where C_username='"&session("user")&"' order by C_date desc",conn,1,1
end if
		if rs.recordcount=0 then 
		%>
<table width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
  <tr> 
    <td align=center>暂无冲值记录</td>
  </tr>
</table>
<%
		else
	  		rs.PageSize =30 '每页记录条数
			iCount=rs.RecordCount '记录总数
			iPageSize=rs.PageSize
    		maxpage=rs.PageCount 
    		page=request("page")
    
    if Not IsNumeric(page) or page="" then
        page=1
    else
        page=cint(page)
    end if
    
    if page<1 then
        page=1
    elseif  page>maxpage then
        page=maxpage
    end if
    
    rs.AbsolutePage=Page

	if page=maxpage then
		x=iCount-(maxpage-1)*iPageSize
	else
		x=iPageSize
	end if
	%>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#BBD7FF">
  <tr align="center" bgcolor="#e8f4ff"> 
    <td height=30>&nbsp;<strong>订单号</strong></td>
    <td><strong>冲值名称</strong></td>
    <td><strong>真实姓名</strong></td>
    <td><strong>冲值金额</strong></td>
    <td><strong>时间</strong></td>
    <td><strong>属性</strong></td>
    <td>删</td>
  </tr>
  <%
			For i=1 To x
			%>
  <tr align="center" bgcolor="#FFFFFF"> 
    <td height=30><%=rs("C_Merchant_oid")%></td>
    <td><%=rs("C_Merchant_shopname")%></td>
    <td><%=rs("C_Merchant_username")%></td>
    <td><%=rs("C_Merchant_amount")%></td>
    <td><%=rs("C_date")%></td>
    <td bgcolor="#FFFFFF"> 
      <%if rs("C_bankzt")=0 then%>
      失败 
      <%else%>
      <font color="#FF0000">成功</font> 
    <%end if%>    </td>
    <td bgcolor="#FFFFFF"><a href="?action=9&id=<%=rs("id")%>">删</a></td>
  </tr>
  <%
			rs.movenext
		    next
			%>
</table>
<br>
<%
		call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>")
		end if
		rs.close
		set rs=nothing
Sub PageControl(iCount,pagecount,page,table_style,font_style)
'生成上一页下一页链接
    Dim query, a, x, temp
    action = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")

    query = Split(Request.ServerVariables("QUERY_STRING"), "&")
    For Each x In query
        a = Split(x, "=")
        If StrComp(a(0), "page", vbTextCompare) <> 0 Then
            temp = temp & a(0) & "=" & a(1) & "&"
        End If
    Next

    Response.Write("<table " & Table_style & ">" & vbCrLf )        
    Response.Write("<form method=get onsubmit=""document.location = '" & action & "?" & temp & "Page='+ this.page.value;return false;""><TR>" & vbCrLf )
    Response.Write("<TD align=right>" & vbCrLf )
    Response.Write(font_style & vbCrLf )    
        
    if page<=1 then
        Response.Write ("首页 " & vbCrLf)        
        Response.Write ("上页 " & vbCrLf)
    else        
        Response.Write("<A HREF=" & action & "?" & temp & "Page=1>首页</A> " & vbCrLf)
        Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page-1) & ">上页</A> " & vbCrLf)
    end if

    if page>=pagecount then
        Response.Write ("下页 " & vbCrLf)
        Response.Write ("尾页 " & vbCrLf)            
    else
        Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page+1) & ">下页</A> " & vbCrLf)
        Response.Write("<A HREF=" & action & "?" & temp & "Page=" & pagecount & ">尾页</A> " & vbCrLf)            
    end if

    Response.Write(" 页次：" & page & "/" & pageCount & "页" &  vbCrLf)
    Response.Write(" 共有" & iCount & "条记录" &  vbCrLf)
    Response.Write(" 转到" & "<INPUT TYEP=TEXT NAME=page SIZE=1 Maxlength=5 VALUE=" & page & ">" & "页"  & vbCrLf & "<INPUT type=submit style=""font-size: 9pt"" value=GO class=b2>")
    Response.Write("</TD>" & vbCrLf )                
    Response.Write("</TR></form>" & vbCrLf )        
    Response.Write("</table>" & vbCrLf )        
End Sub
%>
<BR>
                </td>
              </tr>
          </table></td>
        </tr>
    </table></td>
    <td valign="top"><img src="/img/index_img.jpg" width="10"></td>
  </tr>
</table>
<!--#include file="../../end.asp"-->
</body>
</html>
<script language=javascript>
						function showadv(){
						if (Form1.advshow.checked==1){
						dhs1.style.display=""}else{
						dhs1.style.display="none"
						}
						
						}
						</script>