<%
sql="SELECT * FROM active ORDER BY addDate DESC"
rs.open sql,conn,1,1
rcount=rs.recordcount
if pmcount="" or isempty(pmcount) or pmcount<1 then
pmcount=15
end if
rs.pagesize=pmcount '设置每页数
mpage=rs.pagecount '得到总页数
pageno=request("pageno")
if isempty(pageno) or cint(pageno)<1 or cint(pageno)>mpage then
pageno=1
end if
if rs.bof and rs.eof then
response.write "
没有新闻
"
else
rs.absolutepage=pageno '将指针移至指定页的第一条记录'
loopno=pmcount
do while not rs.eof and loopno>0
%>
)"><% response.write rs("title") %> <%
dim addti
addti = rs("StartDate")
adddate = datevalue(addti)
response.write "("&adddate&")"
PostTime=cdate(trim(rs("addDate")))
if year(PostTime)=year(now()) and month(PostTime)=month(now()) and clng(day(PostTime)+4)>=clng(day(now())) then
response.write ""
elseif year(PostTime)=year(now()) and month(PostTime)+1 =month(now()) and clng(day(PostTime)+4-30) >=clng(day(now())) then
response.write ""
end if
%>
<%
rs.movenext
loopno=loopno-1
loop
end if
rs.close
set rs=Nothing
%>