以下是我分页显示的原代码,可第一页正常显示了,第二页就空白了,出不来,怎么回事呀!请高手指点以下,说明具体的改法,谢谢了!!!
--------------------------------------------------
<!--#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"> </td>
<td> </td>
</tr>
</table></td>
</tr>
<tr>
<td align="center"><font color="#000000"> </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"> <font color="#000099">举报日期:</font><font color="#666666"><%=rs("tytime")%></font> </td>
<td width="1" align="right" valign="middle"></td>
</tr>
<tr>
<td height="16" align="center" valign="bottom"> </td>
<td></td>
<td align="left" valign="middle"> <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"> </td>
<td></td>
<td align="left" valign="middle"> <font color="#666666"> <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"> </td>
<td align="right" valign="middle"></td>
</tr>
<tr>
<td height="18"></td>
<td align="left" valign="middle">
<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">
</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> </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编辑过]