Location: PHPKode > projects > PHP-Fusion: Guestbook > inf_guestbook_v4.12/files/infusions/guest_book/guest_book.php
<?php
/*-------------------------------------------------------+
| Guestbook Infusion 4.12
| Author: Sebastian Schüssler (slaughter)
| Download:
| http://basti2web.de
+--------------------------------------------------------+
| Filename: guest_book.php
| Version: 4.12
| Author: Sebastian Schüssler (slaughter)
| Co-Author: Valerio Vendrame (lelebart)
| Co-Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/

require_once "../../maincore.php";

require_once INFUSIONS."guest_book/infusion_db.php";
require_once INFUSIONS."guest_book/includes/functions.php";

// Header
switch(UCC_PHPF_VER) {
case 6:
	require_once BASEDIR."subheader.php";
	require_once BASEDIR."side_left.php";
	break;
case "BSF":
	require_once BASEDIR."subheader.php";
	require_once BASEDIR."side_left.php";
	break;
case 7:
	require_once THEMES."templates/header.php";
	break;
default:
	redirect(INFUSIONS."guest_book/admin/error.php?id=3");
}

if (file_exists(INFUSIONS."guest_book/locale/".$settings['locale'].".php")) {
	include INFUSIONS."guest_book/locale/".$settings['locale'].".php";
} else {
	include INFUSIONS."guest_book/locale/English.php";
}

require_once INFUSIONS."guest_book/includes/functions_seo.php";

if (UCC_PHPF_VER == 7) add_to_title($locale['global_200'].$locale['gb_100']);

if (isset($_GET['action'])) { $action = stripinput($_GET['action']); } else { $action = ''; }
if ($action == "edit" && !GB_ADMIN) { $action = ''; }
if (isset($_GET['guestbook_id']) && isnum($_GET['guestbook_id'])) { $guestbook_id = $_GET['guestbook_id']; } else { $guestbook_id = ''; }
$gb_done_message = 0;


if (GB_ADMIN && $action == "delete" && guestbook_id != '') {
	$result = dbquery("DELETE FROM ".DB_GB_ENTRY." WHERE gb_id='$guestbook_id'");
	redirect(FUSION_SELF);

} elseif (GB_ADMIN && $action == "activate" && guestbook_id != '') {
	$result = dbquery("UPDATE ".DB_GB_ENTRY." SET gb_show = '1' WHERE gb_id='$guestbook_id'");
	redirect(FUSION_SELF);

} elseif (GB_ADMIN && $action == "hide" && guestbook_id != '') {
	$result = dbquery("UPDATE ".DB_GB_ENTRY." SET gb_show = '0' WHERE gb_id='$guestbook_id'");
	redirect(FUSION_SELF);

} elseif (isset($_POST['guest_submit'])) {
	$errorspace = false;
	$spambot = false;
	$sysflood = false;
	$errorcap = false;

	$guest_name = trim(stripinput($_POST['guest_name']));
	$guest_email = trim(stripinput($_POST['guest_email']));
	$guest_weburl = trim(stripinput($_POST['guest_weburl']));
	$guest_webtitle = trim(stripinput($_POST['guest_webtitle']));
	$guest_message = trim(stripinput($_POST['guest_message']));



if(!strpos($guest_email, "@") OR !gb_check_email($guest_email)) {
  $guest_email = "";
}

if($guest_name == "" || $guest_message == "" || ($guest_email == "" && $gb_config['gb_email_required'] == 1)){
	$errorspace = true;
}


if (!checkgroup($gb_config['gb_flood_access'])) {
 if (gb_control_flood(USER_IP))
 {
 $sysflood = true;
 gb_loged("flood", $guest_name, $guest_email, $guest_weburl, $guest_message, $guest_webtitle);
 }
}


if ($action != "edit" && !checkgroup($gb_config['gb_captcha_access'])) {
	if($gb_config['gb_captcha_type'] == "3") {
		include_once INCLUDES."securimage/securimage.php";
		$securimage = new Securimage();
		if (!isset($_POST['captcha_code']) || $securimage->check($_POST['captcha_code']) == false) {
			$errorcap = true;
		}
	} else {
 	 	if (!gb_check_captcha($_POST['captcha_encode'], $_POST['captcha_code'])) {
			$errorcap = true;
		}
	}
}


if (!checkgroup($gb_config['gb_spam_access'])) {
 $spamcheck = $guest_name.$guest_weburl.$guest_webtitle.$guest_message;
 if (gb_control_spam($spamcheck))
 {
 $spambot = true;
 if($errorcap != true) gb_loged("spam", $guest_name, $guest_email, $guest_weburl, $guest_message, $guest_webtitle);
 }
}


if ($sysflood == true) {
 	$locale['gb_138'] = sprintf($locale['gb_138'], gb_floodtime($gb_config['gb_flood_time']));
	opentable($locale['gb_112']);
	echo "<div align='center'><b>".$locale['gb_133']."</b><br />\n<span class='small'>";
	echo $locale['gb_137']."<br />".$locale['gb_138']."</span></div>\n";
	closetable();
} elseif ($spambot == true) {
	opentable($locale['gb_112']);
	echo "<div align='center'><b>".$locale['gb_133']."</b><br />\n<span class='small'>";
	echo $locale['gb_136']."</span></div>\n";
	closetable();
} elseif ($errorcap == false && $errorspace == false ) {

		// make sure, that the message is not too long
		$guest_message = substr($guest_message,0,3000).(strlen($guest_message)>3000 ? "..." : "");
		// make sure, that the message does not destroy the layout
		$guest_message = wordwrap($guest_message, 100, " ", 1);

		$guest_name = censorwords($guest_name);
		$guest_email = censorwords($guest_email);
		$guest_weburl = censorwords($guest_weburl);
		$guest_webtitle = censorwords($guest_webtitle);
		$guest_message = censorwords($guest_message);

			if ($action == "edit" && GB_ADMIN) {
			 	$admin_comment = trim(stripinput($_POST['admin_comment']));;
			 	$admin_name = trim(stripinput($_POST['admin_name']));;
				$result = dbquery("UPDATE ".DB_GB_ENTRY." SET gb_name='$guest_name', gb_email='$guest_email', gb_weburl='$guest_weburl', gb_webtitle='$guest_webtitle', gb_message='$guest_message', gb_comment='$admin_comment', gb_comment_user = '$admin_name' WHERE gb_id='$guestbook_id'");
			redirect(FUSION_SELF);
			} else {

				if (!checkgroup($gb_config['gb_moderated_access']) && $gb_config['gb_moderated'] == 1)
				{ $gb_show = 0; $gb_done_message = 2; } else { $gb_show = 1; $gb_done_message = 1; }

				$result = dbquery("INSERT INTO ".DB_GB_ENTRY." (gb_name, gb_email, gb_weburl, gb_webtitle, gb_message, gb_show, gb_datestamp, gb_ip) VALUES('$guest_name', '$guest_email', '$guest_weburl', '$guest_webtitle', '$guest_message', '".$gb_show."', '".time()."', '".USER_IP."')");


if($gb_config['gb_notify_kind'] == "pm" && iUSER < $gb_config['gb_notify_who']) {
	$result = gb_notify_select($gb_config['gb_notify_who']);
	$text =  sprintf($locale['gb_281'],$guest_name).":\n\n[quote]".$guest_message."[/quote]";
	if($gb_config['gb_moderated'] == 1) { $text .= "\n\n".$locale['gb_282']; }
	$pm_from_id = iMEMBER ? $userdata['user_id'] : "1";
	while ($data = dbarray($result)) {
		$result_sndmsg = dbquery("INSERT INTO ".DB_MESSAGES." (message_to, message_from, message_subject, message_message, message_smileys, message_read, message_datestamp, message_folder) VALUES ('".$data['user_id']."', '".$pm_from_id."', '".$locale['gb_280']."', '".$text."', 'n', '0', '".time()."', '0')"); 
	}
}
elseif($gb_config['gb_notify_kind'] == "mail" && iUSER < $gb_config['gb_notify_who']) {
	require_once INCLUDES."sendmail_include.php";
 	$result = gb_notify_select($gb_config['gb_notify_who']);
	$text =  sprintf($locale['gb_281'],$guest_name).":\n\n".$guest_message;
	if($gb_config['gb_moderated'] == 1) { $text .= "\n\n".$locale['gb_282']; }
	while ($data = dbarray($result)) {
		sendemail($data['user_name'], $data['user_email'], $settings['siteusername'], $settings['siteemail'], $settings['sitename']." - ".$locale['gb_280'], $text);
	}
}

			}
} else {
		opentable($locale['gb_130']);
		echo "<div align='center'><b>".$locale['gb_133']."</b><br />\n<span class='small'>";
		if ($errorcap) echo $locale['gb_134'];
		if ($errorcap && $errorspace) echo "<br />\n";
		if ($errorspace) echo $locale['gb_135'];
		echo "</span></div>\n";
		closetable();
}
} elseif ($action == "edit" && GB_ADMIN) {
	$result = dbquery("SELECT * FROM ".DB_GB_ENTRY." WHERE gb_id='$guestbook_id'");
	if (dbrows($result)) {
		$data = dbarray($result);
		$guestbook_name = $data['gb_name'];
		$guestbook_email = $data['gb_email'];
		$guestbook_weburl = $data['gb_weburl'];
		$guestbook_webtitle = $data['gb_webtitle'];
		$guestbook_message = $data['gb_message'];
		$guestbook_admin_comment = $data['gb_comment'];
		$guestbook_admin_name = $data['gb_comment_user'] != '' ? $data['gb_comment_user'] : sprintf($locale['gb_123'], $userdata['user_name']);
		$formaction = FUSION_SELF."?action=edit&amp;guestbook_id=".$guestbook_id;
	} else {
		$action = "";
		if(GB_SEO) { $formaction = GB_SEO_URL1.".html"; } else { $formaction = FUSION_SELF; }
	}
} elseif(isset($_POST['guest_preview'])){
		$action = "";
		$guestbook_name = trim(stripinput($_POST['guest_name']));
		$guestbook_email = trim(stripinput($_POST['guest_email']));
		$guestbook_weburl = trim(stripinput($_POST['guest_weburl']));
		$guestbook_webtitle = trim(stripinput($_POST['guest_webtitle']));
		$guestbook_message = trim(stripinput($_POST['guest_message']));
		if(GB_SEO) { $formaction = GB_SEO_URL1.".html"; } else { $formaction = FUSION_SELF; }
} else {
	$action = "";
	$guestbook_name = iMEMBER ? $userdata['user_name'] : "";
	$guestbook_email = iMEMBER ? $userdata['user_email'] : "";
	$guestbook_weburl = (iMEMBER AND isset($userdata['user_web'])) ? $userdata['user_web'] : "";
	$guestbook_webtitle = "";
	$guestbook_message = "";
	if(GB_SEO) { $formaction = GB_SEO_URL1.".html"; } else { $formaction = FUSION_SELF; }
}
if (isset($_GET['new_message']) || isset($_POST['guest_preview']) || $action == "edit") {

if (isset($_POST['guest_preview']) && $guestbook_message != '') { 

opentable($locale['gb_150']);
//New: Guestbook Preview

		if (UCC_PHPF_VER == 6 OR UCC_PHPF_VER == "BSF") {
			$message = gb_parseubb_v6(nl2br(parsesmileys($guestbook_message)));
		} elseif (UCC_PHPF_VER == 7) {
			$message = nl2br(gb_parseubb_v7(parsesmileys($guestbook_message)));
		}

		if ($guestbook_weburl) {
			$guestbook_weburl = str_replace("http://", "", $guestbook_weburl);
			$web = "\n | <a href='http://".$guestbook_weburl."' target='_blank'>";
			if ($guestbook_webtitle) { 
				$web .= $guestbook_webtitle."</a>\n";
			} else {
				$web .= $guestbook_weburl."</a>\n";
			}
		} else {
			$web = "";
		}

		if($guestbook_email != '') {
			$name = "<b>".gb_hide_email($guestbook_email, $guestbook_name)."</b>";
		} else {
			$name = "<b>".$guestbook_name."</b>";
		}

echo "<table align='center' cellpadding='0' cellspacing='1' width='80%' class='tbl-border'>
<tr>
<td class='tbl2'>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='small'>".$name.$web."</td>\n
</tr>
</table>
</td>
</tr>
<tr>
<td class='tbl1'>".$message."</td>
</tr>
<tr>
<td class='tbl2'>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='small'>
".showdate("longdate", time())."</td>\n
</tr>
</table>
</td>
</tr>
</table>\n
<br />\n";

closetable();

}


opentable($locale['gb_112']);
echo "<form name='inputform' method='post' action='".$formaction."'>
<table align='center' cellpadding='0' cellspacing='0'>
<tr>
<td align='right' class='tbl'>".$locale['gb_113']."<span style='color:#ff0000'>*</span></td>
<td class='tbl'><input type='text' name='guest_name' value='$guestbook_name' class='textbox' style='width:200px' /></td>
</tr>";

$info_email = $gb_config['gb_email_required'] == 1 ? "<span style='color:#ff0000'>*</span>" : "";

echo "<tr>
<td align='right' class='tbl'>".$locale['gb_114'].$info_email."</td>
<td class='tbl'><input type='text' name='guest_email' value='$guestbook_email' class='textbox' style='width:200px' /></td>
</tr>
<tr>
<td align='right' class='tbl'>".$locale['gb_115']."</td>
<td class='tbl'><input type='text' name='guest_weburl' value='$guestbook_weburl' class='textbox' style='width:200px' /></td>
</tr>
<tr>
<td align='right' class='tbl'>".$locale['gb_116']."</td>
<td class='tbl'><input type='text' name='guest_webtitle' value='$guestbook_webtitle' class='textbox' style='width:200px' /></td>
</tr>\n";
if ($action != "edit" && !checkgroup($gb_config['gb_captcha_access'])) 	{
	echo "<tr>\n<td class='tbl' align='right'>".$locale['gb_119']."<span style='color:#ff0000'>*</span></td>\n<td class='tbl'>";
	if ($gb_config['gb_captcha_type'] == "3") {
	echo "<img id='captcha' src='".INCLUDES."securimage/securimage_show.php' alt='".$locale['gb_119']."' align='left' />\n";
    echo "<a href='".INCLUDES."securimage/securimage_play.php'><img src='".INCLUDES."securimage/images/audio_icon.gif' alt='' align='top' class='tbl-border' style='margin-bottom:1px' /></a><br />\n";
    echo "<a href='#' onclick=\"document.getElementById('captcha').src = '".INCLUDES."securimage/securimage_show.php?sid=' + Math.random(); return false\"><img src='".INCLUDES."securimage/images/refresh.gif' alt='' align='bottom' class='tbl-border' /></a>\n";
	} else {
	echo gb_make_captcha();
	}
	echo "</td>\n
	</tr>\n
	<tr>\n
	<td class='tbl' align='right'>".$locale['gb_120']."<span style='color:#ff0000'>*</span></td>\n
	<td class='tbl'><input type='text' name='captcha_code' class='textbox' style='width:100px' /></td>\n
	</tr>\n";
	}

echo "<tr>
<td align='right' valign='top' class='tbl'>".$locale['gb_117']."<span style='color:#ff0000'>*</span></td>
<td class='tbl'><textarea name='guest_message' rows='8' cols='50' class='textbox'>$guestbook_message</textarea><br /></td>
</tr>";

if(UCC_PHPF_VER == 6 OR UCC_PHPF_VER == "BSF") {
	if($gb_config['gb_show_bbcode'] == 1) {
	echo "<tr>
<td></td>
<td class='tbl'><input type='button' value='b' class='button' style='font-weight:bold;width:25px;' onClick=\"addText('guest_message', '[b]', '[/b]');\" />
<input type='button' value='i' class='button' style='font-style:italic;width:25px;' onClick=\"addText('guest_message', '[i]', '[/i]');\" />
<input type='button' value='u' class='button' style='text-decoration:underline;width:25px;' onClick=\"addText('guest_message', '[u]', '[/u]');\" />
<input type='button' value='url' class='button' style='width:30px;' onClick=\"addText('guest_message', '[url]', '[/url]');\" />
<input type='button' value='mail' class='button' style='width:35px;' onClick=\"addText('guest_message', '[mail]', '[/mail]');\" />
";
	if($gb_config['gb_show_image'] == 1) {
	echo "<input type='button' value='img' class='button' style='width:30px;' onClick=\"addText('guest_message', '[img]', '[/img]');\" />
";
	}
	echo "<input type='button' value='center' class='button' style='width:45px;' onClick=\"addText('guest_message', '[center]', '[/center]');\" />
<input type='button' value='small' class='button' style='width:40px;' onClick=\"addText('guest_message', '[small]', '[/small]');\" />
<br />
</td>
</tr>";
	}
	if($gb_config['gb_show_color'] == 1) {
	echo "<tr>
<td></td>
<td class='tbl'>".$locale['gb_121']."
<select name='bbcolor' class='textbox' style='width:90px;' onChange=\"addText('guest_message', '[color=' + this.options[this.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;\">
<option value=''>Default</option>
<option value='maroon' style='color:maroon;'>Maroon</option>
<option value='red' style='color:red;'>Red</option>
<option value='orange' style='color:orange;'>Orange</option>
<option value='brown' style='color:brown;'>Brown</option>
<option value='yellow' style='color:yellow;'>Yellow</option>
<option value='green' style='color:green;'>Green</option>
<option value='lime' style='color:lime;'>Lime</option>
<option value='olive' style='color:olive;'>Olive</option>
<option value='cyan' style='color:cyan;'>Cyan</option>
<option value='blue' style='color:blue;'>Blue</option>
<option value='navy' style='color:navy;'>Navy Blue</option>
<option value='purple' style='color:purple;'>Purple</option>
<option value='violet' style='color:violet;'>Violet</option>
<option value='black' style='color:black;'>Black</option>
<option value='gray' style='color:gray;'>Gray</option>
<option value='silver' style='color:silver;'>Silver</option>
<option value='white' style='color:white;'>White</option>
</select>
<br />
</td></tr>";
	}
	echo "<tr>
<td></td>
<td class='tbl'>".displaysmileys("guest_message")."<br /></td>
</tr>";

} elseif (UCC_PHPF_VER == 7) {
	if($gb_config['gb_show_bbcode'] == 1) {
		echo "<tr>
<td></td>
<td class='tbl'>".display_bbcodes_v7("360px")."<br /></td>
</tr>";
	}
}

if($action == "edit" && GB_ADMIN) {

echo "<tr>
<td class='tbl'></td>
<td class='tbl'><b>".$locale['gb_122']."</b></td>
</tr>";

echo "<tr>
<td align='right' class='tbl'>".$locale['gb_113']."</td>
<td class='tbl'><input type='text' name='admin_name' value='$guestbook_admin_name' class='textbox' style='width:200px' /></td>
</tr>";

echo "<tr>
<td align='right' valign='top' class='tbl'>".$locale['gb_117']."</td>
<td class='tbl'><textarea name='admin_comment' rows='5' cols='45' class='textbox'>$guestbook_admin_comment</textarea><br /></td>
</tr>";

if (UCC_PHPF_VER == 7) {
	if($gb_config['gb_show_bbcode'] == 1) {
echo "<tr>
<td></td>
<td class='tbl'>".display_bbcodes_v7("360px", "admin_comment")."<br /></td>
</tr>";
	}
}

}

echo "<tr>
<td class='tbl'></td>
<td class='tbl'>
<input type='submit' name='guest_preview' value='".$locale['gb_150']."' class='button' />
<input type='submit' name='guest_submit' value='".$locale['gb_118']."' class='button' />
</td>
</tr>
</table>
</form>\n";
	closetable();
}

if ($gb_done_message == 1)
{
		opentable($locale['gb_130']);
		echo "<div align='center'><br /><b>".$locale['gb_131']."</b><br /><br /></div>\n";
		closetable();
}
elseif ($gb_done_message == 2)
{
		opentable($locale['gb_130']);
		echo "<div align='center'><br /><b>".$locale['gb_131']."</b><br /><br />";
		echo $locale['gb_132']."<br /><br /></div>\n";
		closetable();
}
opentable($locale['gb_110']);
if (GB_ADMIN){
	$result = dbquery("SELECT * FROM ".DB_GB_ENTRY);
} else {
	$result = dbquery("SELECT * FROM ".DB_GB_ENTRY." WHERE gb_show='1'");
}
$rows = dbrows($result);
if (isset($_GET['rowstart']) && isnum($_GET['rowstart'])) { $rowstart = $_GET['rowstart']; } else { $rowstart = 0; }
if ($rows != 0) {
	echo "<div align='center' style='padding: 3px 3px 3px 3px; margin-bottom: 5px;'>[ <a href='";
	if(GB_SEO == 1) { echo GB_SEO_URL2.".html"; } else { echo FUSION_SELF."?new_message=1"; }
	echo "'>".$locale['gb_112']."</a> ]</div>\n";
	$i = 1;
	if (GB_ADMIN){
		$result = dbquery("SELECT * FROM ".DB_GB_ENTRY." ORDER BY gb_datestamp DESC LIMIT ".$rowstart.", ".$gb_config['gb_num']);
	} else {
		$result = dbquery("SELECT * FROM ".DB_GB_ENTRY." WHERE gb_show='1' ORDER BY gb_datestamp DESC LIMIT ".$rowstart.", ".$gb_config['gb_num']);
	}

	$numrows = dbrows($result);

	while ($data = dbarray($result)) {
	 
	 	if ($data['gb_comment'] != '' && $data['gb_comment_user'] != '') {
			$comment = "<br /><br /><b>".$data['gb_comment_user']."</b><br /><i>".$data['gb_comment']."</i>";
		} else {
			$comment = '';
		}

		if (UCC_PHPF_VER == 6 OR UCC_PHPF_VER == "BSF") {
			$message = gb_parseubb_v6(nl2br(parsesmileys($data['gb_message'].$comment)));
		} elseif (UCC_PHPF_VER == 7) {
			$message = nl2br(gb_parseubb_v7(parsesmileys($data['gb_message'].$comment)));
		}

		if ($data['gb_weburl']) {
			$weburl = str_replace("http://", "", $data['gb_weburl']);
			$web = "\n | <a href='http://".$weburl."' target='_blank'>";
			if ($data['gb_webtitle']) { 
				$web .= $data['gb_webtitle']."</a>\n";
			} else {
				$web .= $weburl."</a>\n";
			}
		} else {
			$web = "";
		}

		if($data['gb_email'] != '') {
			$name = "<b>".gb_hide_email($data['gb_email'], $data['gb_name'])."</b>";
		} else {
			$name = "<b>".$data['gb_name']."</b>";
		}

echo "<table align='center' cellpadding='0' cellspacing='1' width='80%' class='tbl-border'>
<tr>
<td class='tbl2'>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='small'>".$name.$web."</td>\n";
		if (GB_ADMIN && $data['gb_ip'] != "0.0.0.0") echo "<td align='right' class='small'>IP: ".$data['gb_ip']."</td>\n";
		echo "</tr>
</table>
</td>
</tr>
<tr>
<td class='tbl1'>".$message."</td>
</tr>
<tr>
<td class='tbl2'>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='small'>
".showdate("longdate", $data['gb_datestamp'])."</td>\n";
	if (GB_ADMIN) {
	 echo "<td align='right' class='small'>";
	 if ($data['gb_show'] == 0) {
	 echo "<a href='".FUSION_SELF."?action=activate&amp;guestbook_id=".$data['gb_id']."'><b>".$locale['gb_127']."</b></a> | ";			
	 } else {
	 echo "<a href='".FUSION_SELF."?action=hide&amp;guestbook_id=".$data['gb_id']."'>".$locale['gb_128']."</a> | ";	
	}
	  echo "
	 <a href='".FUSION_SELF."?action=edit&amp;guestbook_id=".$data['gb_id']."'>".$locale['gb_124']."</a> | 
	 <a href='".FUSION_SELF."?action=delete&amp;guestbook_id=".$data['gb_id']."' onClick='return DeleteMessage();'>".$locale['gb_125']."</a></td>\n";
	}
		echo "</tr>
</table>
</td>
</tr>
</table>\n";
		if ($i != $numrows) echo "<br />\n";
		$i++;
	}
} else {
	echo "<center><br />\n".$locale['gb_111']."<br><br>\n[ <a href='".FUSION_SELF."?new_message=1'>".$locale['gb_112']."</a> ]<br /><br />\n</center>\n";
}

if((GB_SEO == 1)) {
if ($rows != 0) echo "<div align='center' style='margin-top:5px;'>\n".makePageNav_seo($rowstart,$gb_config['gb_num'],$rows,3,GB_SEO_URL3)."\n</div>\n";
} else {
if ($rows != 0) echo "<div align='center' style='margin-top:5px;'>\n".makePageNav($rowstart,$gb_config['gb_num'],$rows,3,FUSION_SELF."?")."\n</div>\n";
}

if (GB_ADMIN) {
	echo "<script type='text/javascript'>
	function DeleteMessage() {
		return confirm(\"".$locale['gb_126']."\");
	}
	</script>\n";
}

echo "<br />\n<div class='small' align='right'>Code by <a href='http://basti2web.de' target='_blank'>basti2web.de</a></div>\n";
// Please, respect my work and keep the copyright notice!

closetable();


// Footer
switch(UCC_PHPF_VER) {
case 6:
	require_once BASEDIR."side_right.php";
	require_once BASEDIR."footer.php";
	break;
case "BSF":
	require_once BASEDIR."side_right.php";
	require_once BASEDIR."footer.php";
	break;
case 7:
	require_once THEMES."templates/footer.php";
	break;
default:
	redirect(INFUSIONS."guest_book/admin/error.php?id=3");
}

?>
Return current item: PHP-Fusion: Guestbook