%
T_Classid=31001
Maxcount=15
Sql="Select ID,Classid,Title,InputDate From tbl_info where Classid="&T_Classid&" order by ID Desc"
Set Rs=Server.CreateObject("ADODB.Recordset")
Rs.Open Sql,Conn,1,3
%>
治疗案例
<% If Rs.Eof or Rs.Bof Then%>
暂时没有找到或者没有发布该类文章!
<%Else
Count=Rs.RecordCount
If Count/Maxcount> (Count\Maxcount) then
TotalPage=(Count\Maxcount)+1
Else
TotalPage=(Count\Maxcount)
End if
PageCount= 0
Rs.MoveFirst
If Request.QueryString("Page")<>"" then PageCount=CInt(Request.QueryString("Page"))
If PageCount<=0 then PageCount=1
If PageCount> TotalPage then PageCount = TotalPage
Rs.Move (PageCount-1)*Maxcount
For I=1 to Maxcount
If Rs.Eof Then
Exit For
End If
%>