<% '-------------------------------- 'This is the main script which will 'show all the signed entry '-------------------------------- dim PageNo ' page number retrieved from the URL dim NextPage'URL of next page dim PrevPage'URL of previous page dim Counter ' current record, used for paging PageNo=Request.QueryString("page") 'If the page no is not passed intialized the variable if not len(trim(PageNo))>0 then PageNo=1 'Intialize the connection and the recordset Set Conn = Server.CreateObject("ADODB.Connection") Conn.Provider = "Microsoft.Jet.OLEDB.4.0" Conn.ConnectionString = "Data Source=" & Path Conn.Open Set Rs = Server.CreateObject("ADODB.Recordset") Rs.Open "SELECT * from guest order by date desc", Conn, 1,3 'fill the variable with the path of the image if not len(trim(LogoImage))>0 then logo="" else logo="" if not len(trim(BackImage))>0 then back="" else back="background='" & BackImage & "'" if not len(trim(DivImage))>0 then divider="" else divider="" 'Pagesize, i.e number of record displayed per page Rs.PageSize =RsPage 'Current page number Rs.AbsolutePage =PageNo 'Check whether there is any record in previous page if Rs.AbsolutePage*Rs.PageSizeNext " & RsPage & "" else NextPage=PageNo NextPage="" end if if PageNo>1 then PrevPage=PageNo-1 PrevPage="Previous " & RsPage & "" else PrevPage=PageNo PrevPage="" end if %> Guest Book

bgproperties="fixed">

                                                              

 

Return Back  |  Sign Guest Book 

<%=divider%>

<% Do while not Rs.EOF if Counter=Rs.PageSize then exit do if len(rs("note"))>0 then note=Replace(rs("note"),vbcrlf,"
") else note="" end if if len(rs("email"))>0 then email="" & rs("name") & "" else email=rs("name") end if %>
Name <%=email%>
URL "><%=rs("url")%>
Posted On <%=rs("date")%>
Message <%=note%>

<%=divider%>

<% Rs.MoveNext Counter=Counter+1 loop Rs.Close Conn.Close set Rs=nothing set Conn=nothing %>

<%=PrevPage%> | <%=NextPage%>