|
<%
dim focus_rs
dim focus_sql
MaxList=45
if IsNumeric(request("page")) then
if not isempty(request("page")) and request("page")<>"" then
currentPage=cint(request("page"))
else
currentPage=1
end if
else
currentpage=1
end if
set focus_rs=server.createobject("adodb.recordset")
focus_sql="select * from article where shenghe=1 order by dateandtime desc"
focus_rs.open focus_sql,conn,1,1
MaxPerPage=MaxList
totalPut=focus_rs.recordcount
if (totalput mod maxperpage)=0 then
totalpage=totalput\maxperpage
else
totalpage=totalput\maxperpage+1
end if
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)*MaxPerPage
<%
if focus_rs.eof then
response.Write "暫沒有任何信息 | "
else
do while not focus_rs.eof and MaxPerPage>0
response.write ""
response.write " "
response.Write(""&focus_rs("title")&"")
response.write " | "
response.Write(""&formatdatetime(focus_rs("dateandtime"),2)&" | ")
response.Write(" | ")
MaxPerPage=MaxPerPage-1
focus_rs.movenext
loop
end if
focus_rs.close
set focus_rs=nothing
%>
<%
response.write ""
%> |
|