<%
sql="select * from product order by product_id desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,db,1
if rs.eof and rs.bof then
response.write "
内容没有添加哦
"
else
MaxPerPage=6
PageUrl="index.php"
totalPut=rs.recordcount
if currentpage<1 then currentpage=1
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
showContent
showpage totalput,MaxPerPage,PageUrl
else
if (currentPage-1)*MaxPerPage