<%if Session("weight")<>5 then 
Response.Redirect "error.asp?cause=4"
 end if
%>

<!--#include file="../db/adovbs.inc"-->
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<LINK 
href="css/default.css" rel=stylesheet>
</HEAD>
<BODY  bgColor=#ffffff>
<object runat=server id=conn1 progid="adodb.connection"></object>
<%application.Lock
conn1.Open Application("p_jyzx")
Application.UnLock
%>
<%
 tttt=Request("tttt")
 if tttt="" then
 	temp=-1
	tttt="一个月"
 elseif tttt="一个月" then
	temp=-1
	tttt="一个月"
 elseif tttt="二个月" then
	temp=-2
	tttt="二个月"
elseif tttt="三个月" then
	temp=-3
	tttt="三个月"
elseif tttt="半年" then
	temp=-6
	tttt="半年"
elseif tttt="一年" then
	temp=-12
	tttt="一年"
 end if
last_login=dateadd("m",temp,date)

sql1="select * from user where weight=1 and last_time<#"&last_login&"#"
set rs=server.CreateObject ("ADODB.recordset")
 rs.Open sql1,conn1,3
 rs.PageSize=15
if session("currentpage")="" then
	session("currentpage")=1
end if

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

 


%>
<BR>
<table width="100%" border="0" >
   <FORM action=binqi.asp method=POST id=form1 name=form1>
        <tr> 
         <TD height=30><br><SELECT id=select1 name=tttt onchange="javascript:form1.submit();">
<OPTION value=<%=tttt%> selected><%=tttt%></OPTION>
<OPTION value="一个月">一个月</OPTION>
<OPTION value="二个月">二个月</OPTION>
<OPTION value="三个月">三个月</OPTION>
<OPTION value="半年">半年</OPTION>
<OPTION value="一年">一年</OPTION>
</SELECT><big>以上未上站的普通用户列表</big></TD>
       </FORM>
     <td align=left><A href=del_user_mass.asp?last_login=<%=last_login%> ><b>删除所有符合条件的用户</b></A></td>

	</tr>
	</table>




<%if rs.RecordCount =0 then 

%>
<table width="100%" border="0" >
        <tr> 
         <TD height=30 align=center><br><font color="red"><b>通告</b></font><FONT color=red size=5><b> <%'=session("sql")%></b></FONT></TD>
        </tr>
      <tr><td align=left><br>
                            
    <B><FONT color=#003399 size=2><BR>&nbsp;&nbsp;&nbsp;&nbsp;对不起，没有找到用户！</font></b>
      </td>
     
      </tr> 
 </table>     
<%else	
 %>
 
<table width=100% cellpadding=3 cellspacing=1 bgcolor="#FFCC33" >
  <tr bgcolor=#FFE28C> 
    <td  align=center class=sp><b>用户名</b></td>
	<td  align=center class=sp><b>昵称</b></td>
	<td  align=center class=sp><b>性别</b></td>
	<td  align=center class=sp><b>年龄</b></td>
	<td  align=center class=sp><b>留言</b></td>
	<td  align=center class=sp><b>修改</b></td>
	<td  align=center class=sp><b>删除</b></td>
</tr>
<%	rows=0
if rs.RecordCount<>0 then
rs.AbsolutePage=session("currentpage")
end if
	while not rs.EOF and rows<rs.PageSize 
%>


<%if rows mod 2 then 
%>
<%my_year=trim(rs("byear"))
age=clng(year(date))-clng(my_year)%>
<tr bgcolor=#FFF3C6>
	<td  align=center class=sp><%=rs("user_name")%></td>
	<td  align=center class=sp><%=rs("nickname")%></td>
	<td  align=center class=sp><%=rs("sex")%></td>
	<td  align=center class=sp><%=age%></td>
	<td  align="center" class=sp><a href="manager_leaveword.asp?user_name=<%=rs("user_name")%>" target=_blank >留 言</a></td>
        
	<td  align=center class=sp><a href="modify_user.asp?user_name=<%=rs("user_name")%>&id=4" >修 改</a></td>
	<td  align=center class=sp><a href="del_user.asp?id=4&user_name=<%=rs("user_name")%>" >删 除</a></td>
</tr>
<%else%>
<%my_year=trim(rs("byear"))
age=clng(year(date))-clng(my_year)%>
<tr bgcolor=#FFFBE7>
	<td  align=center class=sp><%=rs("user_name")%></td>
	<td  align=center class=sp><%=rs("nickname")%></td>
	<td  align=center class=sp><%=rs("sex")%></td>
	<td  align=center class=sp><%=age%></td>
	<td  align="center" class=sp><a href="manager_leaveword.asp?user_name=<%=rs("user_name")%>" target=_blank >留 言</a></td>
        
	<td  align=center class=sp><a href="modify_user.asp?user_name=<%=rs("user_name")%>&id=4" >修 改</a></td>
	<td  align=center class=sp><a href="del_user.asp?id=4&user_name=<%=rs("user_name")%>" >删 除</a></td>
</tr>
<%end if%>	
<%rs.MoveNext
  rows=rows+1
  wend
%>
	
	
	
 <tr bgcolor=#FFF3C6><td colspan=7  align=center>
 <% ' if session("currentpage")>1then %>
<a href="binqi.asp?move=1">首页</a>　
<a href="binqi.asp?move=2">上一页</a>
<% 'end if%>
<% 'if session("currentpage")<rs.PageCount  then %>
<a href="binqi.asp?move=3">下一页</a>　
<a href="binqi.asp?move=4">末页</a>
 <%' end if %>

</td>
 </tr>
 <tr bgcolor=#FFF3C6><td colspan=7  align=center>
 第<%=session("currentpage")%>页/共<%=rs.PageCount%>页
 </td>
 </tr>
</table>

<%conn1.Close
end if%>

</BODY>
</HTML>
