<% RecordPerPage =20 If Request.ServerVariables("CONTENT_LENGTH") = 0 and Request.ServerVariables("Query_String")="" Then absPageNum = 1 end if sql="select * from news order by date1 desc,id desc " If Request.ServerVariables("CONTENT_LENGTH")<>0 Then absPageNum =CInt(Request.Form("pageno1")) end if 'response.write sql 'response.end set rs=server.createobject("adodb.recordset") rs.CacheSize = RecordPerPage rs.open sql,conn,3,2 if rs.eof then Response.write "" rs.close conn.close Response.end end if rs.PageSize = RecordPerPage TotalPages = rs.PageCount if Request.ServerVariables("Query_String")<>"" then absPageNum = CInt(Request.QueryString("pageno")) if Request.QueryString("action")="fristp" then absPageNum = 1 ElseIf Request.QueryString("action")="lastp" then absPageNum =TotalPages ElseIf Request.QueryString("action")="pgupp" then absPageNum = absPageNum-1 ElseIf Request.QueryString("action")="pgdnp" then absPageNum = absPageNum+1 end if end if if absPageNum<1 then absPageNum=1 elseif absPageNum>totalpages then absPageNum =totalpages end if If Not(rs.EOF) Then rs.AbsolutePage = absPageNum End If %>
<% if not rs.eof then For absRecordNum1 = 1 to rs.PageSize/2 %> ">■<%=left(rs("title"),22)%>...
<% rs.movenext If rs.EOF Then Exit For End If Next End If %>
<% if not rs.eof then For absRecordNum1 = 1 to rs.PageSize/2 %> ">■<%=left(rs("title"),22)%>...
<% rs.movenext If rs.EOF Then Exit For End If Next end if %>
" style="padding:0px;margin:0px">
?action=fristp&pageno=<%=absPageNum%>&ntype=<%=ntype%>">
?action=fristp&pageno=<%=absPageNum%>&ntype=<%=ntype%>" class="l1"> 首頁 ?action=pgupp&pageno=<%=absPageNum%>&ntype=<%=ntype%>" class="l1">上頁 ?action=pgdnp&pageno=<%=absPageNum%>&ntype=<%=ntype%>" class="l1">下頁 ?action=lastp&pageno=<%=absPageNum%>&ntype=<%=ntype%>" class="l1">末頁
?action=pgupp&pageno=<%=absPageNum%>&ntype=<%=ntype%>"> ?action=pgdnp&pageno=<%=absPageNum%>&ntype=<%=ntype%>"> ?action=lastp&pageno=<%=absPageNum%>&ntype=<%=ntype%>">
    共 <%= TotalPages %> 頁 <%=rs.recordcount%>筆記錄