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

<!--#include file="../db/adovbs.inc"-->
<object runat=server id=conn1 progid="adodb.connection"></object>
<%application.Lock
conn1.Open Application("p_jyzx")
Application.UnLock
%>
<%
sql1=session("sql")

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

 


%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY bgColor=#FFFBE7>
<LINK 
href="css/default.css" rel=stylesheet>
<%if rs.RecordCount =0 then 

%>
<p  align=center> <font size=4  color=DarkOrange>查询结果</font></p>
<table width=100% cellpadding=3 cellspacing=1 bgcolor=#FFCC33>
<tr bgcolor=#FFFBE7><td colspan=7  align=center>
	找到0个用户，第0页/共0页
 </td>
 </tr>
<tr bgcolor=#FFE28C>
	<td  align=center ><b>用户名</b></td>
	<td  align=center ><b>昵称</b></td>
	<td  align=center ><b>性别</b></td>
	<td  align=center ><b>年龄</b></td>
	<td  align=center ><b>留言</b></td>
	<td  align=center ><b>修改</b></td>
	<td  align=center ><b>删除</b></td>
</tr>
<tr bgcolor=#FFFBE7>
	<td  align=center ></td>
	<td  align=center ></td>
	<td  align=center ></td>
	<td  align=center ></td>
	<td  align=center ></td>
	<td  align=center ></td>
	<td  align=center ></td>
</tr>
 </table>     
<%else	
 %>
 <p  align=center> <font size=4  color=DarkOrange>查询结果</font></p>
<table width=100% cellpadding=3 cellspacing=1 bgcolor=#FFCC33>
<tr bgColor=#FFE28C>
	<td  align=center ><b>用户名</b></td>
	<td  align=center ><b>昵称</b></td>
	<td  align=center ><b>性别</b></td>
	<td  align=center ><b>年龄</b></td>
	<td  align=center ><b>留言</b></td>
	<td  align=center ><b>发邮件</b></td>
	<td  align=center ><b>修改</b></td>
	<td  align=center ><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 
%>
<%

if rs("byear")<>"" then
my_year=trim(rs("byear"))
else
my_year=0
end if
age=clng(year(date))-clng(my_year)%>
<tr bgColor=#FFFBE7>
	<td  align=center ><A  href="../love/show_user.asp?user_name=<%=rs("user_name")%>"
            target=_blank><%=rs("user_name")%></A></td>
	<td  align=center ><%=rs("nickname")%></td>
	<td  align=center ><%=rs("sex")%></td>
	<td  align=center ><%=age%></td>
	<td  align="center" ><a href=javascript:newwin1('<%=rs("user_name")%>'); >留 言</a></td>
     <td  align="center" ><a href=javascript:newwin2('<%=rs("user_name")%>'); >发邮件</a></td>
       
	<td  align=center ><a href="modify_user.asp?user_name=<%=rs("user_name")%>&id=3" >修 改</a></td>
	<td  align=center ><a href="del_user.asp?id=3&user_name=<%=rs("user_name")%>" >删 除</a></td>
</tr>
<%else%>
<%if rs("byear")<>"" then
my_year=trim(rs("byear"))
else
my_year=0
end if
age=clng(year(date))-clng(my_year)%>
<tr bgColor=#FFF3C6>
	<td  align=center ><A  href="../love/show_user.asp?user_name=<%=rs("user_name")%>"
            target=_blank><%=rs("user_name")%></A></td>
	<td  align=center ><%=rs("nickname")%></td>
	<td  align=center ><%=rs("sex")%></td>
	<td  align=center ><%=age%></td>
	<td  align="center" ><a href=javascript:newwin1('<%=rs("user_name")%>'); >留 言</a></td>
     <td  align="center" ><a href=javascript:newwin2('<%=rs("user_name")%>'); >发邮件</a></td>
             
	<td  align=center ><a href="modify_user.asp?user_name=<%=rs("user_name")%>&id=3" >修 改</a></td>
	<td  align=center ><a href="del_user.asp?id=3&user_name=<%=rs("user_name")%>" >删 除</a></td>
</tr>
<%end if%>	
<%rs.MoveNext
  rows=rows+1
  wend
%>
	
	
	
 <tr bgColor=#FFFBE7><td colspan=9  align=center>
 <% if session("currentpage")>1then %>
<a href="show_search.asp?move=1">首页</a>　
<a href="show_search.asp?move=2">上一页</a>
<% end if%>
<% if session("currentpage")<rs.PageCount  then %>
<a href="show_search.asp?move=3">下一页</a>　
<a href="show_search.asp?move=4">末页</a>
 <% end if %>

</td>
 </tr>
 <tr bgColor=#FFFBE7><td colspan=9  align=center>
 第<%=session("currentpage")%>页/共<%=rs.PageCount%>页
 </td>
 </tr>
</table>

<%conn1.Close
end if%>

</BODY>
</HTML>
<SCRIPT LANGUAGE=javascript>
<!--
function newwin1(id)
{	
srcIMG="manager_leaveword.asp?user_name="+id;
		var newWin=window.open(srcIMG,"_blank","fullscreen=0,status=no,scrollbars=0,resizable=1,width=400,height=200");
}
function newwin2(id)
{		srcIMG="mail_for_person1.asp?user_name="+id;
		var newWin=window.open(srcIMG,"_blank","fullscreen=0,status=no,scrollbars=1,resizable=1,width=600,height=500");
}
	 
//-->
</SCRIPT>
