<% page=request("page") Set conn = Server.CreateObject("ADODB.Connection") DBPath = Server.MapPath("Gbook.mdb") conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath SET rs = Server.CreateObject("ADODB.Recordset") SET rs1 = Server.CreateObject("ADODB.Recordset") rs.Open "Select * From guest order by id desc" , conn,1,3 rs.PageSize = 10 '設定每頁顯示留言筆數 Page = CLng(Request("Page")) ' CLng 不可省略 If Page < 01 Then Page = 01 If Page > rs.PageCount Then Page = rs.PageCount If Not rs.eof Then ' 有資料才執行 RS.AbsolutePage = PAGE ' 將資料錄移至 PAGE 頁 End if %> KUANG

 
 
                                                
 
   
 

  

 

我要留言    重新整理    管理模式   


<%if session("username")<>"" or session("password")<>"" then%>《登出》<%end if%>  <% If Page <> 1 Then Response.Write "【第一頁】" Response.Write "【上一頁】" End If If Page <> rs.PageCount Then Response.Write "【下一頁】" Response.Write "【最後一頁】" End If %> 頁次:<%=Page%>/<%=rs.PageCount%> <%if rs.pagecount=1 then else%> 快速跳頁:

<%if rs.eof then else%> <%for i=1 to rs.pagesize%> <%if rs.eof then exit for%>
<%=rs("name")%>﹞ <%=rs("sex")%> <%if rs("url")<>"http://" then%>" target="_blank">個人網站<%end if%> <%if rs("mail")<>"" then%>">信箱:<%=rs("><%end if%> <%if year(rs("time"))=year(date()) and month(rs("time"))=month(date()) and day(rs("time"))=day(date()) then%><%end if%>
  <%=rs("txt")%>

<%if session("name")="版主" then %>《">刪除》<%end if%> ">回覆留言 留言時間:<%=rs("time")%> IP位置:<%=rs("IP")%>

<%if rs("re")<>0 then%> <%rs1.open "select * from re_guest where id="&rs("id")&" order by id_2 desc" , conn,1,3%> <% do until rs1.eof%> <% if rs1.eof then exit do%>
回覆者:<%=rs1("name")%> <%if rs1("url")<>"http://" then%>" target="_blank">個人網站<%end if%> <%if rs1("mail")<>"" then%>">信箱:<%=rs1("><%end if%> 回覆時間:<%=rs1("time")%> <%if year(rs1("time"))=year(date()) and month(rs1("time"))=month(date()) and day(rs1("time"))=day(date()) then%><%end if%> <%if session("name")="版主" then %>《">刪除》<%end if%>
  <%=rs1("txt")%>
<%rs1.movenext%> <%loop rs1.close%> <%end if%>

<%rs.movenext%> <%next%> <%end if%>