%
vkeyword=trim(request("keyword"))
sql = "select today_focusid,title,updatetime from today_focus "
if trim(vkeyword)<>"" then
sql = "select today_focusid,title,updatetime from today_focus title LIKE '%" &vkeyword&"%' or content LIKE '%" &vkeyword&"%'"
end if
sql=sql + " order by updatetime desc"
%>
<%
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.open sql,session("sqlconnect"),1,1
cnt=rs.recordcount
rs.PAGESIZE=20
pagesize=rs.PAGESIZE
PgCounter=rs.PageCount
Page=request("Page",1)
if pgcounter<>0 then
If Page="" Then
Pageno=1
Else
Pageno=Cint(Page)
End If
If Pageno<>1 Then
PageUp=Pageno-1
Else
PageUp=1
End If
If Pageno<>PgCounter Then
PageDown=Pageno+1
Else
PageDown=PgCounter
End If
If PgCounter>0 Then
rs.absolutepage=pageno 'pageno指示当前页
End If
else
pageno=0
end if
%>
<%if cnt<>0 then%>
<%
rowcount=rs.pagesize
do while not rs.eof and rowcount>0
vupdatetime=year(rs("updatetime"))& "-"&month(rs("updatetime"))& "-"&day(rs("updatetime"))
%>