<% NomFile = Server.MapPath (".") + "\inc\guest.cfg" Set FileObject = Server.CreateObject("Scripting.FileSystemObject") formin = Request.Form("nom") if len(formin)>0 then if IsNumeric(formin) then formin = CINT(formin) if formin>0 then Set Out = FileObject.CreateTextFile(NomFile, TRUE, FALSE) Out.WriteLine(formin) end if end if end if if not FileObject.FileExists(NomFile) then Set Out = FileObject.CreateTextFile(NomFile, TRUE, FALSE) Out.WriteLine("10") end if Set Out = FileObject.OpenTextFile(NomFile, 1, FALSE, FALSE) NoM = Out.ReadLine Set Out = Nothing Set FileObject = Nothing ' NoM = 3 'Number of Messages Pages = 1 counter = NoM Pageid = Request.QueryString("PageId") if len(PageId)<1 then Pageid = 1 else Pageid = CINT(Pageid) end if sql = "SELECT Count(ID) AS temp FROM guest;" Set rstemp =conntemp.execute(sql) if not rstemp.eof then Pages = CINT(rstemp.Fields("temp"))/NoM if Pages>CINT(Pages) then Pages = CINT(Pages)+1 else Pages = CINT(Pages) end if end if sql = "SELECT * FROM guest ORDER BY Datum desc" Set rstemp=conntemp.execute(sql) %> <% IF session("level") = 1 THEN %> <%end if%> <% On Error Resume Next rstemp.MoveFirstempt for i=1 to ((PageID-1)*NoM) if not rstemp.eof then rstemp.Movenext end if next do while Not rstemp.eof and not counter=0 counter = counter -1 %> <% rstemp.MoveNext loop rstemp.close set rstemp=nothing conntemp.close set conntemp=nothing%>
&bull; <% IF session("level") = 1 THEN %> Logout (leave admin mode) <% ELSE %> Guestbook <% END IF %>Page <%=Pageid%>
Here you can Change the number of entries which is shown per page

 

 

?Subject=Re: Guestbook Entry"><%= rstemp.Fields("Name") %> - <%= rstemp.Fields("Ort") %> <% IF session("level") = 1 THEN my_link="edit.asp?which=" & rstemp.Fields("ID") %>

Edit Guestbook Entry  <% my_link="delete.asp?which=" & rstemp.Fields("ID")%> Delete Guestbook Entry <% END IF %>

Homepage: " target="_blank"><%= rstemp.Fields("Url") %>
<%= rstemp.Fields("Nachricht") %>
Date: <%= rstemp.Fields("Datum") %>
&bull; Page <%=Pageid%> : <% if not PageID=1 then%> << backward - <%end if for i=1 to Pages%> <%=i%> <%next if not PageID=Pages then%> - foreward >> <%end if %>