if(empty($GBName))
{
setcookie( "GBName", $name, time()+99999999);
$GBName=$name;
}
if(empty($GBEmail))
{
setcookie( "GBEmail", $email, time()+99999999);
$GBEmail=$email;
}
include ("connect.inc.php3");
include("$header");
include ("$lang.inc.php3");
if ($show < 1) {
if ("$show" == "all") {
print "
$submit ";
} else {
include ("form.inc.php3");
}
}
else {
print "$submit ";
}
if (!isset($show)) $show=0;
{
$result1 = mysql_query("select Count(*) as total from $userstable") or die(mysql_error());
$row=mysql_fetch_Array($result1);
$total=$row[total];
}
if ($show < $total){
$query = "select * from $userstable order by id desc limit $show, $limit";
$result = mysql_query($query);
$number = mysql_numrows($result);
}
elseif ($show = all){
$query = "select * from $userstable order by id desc";
$result = mysql_query($query);
$number = mysql_numrows($result);
}
$i = 0;
IF ($number == 0){
print "$no_entry";
}
elseif ($number > 0) {
print "$total_entries: $total
";
while ($i < $number){
$row = mysql_fetch_array($result);
$name = stripslashes($row[name]);
$email = $row[email];
$url = $row[url];
$titel = stripslashes($row[titel]);
$kommentar = stripslashes(nl2br($row[kommentar]));
$host = $row[host];
$zeit = $row[zeit];
$reply = stripslashes(nl2br($row[reply]));
PRINT "";
PRINT "$name ";
if ($host == ""){
print "from old guestbook";
}
else {
print " $from_host $host";
}
print " $am $zeit |
";
if ($url == "http://") { } else {
print "$titel | ";
}
print "";
print "$kommentar | ";
if ($reply == "") { } else {
print "--$reply | ";
}
print "
";
print "";
$i++;
}
}
include ("pages.inc.php3");
include("$footer");
?>