<% 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

 
 
                                                
 
   
 

  

 

View Message    Refresh   


<%if session("username")<>"" or session("password")<>"" then%>《Logout》<%end if%>  <% If Page <> 1 Then Response.Write "【Page 1】" Response.Write "【Up】" End If If Page <> rs.PageCount Then Response.Write "【Down】" Response.Write "【Last Page】" End If %>  <%if rs.pagecount=1 then else%> Page/:

<%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 %>《">Delete》<%end if%> ">回覆留言 Time:<%=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%>
Reply:<%=rs1("name")%> <%if rs1("url")<>"http://" then%>" target="_blank">個人網站<%end if%> <%if rs1("mail")<>"" then%>">信箱:<%=rs1("><%end if%> Time:<%=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 %>《">Delete》<%end if%>
  <%=rs1("txt")%>
<%rs1.movenext%> <%loop rs1.close%> <%end if%>

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