ASP翻页代码的问题
高手帮我看下这个代码怎么点下一页的时候就不显示图片呢<%ifrs.eofandrs.bofthenResponse.Write"<center><fontcolor=re...
高手帮我看下这个代码怎么点下一页的时候就不显示图片呢
<%
if rs.eof and rs.bof then
Response.Write "<center><font color=red>还没有添加图片。</font></center>"
else
pages=12
rs.pagesize=pages
if not isempty(Request.QueryString("page")) then
thispage=clng(Request.QueryString("page"))
else
thispage=1
end if
rscount=rs.recordcount
if thispage="" then thispage=1
if thispage<1 then thispage=1
if (thispage-1)*pages>rscount then
if (rscount mod pages)=0 then
thispage=rscount\pages
else
thispage=rscount\pages+1
end if
end if
if(rscount mod pages)=0 then
allpages=rscount\pages
else
allpages=rscount\pages+1
end if
rs.absolutepage=thispage
i=1
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
xianshi
%>
</tr>
<tr>
<td valign="top" width="700" colspan="5" height="20"><div align="center">
<%showpage totalput,MaxPerPage,"jingcai.asp"%>
</div></td>
</tr>
<%
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
xianshi
%>
<tr>
<td valign="top" width="700" colspan="5" height="20"><div align="center">
<%showpage totalput,MaxPerPage,"jingcai.asp"%>
</div></td>
</tr>
<%
else
currentPage=1
xianshi
%>
<tr>
<td valign="top" width="700" colspan="5" height="20"><div align="center">
<%showpage totalput,MaxPerPage,"jingcai.asp"%>
</div></td>
</tr>
<%
end if
end if
end if
rs.close
%> 展开
<%
if rs.eof and rs.bof then
Response.Write "<center><font color=red>还没有添加图片。</font></center>"
else
pages=12
rs.pagesize=pages
if not isempty(Request.QueryString("page")) then
thispage=clng(Request.QueryString("page"))
else
thispage=1
end if
rscount=rs.recordcount
if thispage="" then thispage=1
if thispage<1 then thispage=1
if (thispage-1)*pages>rscount then
if (rscount mod pages)=0 then
thispage=rscount\pages
else
thispage=rscount\pages+1
end if
end if
if(rscount mod pages)=0 then
allpages=rscount\pages
else
allpages=rscount\pages+1
end if
rs.absolutepage=thispage
i=1
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
xianshi
%>
</tr>
<tr>
<td valign="top" width="700" colspan="5" height="20"><div align="center">
<%showpage totalput,MaxPerPage,"jingcai.asp"%>
</div></td>
</tr>
<%
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
xianshi
%>
<tr>
<td valign="top" width="700" colspan="5" height="20"><div align="center">
<%showpage totalput,MaxPerPage,"jingcai.asp"%>
</div></td>
</tr>
<%
else
currentPage=1
xianshi
%>
<tr>
<td valign="top" width="700" colspan="5" height="20"><div align="center">
<%showpage totalput,MaxPerPage,"jingcai.asp"%>
</div></td>
</tr>
<%
end if
end if
end if
rs.close
%> 展开
1个回答
展开全部
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询