<%
id=Request.QueryString("id")
If Request.QueryString("Page") = "" or Request.QueryString("Page") <= 0 then
Page = 1
Else
Page = CINT(Request.QueryString("Page"))
End If
%> 
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>[中泰科技]多用户留言板排行</title>

<link rel="stylesheet" type="text/css" href="style/5.css">
</head>
<table width="600" align="center" cellspacing="0" cellpadding="1"  border="0" bgcolor=#000000>
  <tr> 
    <td> 
      <table width="600" cellspacing="0" cellpadding="4" border="0" class="table002">
        <tr> 
          <td class="jnfont7" valign="middle" align=left> <b>>> </b> <a href="default.asp"><acronym title="返回主页">主页</acronym></a> 
            | <a href="modify.asp?user=<%=user%>"><acronym title="编辑你的个人资料">修改资料</acronym></a>  
            | <%if  adminok="ok" then%><a href="usermanager.asp?user=<%=user%>&exit=ok"><acronym title="退出管理">退出管理</acronym></a><%else%><a href="usermanager.asp?user=<%=user%>"><acronym title="回复或删除留言">留言管理</acronym></a><%end if%>  
            | <a href="default.asp"><acronym title="免费申请留言本">免费申请</acronym></a>  
            | <a href="top.asp"><acronym title="留言排行榜">留言排行</acronym></a> </td> 
          <td class="jnfont7" valign="middle" align=right><b><%=webname%></b></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<p align="center">&nbsp;</p>
<table width="600" cellspacing="1" cellpadding="3" bgcolor="#000000" align="center">
  <tr class="table003">
    <td width="77" height="11" valign="top" class="jnfont6"> 
      <div align="center">用户名<br>
      </div>
    </td>  
    <td width="77" height="11" valign="top" class="jnfont6"> 
      <div align="center">网站名称<br>
      </div>
    </td>
    <td height="11" valign="top" width="69" class="jnfont6"> 
      <div align="center">站长</div>
    </td>
    <td height="11" valign="top" width="48" class="jnfont6"> 
      <div align="center">留言数</div>
    </td>
    <td height="11" valign="top" width="88" class="jnfont6"> 
      <div align="center">加入时间</div>
    </td>
    <td width="*" height="11" valign="top" class="jnfont6"> 
      <div align="center">介绍</div>
    </td>
  </tr>
  <!--#include file="conn.asp"-->
  <%
  set rs=server.createobject("adodb.recordset")
sql="select * from user order by count desc"
rs.open sql,conn,1,2
if not (rs.EOF or rs.BOF) then
rs.PageSize=20
	Dim TotalPages             
        TotalPages = RS.PageCount
        if page>rs.pagecount then page=rs.pagecount
	dim scount 
        scount=INT(Rs.recordcount)
	rs.absolutepage=page
	
	StartPageNum=1 
do while StartPageNum+10<=Page 
StartPageNum=StartPageNum+10 
Loop 
     
EndPageNum=StartPageNum+9
 
If EndPageNum>RS.Pagecount then EndPageNum=RS.Pagecount 
i=0
  do while (not rs.EOF) and (i<RS.PageSize)

 %>
  <tr class="table001">
    <td width="77" valign="top" class="jnfont6"><a href="guestbook.asp?user=<%=rs("username")%>" target="_blank"><%=rs("username")%></a></td>  
    <td width="77" valign="top" class="jnfont6"><a href="<%=rs("wwwhttp")%>" target="_blank"><%=rs("web")%></a></td>
    <td width="69" valign="top" class="jnfont6"><a href="mailto:<%=rs("email")%>" ><%=rs("webmaster")%></a></td>
    <td width="48" valign="top" class="jnfont6"><%=rs("count")%></td>
    <td valign="top" width="88" class="jnfont6"><%=rs("addtime")%></td>
    <td width="*" valign="top" class="jnfont6"><%=rs("wwwintro")%></td>
  </tr>
<%i=i+1
rs.movenext 
loop 

%>  
</table>
<table width="600" cellspacing="1" cellpadding="3" bgcolor="#000000" align="center">
    <tr class="table002"> 
      <td colspan="2" valign="top" class="jnfont6"> 
        <div align="center"> 共<font color=#ff0000><%=scount%></font>个网站申请 [<% if StartPageNum>1 then %><a href="top.asp?Page=<%=StartPageNum-1%>"><<</a>  
          <%end if%> <% For I=StartPageNum to EndPageNum    
      if I<>Page then %> <a href="top.asp?Page=<%=I%>"><%=I%></a>  
          <% else %> <b><%=I%></b> <% end if %> <% Next %> <% if EndPageNum<RS.Pagecount then %>  
          <a href="top.asp?Page=<%=EndPageNum+1%>">>></a> 
          <%end if%>  ]</div> 
        </td>
    </tr>
    
  </table>
   
<%rs.close
end if%> 
<table border="0" width="560" cellpadding="0" align="center">
  <tr> 
    <td width="100%" class="jnfont6"> 
          <p align="center">
            <a href=http://www.5151.cn target=_blank>免费留言本由[中泰科技]提供</a>
        </td>
      </tr>
    </table>     
<lign="center">&nbsp;</p>
