%
set rst=server.createobject("adodb.recordset")
sql="select * from news where newsClass=23 order by newsTime desc"
rst.open sql,conn,3,1
if Not(rst.bof and rst.eof) then
NumRecord=rst.recordcount
rst.pagesize=8
NumPage=rst.Pagecount
if request("page")=empty then
NoncePage=1
else
if Cint(request("page"))<1 then
NoncePage=1
else
NoncePage=request("page")
end if
if Cint(Trim(request("page")))>Cint(NumPage) then NoncePage=NumPage
end if
else
NumRecord=0
NumPage=0
NoncePage=0
end if
%>