<% Const MaxPerPage=12 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 rsnw = Server.CreateObject("ADODB.Recordset") SortSql = "Select * From mynews order by id DESC" rsnw.Open SortSql, conn, 1,1 PAGE = Request("PAGE") IF PAGE = "" THEN PAGE = 1 ELSE PAGE = PAGE END IF rsnw.PageSize = 12 '設定你要的新聞筆數 webtitle="法律常識" %>
Menu 法律常識
<% Function showpage(totalnumber,maxperpage,filename) Dim n If totalnumber Mod maxperpage=0 Then n= totalnumber \ maxperpage Else n= totalnumber \ maxperpage+1 End If Response.Write "" Response.Write "

" If CurrentPage<2 Then Response.Write "首頁 上一頁 " Else Response.Write "首頁 " Response.Write "上一頁 " End If If n-currentpage<1 Then Response.Write "下一頁 尾頁" Else Response.Write "" Response.Write "下一頁 尾頁" End If Response.Write " 頁次:"&CurrentPage&"/"&n&"頁 " Response.Write " 共有"&totalnumber&"項常識 " Response.Write "轉到:" Response.Write " " End Function %>

<%if rsnw.eof then%> <%else%> <% totalPut=rsnw.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,"itam3.asp" else if (currentPage-1)*MaxPerPage <%rsnw.MOVENEXT IF rsnw.EOF THEN EXIT FOR NEXT End Sub %> <%end if%>

抱歉,尚未選寫任何常識

<%=rsnw("top")%>...(','letter','scrollbars=yes,resizable=yes,width=400,height=300')">詳文) <%if year(rsnw("d"))=year(date()) and month(rsnw("d"))=month(date()) and day(rsnw("d"))=day(date()) then%> <%end if%>

<%=rsnw("d")%>