<% PageNo = request("page") If PageNo="" then %>
Thankyou for taking the time to leave your mark here at the Virginia Military Vehicle Association.
<% PageNo=1 ElseIf PageNo=1 then %> Sign the Guestbook
<%
Else
%>
Sign the Guestbook
<%
End If
set conn = server.createobject("adodb.connection")
DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; "
' set the actual path to the guestbook below - this example
' assumes that the guestbook is in the web server root
DSNtemp=dsntemp & "DBQ=" & server.mappath("access_db/guestbook.mdb")
conn.Open DSNtemp
sqlstmt = "SELECT * from Guestbook ORDER BY PostDate DESC"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sqlstmt, conn, 3, 3
TotalRecs = rs.recordcount
rs.Pagesize=10
TotalPages = cInt(rs.pagecount)
rs.absolutepage=PageNo
If PageNo = 1 then
response.write "
There are " & TotalRecs & " entries in " & TotalPages & " pages
"
End If
If rs.eof then
response.write "
Sign the Guestbook
| <%= When %> | ||
|
<%= Comments %> |
||
| <% If IsEmpty(Email) or Email="" then response.write(Name) Else response.write "" & Name & "" End If %> | <%= City %> <%= State %> | <%= Link %> |
<% rs.MoveNext End If Next response.write "
| " If PageNo > 1 then response.write "" Else response.write " " End If response.write " | " If NOT rs.eof then response.write "" Else response.write " " End If response.write " |
