%
dim nonenews,j
set rs=server.createobject("adodb.recordset")
if not isempty(request("page")) then
pagecount=cint(request("page"))
else
pagecount=1
end if
sql="select * from news where newstypename = '' order by newsdate desc"
rs.open sql,conn,1,1
rs.PageSize=15
if rs.eof and rs.bof then
nonenews = true
end if
if not nonenews = true then
if pagecount>rs.pagecount or pagecount<=0 then
pagecount=1
end if
rs.AbsolutePage=pagecount
dim i
i=0
end if
%>