|
- <!--#include file=conn.asp-->
- <table width="250" border="0" align="center" cellpadding="0" cellspacing="2" class="border">
- <%
- page=clng(request("page"))
- Set rs=Server.CreateObject("ADODB.RecordSet")
- sql="select username,epointnum from TTM_UserEX"
- rs.Open sql,conn,1,3
- if rs.eof and rs.bof then
- response.Write("暂时没有记录")
- else
- rs.PageSize=20
- if page=0 then page=1
- pages=rs.pagecount
- if page > pages then page=pages
- rs.AbsolutePage=page
- for j=1 to rs.PageSize
- %>
- <tr>
- <td width="150" height="22" align="left"><%=rs("UserName")%></td>
- <td width="100" height="22" align="left"><%=rs("epointnum")%></td>
- </tr>
- <%
- rs.movenext
- if rs.eof then exit for
- next
- %>
- <tr valign="bottom">
- <td height="50" colspan="3" align="center" >
- <form method=Post action="?">
- <%if Page<2 then
- response.write "首页 上一页 "
- else
- response.write "<a href=?page=1>首页</a> "
- response.write "<a href=?page=" & Page-1 & ">上一页</a> "
- end if
- if rs.pagecount-page<1 then
- response.write "下一页 尾页"
- else
- response.write "<a href=?page=" & (page+1) & ">"
- response.write "下一页</a> <a href=?page="&rs.pagecount&">尾页</a>"
- end if
- response.write " 页次:<strong><font color=red>"&Page&"</font>/"&rs.pagecount&"</strong>页 "
- response.write " 共<b><font color='#FF0000'>"&rs.recordcount&"</font></b>条记录 <b>"&rs.pagesize&"</b>条记录/页"
- response.write " 转到:<input type='text' name='page' size=4 maxlength=10 class=input value="&page&">"
- response.write " <input class=input type='submit' value=' Goto ' name='cndok'></span></p>"
- %>
- </form> </td>
- </tr>
- <%
- end if
- rs.close
- set rs=nothing
- %>
- </table>
复制代码 |
|