图片多行多列分页出现错误,多出一页,大家帮忙看看错在哪,源码如下
<!--#include file="conn/conn2.asp"-->
<%
set rsjing=server.CreateObject("ADODB.RECORDSET")
sqljing="select * from product order by addtime desc"
rsjing.open sqljing,conn,3,2
rsjing.pagesize=8
topage=clng(request("topage"))
if topage=0 then
topage=1
elseif topage>rsjing.pagecount then
topage=rsjing.pagecount
end if%>
<%
if rsjing.eof then
response.Write("太不可思议了,什么都没找到!!")
else
rsjing.absolutepage=topage%></font></strong></div></td>
</tr>
<tr>
<td height="10"> </td>
</tr>
<tr>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="10">
<tr>
<td valign="top"><table width="100%" border="0" cellpadding="2" cellspacing="2">
<%
for a=1 to rsjing.pagesize
if rsjing.eof then
exit for
end if
%>
<tr> <%for i=1 to 4
if rsjing.eof then
exit for
end if%>
<td height="178" align="center">
<table width="25%" border="0" cellpadding="0" cellspacing="1" bgcolor="#999999">
<tr>
<td align="center" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="2" cellpadding="2">
<tr>
<td height="120" align="center"><% if len(rsjing("imgpath"))>21 then %><a href="product_view2.asp?id=<%=rsjing("id")%>"><img src="pic/<%=rsjing("imgpath")%>" alt="<%=rsjing("id")%>" border="0" width="100" height="100"></a><%else%><img src="images/cpx.gif" border="0" width="100" height="100"><%end if%></td>
</tr>
<tr>
<td align="center">名称:
<a href="product_view2.asp?id=<%=rsjing("id")%>">
<%=rsjing("name")%>
</a></td>
</tr>
</table></td>
</tr>
</table></td> <%rsjing.movenext
next
%>
</tr><%next
'rsjing.close
%>
</table>
<table width="100%" border="0">
<tr>
<td height="1" bgcolor="#CCCCCC"></td>
</tr>
<tr>
<td><div align="center"><TABLE width="60%"
border=0 cellPadding=4 cellSpacing=0>
<TBODY>
<TR class=word>
<TD>共<SPAN class=en><%=rsjing.recordcount%></SPAN>条</TD>
<TD align=middle>
<TABLE width="100%"
border=0 cellPadding=0 cellSpacing=0>
<TBODY>
<TR align=middle>
<TD class=word><a href="ProList.asp?topage=<%=1%>"><font color="#000000">首页</font></a> </TD>
<TD class=word><a href="ProList.asp?topage=<%=topage-1%>"><font color="#000000">上一页</font></a> </TD>
<TD class=word><A
href="ProList.asp?topage=<%=topage+1%>"><font color="#000000">下一页</font></A> </TD>
<TD class=word><A
href="ProList.asp?topage=<%=rsjing.pagecount%>"><font color="#000000">末页</font></A> </TD>
<TD class=word>第<SPAN class=en><FONT
color=#ff6600><B><%=topage%></B></FONT></SPAN>页 / 共<SPAN
class=en><%=rsjing.pagecount%></SPAN>页</TD>
</TR>
</TBODY>
</TABLE></TD>
<%end if%>