<p align="center"><a href="index.php?section=gbeintrag">Ins Gästebuch eintragen
</a></p>
<p>
<?php
$ErgebnisseProSeite = 5;
$DatabasePointer=mysql_connect("localhost", "xxx", "xxx");
mysql_select_db("xxx", $DatabasePointer);
if(!isset($_REQUEST['AktuelleSeite']))
{
$AktuelleSeite=0;
}
else
{
$AktuelleSeite=$_REQUEST['AktuelleSeite'];
}
$ResultPointer=mysql_query("SELECT * FROM gb ORDER BY Datum DESC LIMIT $AktuelleSeite, $ErgebnisseProSeite", $DatabasePointer);
$Anzahl=mysql_num_rows(mysql_query("SELECT * FROM gb ORDER BY Datum DESC", $DatabasePointer));
echo"<table border=\"0\" widht=\"100%\">";
for($i=0; $i<mysql_num_rows($ResultPointer); $i++)
{
$Gaestebuch=mysql_fetch_object($ResultPointer);
echo "<tr widht=\"100%\">",
"<td widht=\"100%\"><b>",
"<font color=\"#FF0000\" size=\"2\" face=\"arial\">",$Gaestebuch->Name,"</font>","<font size=\"1\" color=\"CCCCCC\" face=\"Arial\">","<div align=\"right\">",$Gaestebuch->id,"</div>","","</font>","<div align=\"rileft\">","<font size=\"1\" color=\"CCCCCC\" face=\"Arial\">","<a href=\"mailto:$Gaestebuch->EMail\">",$Gaestebuch->EMail,"</a>","<br>", "<a href=\"http://$Gaestebuch->Url\">",$Gaestebuch->Url,"</a>","</font>","</div>","<div align=\"right\">","<font size=\"1\" color=\"#CCCCCC\" face=\"arial\">","<em>",substr($Gaestebuch->Datum, 8, 2),
".",
substr($Gaestebuch->Datum, 5, 2),
".",
substr($Gaestebuch->Datum, 0, 4),
" ",
substr($Gaestebuch->Datum, 10),"</font>","</div>",
"</b></td>",
"</tr>",
"<tr widht=\"100%\">",
"<td widht=\"100%\">",
nl2br($Gaestebuch->Eintrag),
"</td>",
"</tr>",
"<tr widht=\"100%\">",
"</b></td>",
"</tr>",
"<tr widht=\"100%\">",
"<td widht=\"656\"><hr size=\"1\" noshade widht=\"100%\"></td>",
"</tr>";
}
echo "</table>";
if($Anzahl>$ErgebnisseProSeite)
{
$Seiten=intval($Anzahl/$ErgebnisseProSeite);
if($Anzahl%$ErgebnisseProSeite)
{
$Seiten++;
}
echo"Seite ";
}
for($i=1; $i<=$Seiten; $i++)
{
echo"<a href=\"index.php?section=gb&AktuelleSeite=",
($i-1)*$ErgebnisseProSeite,
"\">$i</a> ";
}
?>
</p>
<p> </p>
</body>
</html>