谁来帮帮我。真的很急呀。
这里是该页面:
http://www.jlstm.com/pages/products_dk.asp?page=1
当加上产品的图片显示后分页不能正常显示了。只出一页是为什么?
文件内容如下:
products_dk.asp
<!--#include file="dbconn.asp"-->
<%
dim rs
MaxPerPage=3
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
%>
<%
set rs=server.createobject("adodb.recordset")
sql="select * from products_dk order by products_id desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'> 还 没 有 任 何 info</p>"
else
totalPut=rs.recordcount
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
'showpage totalput,MaxPerPage,"sanwei.asp"
showContent
showpage totalput,MaxPerPage,"products_dk.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
'showpage totalput,MaxPerPage,"sanwei.asp"
showContent
showpage totalput,MaxPerPage,"products_dk.asp"
else
currentPage=1
'showpage totalput,MaxPerPage,"sanwei.asp"
showContent
showpage totalput,MaxPerPage,"products_dk.asp"
end if
end if
rs.close
end if
set rs=nothing
conn.close
set conn=nothing
sub showContent
dim i
i=0
%>
<%do while not rs.eof%>
<table width="100" border="0">
<tr>
<td></td>
</tr>
</table>
<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolorlight="#336699" bordercolordark=white>
<tr>
<td width="14%"><font color="#0000FF">产品名称</font></td>
<td width="19%"><a href="javascript:popwin(<%=rs("products_id")%>)"><%=rs("products_name")%></a></td>
<td width="17%"><font color="#0000FF">外型尺寸</font></td>
<td width="21%"><%=rs("products_size")%></td>
<td width="10%"><font color="#0000FF">发布日期</font></td>
<td width="19%"><%=rs("Date_issued")%></td>
</tr>
<tr>
<td colspan="2"><!--#include file="show_dk_news_img.asp"--></td>
<td colspan="4"><%=rs("products_cent")%></td>
</tr>
</table>
<% i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
<%
end sub
function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
response.write "<form method=Post action="&filename&">"
if CurrentPage<2 then
response.write "<font color='#000080'>首页 上一张</font> "
else
response.write "<a href="&filename&"?page=1>首页</a> "
response.write "<a href="&filename&"?page="¤tPage-1&">上一张</a> "
end if
if n-currentpage<1 then
response.write "<font color='#000080'>下一张 尾页</font>"
else
response.write "<a href="&filename&"?page="&(CurrentPage+1)&">"
response.write "下一张</a> <a href="&filename&"?page="&n&">尾页</a>"
end if
response.write "<font color='#000080'> 页次:</font><strong><font color=red>"¤tPage&"</font><font color='#000080'>/"&n&"</strong>页</font> "
response.write "<font color='#000080'> 共<b>"&totalnumber&"</b>张图片 <b>"&maxperpage&"</b>张图片/页</font> "
response.write " <font color='#000080'>转到:</font><input type='text' name='page' size=4 maxlength=10 class=navLink value="¤tpage&">"
response.write "<input class=form type='submit' value='Goto' name='cndok'></span></p></form>"
end function
%>