<%
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
set rs=server.createobject("adodb.recordset")
sql="select * from book order by id desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "
还没有任何留言!
"
else
totalPut=rs.recordcount
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*5>totalput then
if (totalPut mod 5)=0 then
currentpage= totalPut \ 5
else
currentpage= totalPut \ 5 + 1
end if
end if
if currentPage=1 then
showpages
showContent
showpages
else
if (currentPage-1)*5
<% i=i+1
if i>=5 then exit do
rs.movenext
loop
end sub
sub showpages()
dim n
if (totalPut mod 5)=0 then
n= totalPut \ 5
else
n= totalPut \ 5 + 1
end if
if n=1 then
response.write ""
exit sub
end if
dim k
response.write "
>> 留言分页 "
for k=1 to n
if k=currentPage then
response.write "["+Cstr(k)+"] "
else
response.write "["+""+Cstr(k)+"] "
end if
next
end sub
%>
《中华人民共和国增值电信业务经营许可证》编号:鲁 B2-20041020号 版权所有 中国玻璃钢综合信息网
客服中心:0534-2666069266877326628562669268 2220116 传真:0534-2666069 信箱:serve@cnfrp.net
Copyright &xcopy 2002-2005 CNFRP.NET All Rights Reserved