Jeg har rettet lidt i koden som så ser sådan ud: Jeg har desværre ikke haft mulighed for at teste det - men det ka' du jo gøre. :-)
<% side = "guestbook" %>
<!-- #include file="count-script.txt" -->
<html>
<head>
<title>Kennel Denhearts :: Dogue de Bordeaux ::</title>
<style type="text/css">
<!--
body { font-family: Verdana, Arial; font-size: 8pt; color: #000000; text-decoration: none;}
td { font-family: Verdana, Arial; font-size: 8pt; color: #000000; text-decoration: none;}
a { font-family: Verdana, Arial; font-size: 8pt; color: #ffffff; font-weight: bold; text-decoration: none; cursor: hand}
a:hover { font-family: Verdana, Arial; font-size: 8pt; color: #000000; text-decoration: none; cursor: hand}
-->
</style>
<style type="text/css">
BODY{
scrollbar-3d-light-color: #c5c5a8;
scrollbar-arrow-color: #000000;
scrollbar-base-color: #000000;
scrollbar-dark-shadow-color: #ffffff;
scrollbar-face-color: #999988;
scrollbar-highlight-color: #ffffff;
scrollbar-shadow-color: #ffffff;
}
</style>
</head>
<body bgcolor="#666666" leftmargin="0" topmargin="0">
<%
intPage = Request("page")
If isNumeric(intPage) = False Or intPage < 1 Then
intPage = 1
End If
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & server.MapPath("guestbook.mdb")
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open "SELECT * FROM guestbook ORDER BY Dato desc;", strDSN, 1, 3
rs.PageSize = 5
rs.AbsolutePage = intPage
intRecCount = rs.PageSize
intPageCount = rs.PageCount
'response.write SQLstmt
%>
<table width="100%" border="0" height="100%">
<tr>
<td align="center" valign="middle">
<table width="660" border="0" cellspacing="4" height="400" bgcolor="#666666">
<tr>
<td rowspan="2" bgcolor="999988" width="150" valign="top" align="center">
<!--#include file="menu.htm" -->
</td>
<td bgcolor="c5c5a8" valign="middle" align="center" height="60"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="520" height="35">
<param name=movie value="flash/guestbook.swf">
<param name=quality value=high><param name="LOOP" value="false">
<embed src="flash/guestbook.swf" quality=high pluginspage="
http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="520" height="35" loop="false">
</embed>
</object></td>
</tr>
<tr>
<td bgcolor="c5c5b8" valign="top" align="center" height="344">
<table width="470" border="0" cellspacing="0">
<tr>
<td valign="top">
<p> </p>
</td>
</tr>
<tr>
<td valign="top" bgcolor="#000000" height="1"></td>
</tr>
<tr>
<td valign="top" bgcolor="999988">
<div align="right"><a href="form.asp">Please write in the guestbook</a> </div>
</td>
</tr>
<tr>
<td valign="top" bgcolor="#000000" height="1"></td>
</tr>
<tr>
<td valign="top" align="left">
<%
for I = 1 to RS.PageSize
ID = rs("ID")
overskrift = rs("overskrift")
besked = rs("besked")
navn = rs("navn")
Dato = rs("Dato")
email = rs("email")
www = rs("www")
%>
<font size="1"><%=dato%><br>written by:<a href="mailto:<%=email%>"> <%=navn%></a><br>homepage:<a href="<%=www%>" target="_blank"> <%=www%></a></font><br><br>
<font size=2><b><%=overskrift%></b></font><br><br>
<%=besked%><br>
<hr noshade size="1" color="000000">
<%
rs.MoveNext
if RS.EOF then exit for
next
RS.Close
conn.Close
Set conn = nothing
Set SQLstmt = nothing
%>
</td>
<%
Set rs = Server.CreateObject("ADODB.RecordSet")
strDSN = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ="&Server.MapPath("guestbook.mdb")
rs.Open "SELECT ID FROM guestbook ORDER BY Dato desc;", strDSN, 1, 3
If Not (rs.BOF Or rs.EOF) Then
rs.PageSize = 5
rs.AbsolutePage = intPage
intRecCount = rs.PageSize
intPageCount = rs.PageCount
Response.Write "<p><b>Side " & intPage & " af " & intPageCount & "</b></p>"
Do While Not rs.EOF And intRecCount > 0
Response.Write rs("ID") & "<br>"
intRecCount = intRecCount - 1
rs.MoveNext
Loop
End If
rs.Close
Set rs = Nothing
Response.Write "<p>Gå til side "
For intNum = 1 To intPageCount
Response.Write "<a href=guestbook2.asp?page=" & intNum & ">" & intNum & "</a> "
Next
Response.Write "<p>"
If Clng(intPage) > 1 Then
Response.Write "<a href=guestbook2.asp?page=" & intPage - 1 & "><<</a>"
Else
Response.Write "<<"
End If
Response.Write " "
If Clng(intPage) < Clng(intPageCount) Then
Response.Write "<a href=guestbook2.asp?page=" & intPage + 1 & ">>></a> "
Else
Response.Write ">>"
End If
%>
</tr>
<tr>
<td valign="top" bgcolor="#000000" height="1"></td>
</tr>
<tr>
<td valign="top" bgcolor="999988"><div align="right"><a href="form.asp">Please write in the guestbook</a> </div></td>
</tr>
<tr>
<td valign="top" bgcolor="#000000" height="1"></td>
</tr>
</table>
<p> </p>
</td>
</tr>
</table>
<table width="660" border="0" cellspacing="0">
<tr>
<td> </td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>