<!--#include file="conn.asp" -->
<% adm_power_page=5 '分配本页的用户访问权限 %>
<!--#include file="admin_dn.asp" -->
<!--#include file="../inc/config.asp" -->
<!--#include file="../inc/mail_inc.asp" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>:::管理页面:::</title>
<link href="css.css" rel="stylesheet" type="text/css">
</head>

<body leftmargin="2" topmargin="0">
<p>用户财务入账记录</p>
<form name="form1" method="post" action="adm_8.asp?w=del">
  <table width="98%" border="0" align="center" cellpadding="0" cellspacing="1">
    <tr bgcolor="#000066"> 
      <td width="13%" height="13"> <div align="center"><font color="#FFFFFF">申请人</font></div></td>
      <td width="18%"> <div align="center"><font color="#FFFFFF">入账金额</font></div></td>
      <td width="20%"> <div align="center"><font color="#FFFFFF">汇款时间</font></div></td>
      <td width="28%"> <div align="center"><font color="#FFFFFF">汇款方式</font></div></td>
      <td width="11%"> <div align="center"><font color="#FFFFFF">确认生效</font></div></td>
      <td width="10%"> <div align="center"><font color="#FFFFFF">删除记录</font></div></td>
    </tr>
    <% if Trim(Request.QueryString("w"))="save" then
  je1=Request("je")  
  id=Request("id")
  sql="update log set ss=true where id="&id
  conn.execute(sql)
  sql="update user set je=je+"&je1&" where userid='"&request("us")&"'"
  conn.execute(sql) 
  rs.open "select * from user where userid='"&request("us")&"'"
  if not rs.eof then
  zje=rs("je")
  us_email=rs("email")
  end if
  rs.close
  sql="insert into memo(userid,je,body,log,zje) values ('"&request("us")&"',"&je1&",'财务入账确认','入账确认',"&zje&")"
 conn.execute(sql)
 
  if jmail_info then
    call SendMail(us_email,"入账成功","你好:<br>你在"&home_page_url&"的入账管理员以经确认，目前您账号上的答余额为"&zje)
  end if
   %>
    <script language="VBScript" type="text/VBScript">
msgbox "入账确让成功。请不要重复刷新本页。。。。。"
</script>
    <%
  end if
  
  if Trim(Request.QueryString("w"))="del" then
  for i= 1 to request.form("del").count
  sql="delete from log where id="&Request("del")(i)
  conn.execute(sql)
  next
    %>
    <script language="VBScript" type="text/VBScript">
msgbox "删除记录成功。。。。。"
</script>
    <%
  end if
  
  sql="select * from log where ll='入账' order by not ss,id desc"
  pp=40
    rs.open sql,conn,1,1
if not rs.eof then
  count=rs.recordcount
    if count=empty then
      count=0
    end if
    if count/pp>(count\pp) then
        totalpage=(count\pp)+1
  else
   totalpage=(count\pp)
    end if
end if 
 pagecount=cint(request.querystring("topage"))                              
 if pagecount<=0 then pagecount=1
 if pagecount>totalpage then pagecount=totalpage
if not rs.eof then
  rs.movefirst
 rs.move (pagecount-1)*pp
 i=0
 while not rs.eof and i<pp
 i=I+1
   %>
    <tr bgcolor="#F9F9F9"> 
      <td> <div align="center"><a href="adm_10.asp?w=search&select=userid&search=<%=rs("userid")%>"><%= rs("userid") %></a></div></td>
      <td> <div align="center"><font color="#FF0000">￥</font> <%= rs("je") %></div></td>
      <td> <div align="center"><%= rs("dat") %></div></td>
      <td><a href="#" title="附言：<%=rs("bak")  %>"><%= rs("fs") %></a></td>
      <td> <div align="center"> 
          <% 
	if rs("ss") then
	 %>
          <font color="#FF0000">已确认</font> 
          <% else  %>
          <a href="adm_8.asp?w=save&id=<%=rs("id")%>&je=<%=rs("je")%>&us=<%=rs("userid")%>"><img src="../images/3.jpg" width="16" height="16" border="0"></a> 
          <% end if %>
        </div></td>
      <td> <div align="center"> 
          <input name="del" type="checkbox" class="unnamed1" id="del" value="<%=rs("id")%>">
        </div></td>
    </tr>
    <% rs.movenext
  wend
  end if
  rs.close %>
    <tr> 
      <td colspan="5" bgcolor="#000066"> <font color="#FFFFFF">一共有:<%= count %> 
        条　一共:<%= totalpage %> 页 当前为: <%= pagecount %> 页</font> 　　<font color="#FFFFFF"> 
        <% 
	  if totalpage>1 then
	     if totalpage-pagecount>0 then
	  %>
        <a href="user_8.asp?topage=<%=pagecount+1%>"><font color=#FFFFFF>下一页</font></a> 
        <% 
	   
	  end if
	  if pagecount<>1 and totalpage-pagecount>0 then 
	   response.write "<font color=#FFFFFF>/</font>"
	   end if
	   
	   if pagecount<>"1" then %>
        <a href="user_8.asp?topage=<%=pagecount-1%>"><font color=#FFFFFF>上一页</font></a>　 
        <% 
	  end if
	  end if
	  %>
        </font></td>
      <td bgcolor="#000066"><input type="submit" name="Submit" value="-删 除-"></td>
    </tr>
  </table>
</form>
<p align="center"> 
  <% 
				 patehead=1
				 pagetop=totalpage
				 if pagecount\20>0 then 
				  
				 end if
				 
				for ss=patehead to pagetop %>
  |<a href="adm_8.asp?topage=<%=ss%>"><font color="#990000"><%=ss%></font></a><a href="adm_8.asp?topage=<%=ss%>"></a><% next %>|</p>
<hr width="95%" size="1">
<p><font color="#FF0000">注：</font>这里显示的是用户在汇款以后，到控制面板里提交的交费申请，请查询您的账号后再决定入账。。你点确认生效后，系统会自动在申请人的账号上加上申请人提交的金额。对于以经确认的金额将不能再次提交。。</p>
</body>
</html>
