<%@ Language=VBScript %>
<%if Session("weight")<>5 then 
Response.Redirect "error.asp?cause=4"
 end if
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<LINK 
href="css/default.css" rel=stylesheet>
</HEAD>
<BODY>
<object runat=server id=conn1 progid="adodb.connection"></object>
<%application.Lock
conn1.Open Application("p_jyzx")
Application.UnLock
%>
<TABLE cellSpacing=0 cellPadding=0 width=100% align=center border=0>
  <TBODY>
  <TR >
    <TD  align=left > <font size=5>E网友情联盟管理 </font></TD>
   </TR>
</TBODY>    
 </table>  
<%	if Request("id")
 
 
 
set rs=server.CreateObject ("ADODB.recordset")
  sql="select * from affiliate"
   rs.Open sql,conn1,3,2
	rs.PageSize=15

if session("cur_page1")="" then
	session("cur_page1")=1
end if

if Request("move")=1 then
	session("cur_page1")=1
end if
if Request("move")=2 then
	session("cur_page1")=session("cur_page1")-1
end if
if Request("move")=3 then
	session("cur_page1")=session("cur_page1")+1
end if
if Request("move")=4 then
	session("cur_page1")=rs.PageCount
end if
if session("cur_page1")<1 then
session("cur_page1")=1
end if
if session("cur_page1")>rs.PageCount then
session("cur_page1")=rs.PageCount
end if
   


%>
 
    
    
  
  <BR><BR>
 <TABLE cellSpacing=0 cellPadding=0 width=100% align=center border=0>
  <TBODY>
  <TR> 
  
    <TD>
      <P align=center><B><FONT color=#ff9933>E网友情联盟用户列表</FONT></B></P>
      <TABLE cellSpacing=1 width="100%" align=center bgColor=#999999>
        <TBODY>
        <TR>
          <TD align=middle width=30 bgColor=#ffcc00 height=23>编号</TD>
          <TD align=middle bgColor=#ffcc00 height=23><STRONG>用户名</STRONG></TD>
          <TD align=middle bgColor=#ffcc00 height=23><STRONG>账户金额</STRONG></TD>
          <TD align=middle bgColor=#ffcc00 height=23><STRONG>上次结算时间</STRONG></TD>
       
          <TD align=middle bgColor=#ffcc00 height=23><STRONG>操 作</STRONG></TD>
       
                    <td></td>
          </TR>
  <%	rows=1
  if rs.RecordCount<>0 then
rs.AbsolutePage=session("cur_page1")
end if
	while not rs.EOF and rows<=rs.PageSize 
	
     money=rs("visit_counter")*affiliate_visit_value+rs("join_counter")*affiliate_join_value+rs("vip_join_counter")*affiliate_join_vip
    'money=FormatNumber(money,2,-1)
	money=clng(money)
%>
        
        <TR align=middle bgColor=#ffffff>
          <TD height=23><%=rows%></TD>
          <TD align=middle height=23>
          <A  href="affiliate_info.asp?user_name=<%=rs("user_name")%>"
            ><%=rs("user_name")%></A></TD>
         <TD><%=money%>元</TD>
        <TD><%=rs("start_time")%></TD>
        <TD><A href=>[结算]</A>&nbsp;
        <A href=>[汇款]</A>&nbsp;
        <A href=>[删除]</A></TD>
         
                    <td></td>
          </TR>
    <%
    rows=rows+1
    rs.MoveNext
    wend%> 
    <tr bgcolor=#FFF7FD><td colspan=6  align=center>
 <% 'if session("cur_page1")>1then %>
<a href="affiliate_list.asp?move=1">首页</a>　
<a href="affiliate_list.asp?move=2">上一页</a>
<%' end if%>
<% 'if session("cur_page1")<rs.PageCount  then %>
<a href="affiliate_list.asp?move=3">下一页</a>　
<a href="affiliate_list.asp?move=4">末页</a>
 <%' end if %>

</td>
 </tr>
 <tr bgcolor=#FFF7FD><td colspan=6  align=center>
 第<%=session("cur_page1")%>页/共<%=rs.PageCount%>页
 </td>
 </tr>
    
       
        </TBODY></TABLE></TD></TR></TBODY></TABLE>
<HR width="100%" SIZE=1>



</BODY>
</HTML>
