<%
sql ="SELECT * FROM Nd_news where top like true and titlelx like '综合资料' ORDER BY datetime DESC"
set rs= Server.CreateObject("adodb.recordset")
rs.open sql,conn,0,1
top=1
if rs.eof then
response.write ""
else
do while not rs.eof
if not rs.eof then
%>
<%
rs.movenext
end if
top=top+1
if rs.eof or top>10 then
exit do
end if
loop
rs.close
set rs=nothing
end if
%> <%
sql ="SELECT * FROM Nd_news where top like false and titlelx like '综合资料' ORDER BY datetime DESC"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
Response.Write ""
%> <%
else
const maxperpage=40
dim currentpage
rs.pagesize=maxperpage
currentpage=request.querystring("pageid")
if not isnumeric(currentpage) then
currentpage=1
end if
if currentpage="" then
currentpage=1
elseif currentpage<1 then
currentpage=1
else
currentpage=clng(currentpage)
if currentpage > rs.pagecount then
currentpage=rs.pagecount
end if
end if
dim totalput,n
totalput=rs.recordcount
if totalput mod maxperpage=0 then
n=totalput\maxperpage
else
n=totalput\maxperpage+1
end if
if n=0 then
n=1
end if
rs.move(currentpage-1)*maxperpage
i=0
do while i< maxperpage and not rs.eof
%>
<%
i=i+1
rs.movenext
loop
end if
%>