PageShowSize = 10 '每页显示多少个页
MyPageSize = 2 '每页显示多少条文章
If Not IsNumeric(Request("page")) Or IsEmpty(Request("page")) Or Request("page") <=0 Then
MyPage=1
Else
MyPage=Int(Abs(Request("page")))
End if
url=trim(request.Form("cl"))
rs.Open "Select * From xueyuan DESC", conn, 1,1
If Not rs.eof then
rs.PageSize = MyPageSize
MaxPages = rs.PageCount
rs.absolutepage = MyPage
total = rs.RecordCount
%>
<table width="700" border="0" align="center" cellpadding="0" cellspacing="1" bordercolorlight="#999999" bordercolordark="#FFFFFF" bgcolor="#CCCCCC">
<tr bgcolor="#FFFFFF">
<td colspan="6" align="right">
<form action="" method="post" name="search">
查询:<select name="cl">
<option value="1">--ID--</option>
<option value="2">学员姓名</option>
<option value="3">登陆ID</option>
<option value="4">模糊地址</option>
<option value="5">余额</option>
<option value="6">给付人</option>
<option value="7">收款人</option>
<option value="8">模糊登陆ID</option>
<option value="9">登陆ID字母开头</option>
</select>
<input name="keyword" type="text" class="unnamed1">
<input type="submit" name="Submit" value="查询">
</form>
</td>
</tr>
<tr>
<td width="50" height="20" bgcolor="#F6F6F6"><div align="center">ID</div></td>
<td width="50" height="20" bgcolor="#F6F6F6"><div align="center">登陆ID</div></td>
<td width="100" height="20" align="center" bgcolor="#F6F6F6">学员姓名</td>
<td width="50" height="20" align="center" bgcolor="#F6F6F6">余额</td>
<td width="128" height="20" align="center" bgcolor="#F6F6F6">时 间</td>
<td width="110" height="23" align="center" bgcolor="#F6F6F6">操作</td>
</tr>
<%
for i=1 to rs.PageSize
if not rs.EOF then
%>
<tr bgcolor="#FFFFFF">
<td height="19" align="center" bordercolorlight="#C0C0C0"><%=rs("id")%></td>
<td height="19" align=CENTER bordercolorlight="#C0C0C0"><%=rs("delu")%></td>
<td align="center"><%=rs("name")%></td>
<td align="center"><%=rs("yueyu")%></td>
<td align="center">[<%=rs("addtime")%>]</td>
<td height="23" align=middle bordercolorlight="#c0c0c0" bgcolor="#FFFFFF"><div align="center"><a href="xueyuanedit.asp?Action=Edit&id=<%=rs("id")%>">修改</a> |<a href="print2.asp?id=<%=rs("id")%>" target="_blank">打印学员资料</a> |<a href="print.asp?id=<%=rs("id")%>" target="_blank">生成请求书</a>
| <a href="?Action=Del&id=<%=rs("id")%>&idd=<%=rs("xueyuan_id")%>">删除</a></div></td>
</tr>
<%
rs.MoveNext
end if
next
%>
<tr bgcolor="#FFFFFF">
<td height="23" colspan=6 align="center" bordercolorlight="#C0C0C0">共 <%=total%> 条,当前第 <%=Mypage%>/<%=Maxpages%>
页,每页 <%=MyPageSize%> 条
<%
PageNextSize=int((MyPage-1)/PageShowSize)+1
Pagetpage=int((total-1)/rs.PageSize)+1
if PageNextSize >1 then
PagePrev=PageShowSize*(PageNextSize-1)
Response.write "<a class=black href='xueyuan.asp?action=liebiao&page=" & PagePrev & "&keyword="&url&"' title='上" & PageShowSize & "页'>上一翻页</a> "
Response.write "<a class=black href='xueyuan.asp?action=liebiao&page=1' title='第1页'>页首</a> "
end if
if MyPage-1 > 0 then
Prev_Page = MyPage - 1
Response.write "<a class=black href='xueyuan.asp?action=liebiao&page=" & Prev_Page & "&keyword="&url&"' title='第" & Prev_Page & "页'>上一页</a> "
end if
if Maxpages>=PageNextSize*PageShowSize then
PageSizeShow = PageShowSize
Else
PageSizeShow = Maxpages-PageShowSize*(PageNextSize-1)
End if
If PageSizeShow < 1 Then PageSizeShow = 1
for PageCounterSize=1 to PageSizeShow
PageLink = (PageCounterSize+PageNextSize*PageShowSize)-PageShowSize
if PageLink <> MyPage Then
Response.write "<a class=black href='xueyuan.asp?action=liebiao&page=" & PageLink & "&keyword="&url&"'>[" & PageLink & "]</a> "
else
Response.Write "<B>["& PageLink &"]</B> "
end if
If PageLink = MaxPages Then Exit for
Next
if Mypage+1 <=Pagetpage then
Next_Page = MyPage + 1
Response.write "<a class=black href='xueyuan.asp?action=liebiao&page=" & Next_Page & "&keyword="&url&"' title='第" & Next_Page & "页'>下一页</A>"
end if
if MaxPages > PageShowSize*PageNextSize then
PageNext = PageShowSize * PageNextSize + 1
Response.write " <A class=black href='xueyuan.asp?action=liebiao&page=" & Pagetpage & "&keyword="&url&"' title='第"& Pagetpage &"页'>页尾</A>"
Response.write " <a class=black href='xueyuan.asp?action=liebiao&page=" & PageNext & "&keyword="&url&"' title='下" & PageShowSize & "页'>下一翻页</a>"
End if
%>
|<a href="xueyuan.asp?action=liebiao">刷 新</a></td>
</tr>
</table>
</body>
</html>
<%
end if
rs.close
set rs=nothing
end if
%>