以下有几行,我不是很懂是什么意思,好心的GG AND JJ 帮我解释下
<% const MaxPerPage=20 dim totalPut dim CurrentPage dim TotalPages dim i,j
if not isempty(request("page")) then currentPage=cint(request("page")) else currentPage=1 end if
%>
html 显示部分
<% dim sql dim rs sql="select * from learning order by articleid desc" Set rs= Server.CreateObject("ADODB.Recordset") rs.open sql,conn,1,1 if rs.eof and rs.bof then response.write "<p align='center'> 还 没 有 任 何 信 息</p>" else totalPut=rs.recordcount (这里我不是很懂,为什么一样的要写两行) totalPut=rs.recordcount if currentpage<1 then currentpage=1 end if if (currentpage-1)*MaxPerPage>totalput then(为什么要currentpage-1,而不用currentpage) if (totalPut mod MaxPerPage)=0 then currentpage= totalPut \ MaxPerPage else currentpage= totalPut \ MaxPerPage + 1 end if
end if if currentPage=1 then showpages showContent showpages else if (currentPage-1)*MaxPerPage<totalPut then rs.move (currentPage-1)*MaxPerPage (这句话是什么意思?) dim bookmark bookmark=rs.bookmark (这句话是什么意思?) showpages showContent showpages else currentPage=1 showpages showContent showpages end if end if rs.close end if set rs=nothing conn.close set conn=nothing
sub showContent dim i i=0 %>