<% set rs = Server.CreateObject("ADODB.RECORDSET") sql="select * from GuestBook order by GFlow desc" rs.Open sql, conn, 1, 3 iPage=1 rs.PageSize = guestPage ' 設定每頁顯示幾筆 Page = CLng(Request("Page")) '取所要瀏覽的頁次(CLng 不可省略) if page = "" or page < 1 then '頁數的指定 page = 1 elseif page > rs.pagecount then page = rs.PageCount else page = page end if If Not rs.eof Then ' 有資料才執行 rs.AbsolutePage = page ' 將資料錄移至 PAGE 頁 End if %>
 
我要留言 目前位於第<%=page%>頁 | 共<%=rs.RecordCount%>筆 / <%=rs.pagecount%>頁 | 快速跳頁

<% IF not rs.eof then ' 如果有資料 FOR iPage=1 to rs.PageSize ' 顯示資料 %>
<%=(rs.RecordCount+1)-((page-1)*10+iPage)%> <%if rs("GForManage") = "M" then%> admin <%else%> name <%end if%> : <%=rs("GName")%>   <%=datevalue(rs("GDateTime"))%>
  Title: <%=rs("GSubject")%>
<% if rs("GForManage") = "M" then %> <% elseif rs("GForManage") = "Y" then %> <% else %> <% end if %> <% if rs("RContent") <> "" then %> <% end if%>

<%=Replace(Replace(rs("GContent"),"|","'"),vbCrLf,"
")%>

" width="96" height="96" border="1" style="border: 1px solid #666666">
" width="96" height="96" border="1" style="border: 1px solid #666666">

.......... 只留言給管理者 ..........

" width="96" height="96" border="1" style="border: 1px solid #666666">

<%=Replace(Replace(rs("GContent"),"|","'"),vbCrLf,"
")%>

<%=datevalue(rs("RDateTime"))%> <%=rs("RName")%> - 回覆

" width="96" height="96" border="1" style="border: 1px solid #666666">

<%=Replace(Replace(rs("RContent"),"|","'"),vbCrLf,"
")%>


---------------------------------------------------------------------------------------------------------

<% rs.MoveNext IF rs.EOF THEN EXIT FOR Next End If %>
|<< >上一頁>下一頁 >>|
目前位於第<%=page%>頁 | 每頁10筆 | 共<%=rs.RecordCount%>筆 / <%=rs.pagecount%>頁 | 快速跳頁
<% set rs = nothing set conn = nothing %>