标题:求助分页问题,第二页无法显示??急??
取消只看楼主
hydtk
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2006-5-30
 问题点数:0 回复次数:0 
求助分页问题,第二页无法显示??急??

以下是我分页显示的原代码,可第一页正常显示了,第二页就空白了,出不来,怎么回事呀!请高手指点以下,说明具体的改法,谢谢了!!!
--------------------------------------------------

<!--#include file="weconnsn.asp"-->

<%

set rs = server.createobject("adodb.recordset")
sqlstr = "select * from wbda"
rs.Open sqlstr, db, 1, 1

pages = request.querystring("pages") '获得提交过来要显示的页数

if pages = "" then '当提交过来的页数为空,或页数小于1时,将页数置为1
pages = 1
end if
if pages <> "" and cint(pages) < 1 then
pages = 1
end if

pagesize = 5 '设置每页显示的记录数
rs.PageSize = pagesize
rs.CacheSize = pagesize

pagecount = rs.PageCount

if cint(pages) > pagecount then '如果提交过来的页数超过总页数,将页数置为最大页数
pages = pagecount
end if
rs.AbsolutePage = pages '设置当前的页数

' dim i
' i=(pages-1)*pagesize
'do while not rs.eof and i < pagesize+(pages-1)*pagesize
' i=i + 1
%>
<html>
<head>
<link href="/style.css" rel="stylesheet" type="text/css">
<title>举报</title>
<style type="text/css">
<!--
.STYLE1 {
color: #000099;
font-weight: bold;
}
-->
</style>
<script language="JavaScript" fptype="dynamicanimation">
<!--
function dynAnimation() {}
function clickSwapImg() {}
//-->
</script>
</head>
<BODY background=#ffffff>
<CENTER>
<a name="top"></a> <a name="add"></a>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td> <table width="715" border="0" align="center" cellpadding="0" cellspacing="0" height="806">
<tr>
<td width="30"> </td>
<td width="652" valign="top">
<TABLE
width="94%" border=0 align="center" cellPadding=0 cellSpacing=0>
<TBODY>
<TR>
<TD width="549" align="center">
<%
if rs.eof and rs.bof then
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="17%" valign="bottom"> <div align="center"><strong><font color="#333333">举报公告:</font></strong>
</div></td>

</tr>
</table>
<table width="75%" border="0" align="center" cellpadding="6" >
<tr>
<td height="48" align="center"> <p>还没有任何举报!</p></td>
</tr>
</table>
<%else%>
<div align="center">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="right"><table width="100%" border="0">
<tr>
<td width="17%" valign="bottom">&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table></td>
</tr>
<tr>
<td align="center"><font color="#000000">&nbsp; </font></td>
</tr>
<tr>
<td align="center">
<%
dim i
i=(pages-1)*pagesize
while not rs.eof and i < pagesize+(pages-1)*pagesize
i=i + 1

'do while not rs.eof and e_page>0
%>
<TABLE class=log_td_table cellSpacing=0 cellPadding=0
width="100%" border=0>
<TBODY>
<TR> </TR>
<TR>
<TD class=log_text_box
style="TABLE-LAYOUT: fixed; WORD-BREAK: break-all"
vAlign=top> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="bottom">第<%=rs("id")%>位 </td>
<td></td>
<td width="459" align="left" valign="middle">&nbsp;&nbsp;&nbsp;<font color="#000099">举报日期:</font><font color="#666666"><%=rs("tytime")%></font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td width="1" align="right" valign="middle"></td>
</tr>
<tr>
<td height="16" align="center" valign="bottom">&nbsp;</td>
<td></td>
<td align="left" valign="middle">&nbsp;&nbsp;&nbsp;<font color="#000099">联系电话:</font><font color="#666666"><%=rs("telrew")%></font></td>
<td align="right" valign="middle"></td>
</tr>
<tr>
<td height="17" align="center" valign="bottom">&nbsp;</td>
<td></td>
<td align="left" valign="middle">&nbsp;<font color="#666666"> &nbsp;<font color="#000099">IP地址:</font><font color="#666666"><%=rs("ipweb")%></font></font></td>
<td align="right" valign="middle"></td>
</tr>
<tr>
<td width="70" rowspan="4" align="center" valign="top"><p> <br>
<br>
</p>
<p><strong><b><%=rs("name")%></b></strong>
<br>
<br>
<%if session("admin")="smallstick" then%>
<br>
[<a href="print.asp?id=<%=rs("weid")%>">打印</a>]<br>
[<a href="del.asp?id=<%=rs("weid")%>" onClick="return confirm('您确定进行删除操作吗?')">删除</a>]
<%end if%>
</p></td>
<td height="17"></td>
<td align="left" valign="middle">&nbsp;&nbsp;</td>
<td align="right" valign="middle"></td>
</tr>
<tr>
<td height="18"></td>
<td align="left" valign="middle">&nbsp;&nbsp;
<div align="center"></div></td>
<td align="right" valign="middle"></td>
</tr>
<tr>
<td width="1" rowspan="2" background="/img/bg_1.gif"></td>
</tr>
<tr>
<td align="center" valign="middle" bgcolor="#F5F5F5">
<table width="95%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F5F5F5" style="table-layout:fixed;word-break:break-all">
<tr>
<td height="100%"><font color="#ff0000"> 举报对象</font>

<%=rs("jewbdx")%><br><br> <font color="#333333">&nbsp;

</font><br><br>
<font color="#0000ff"> 举报内容:</font><p><%=ubbcode(HTMLEncode(rs("yfjblr")))%>



</p></td>
</tr>
</table></td>
<td width="1" background="/img/bg_1.gif"></td>
</tr>
</table></TD>
</TR>
</TBODY>
</TABLE>
<br>
<%
'e_page=e_page-1
'rs.movenext
'loop
rs.movenext
wend
' loop

%>
</td>
</tr>
<tr>
<td>
<div align="right"> <%
set rs = server.createobject("adodb.recordset")
sqlstr = "select * from wbda"
rs.Open sqlstr, db, 1, 1
if (pages-1)*pagesize<>0 then
%>
<a href="disp.asp?pages=<%=pages-1%>">上一页</a>
<%
end if
if rs.RecordCount>(pages)*pagesize then
%>
<a href="disp.asp?pages=<%=pages+1%>">下一页</a>


<%end if%> </div></td>
</tr>
<tr>
<td align="center"> </td>
</tr>
<tr>
<td align="center"> </td>
</tr>
<tr>
<td align="center"> </td>
</tr>
</table>
</div></TD>
</TR>
</TBODY>
</TABLE>
<%
rs.close
'set rs=nothing

end if
%>
</td>
</tr>
</table>
<table width="760" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
</tr>
</table></td>
</tr>
</table>
<TABLE cellSpacing=0 cellPadding=0 width=760 align=center bgColor=#ffffff
border=0>
<TBODY>
<TR>
<TD align=middle height=16><BR>
<DIV align=center></DIV>
<DIV align=center></DIV></TD></TR></TBODY></TABLE>
-----------------------------------
以上是我分页显示的原代码,可第一页正常显示了,第二页就空白了,出不来,怎么回事呀!请高手指点以下,说明具体的改法,谢谢了!!!

[此贴子已经被作者于2006-5-30 10:00:47编辑过]

搜索更多相关主题的帖子: include pages 
2006-05-30 10:00



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-68439-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.507997 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved