<%
If Request("page")<>"" then
CurrentPage=Cint(Request("Page"))
Else
CurrentPage=1
End if
If CurrentPage=0 then CurrentPage=1
num=CurrentPage*10
sql="SELECT * FROM ( SELECT TOP 10 * FROM ( SELECT TOP "&num&" id,title,updatetime,click,sorts FROM SP_News where passed=1 ORDER BY id DESC ) t1 ORDER BY id ) t2 ORDER BY id DESC"
Set rs= Server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
Do While Not rs.Eof
%>
-
<%if year(now())&"-"&month(now())&"-"&day(now())=year(rs(2))&"-"&month(rs(2))&"-"&day(rs(2)) then%>
<%=year(rs(2))%>年<%=month(rs(2))%>月<%=day(rs(2))%>日
<%else%>
<%=year(rs(2))%>年<%=month(rs(2))%>月<%=day(rs(2))%>日
<%end if%>
<%=rs(1)%>
<%
i=i+1
rs.MoveNext
Loop
rs.close
set rs=nothing
%>
<%
sql="SELECT count(*) FROM SP_News where Passed=1"
Set rs= Server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
recordcounts=rs(0)
rs.close
set rs=nothing
%>
<%
TPL_ShowPage CurrentPage,recordcounts,10,5,"?page="
%>