<%@ codepage="936" %> 北美洲工作犬會(遠東區)
 
 
 
 
 您的位置:首 頁>>公告
<% Const MaxPerPage=1 dim totalPut dim CurrentPage dim TotalPages dim j dim sql if Not isempty(request("page")) then currentPage=Cint(request("page")) else currentPage=1 end if set rs=server.CreateObject("adodb.recordset") rs.open "select * from Article where classid=24 order by adddate desc",conn,1,1 if err.number<>0 then response.write "

資料庫中暫時無數據

" end if if rs.eof And rs.bof then Response.Write "

對不起,目前還沒有資訊!

" else totalPut=rs.recordcount if currentpage<1 then currentpage=1 end if if (currentpage-1)*MaxPerPage>totalput then if (totalPut mod MaxPerPage)=0 then currentpage= totalPut \ MaxPerPage else currentpage= totalPut \ MaxPerPage + 1 end if end if if currentPage=1 then showContent showpage totalput,MaxPerPage,"news_1.asp" else if (currentPage-1)*MaxPerPage <%do while not rs.eof%>
 
<%=rs("title")%>
時間:<%=rs("dateandtime")%>

 

<%=ubbcode(rs("content"))%>

<%=ubbcode(rs("img"))%>


<%i=i+1 if i>=MaxPerPage then Exit Do rs.movenext loop rs.close set rs=nothing%> <% End Sub Function showpage(totalnumber,maxperpage,filename) Dim n If totalnumber Mod maxperpage=0 Then n= totalnumber \ maxperpage Else n= totalnumber \ maxperpage+1 End If %>
>

<% If CurrentPage<2 Then %> 首 頁 上一頁 <% Else %> ?page=1>首 頁 ?page=<% = CurrentPage-1 %>>上一頁 <% End If If n-currentpage<1 Then %> 下一頁 末 頁 <% Else %> ?page=<% = (CurrentPage+1) %>>下一頁 ?page=<% = n %>>末 頁 <% End If %> 第 <% = CurrentPage %> 頁 共 <% = n %> 頁 共 <% = totalnumber %> 條資訊 每頁 <% = maxperpage %> 條資訊 轉到第:> 頁

<% End Function %>