Location: PHPKode > projects > PHP-Fusion: Guestbook > inf_guestbook_v4.12/files/infusions/guest_book/admin/gb_admin.php
<?php
/*-------------------------------------------------------+
| Guestbook Infusion 4.12
| Author: Sebastian Schüssler (slaughter)
| Download:
| http://basti2web.de
+--------------------------------------------------------+
| Filename: gb_admin.php
| Version: 4.12
| Author: Sebastian Schüssler (slaughter)
+--------------------------------------------------------+
| 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";

// Check: iAUTH and $aid
if (!defined("iAUTH") || $_GET['aid'] != iAUTH) redirect("error.php?id=1");

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

// Check: Admin Rights
if (!GB_ADMIN) redirect("error.php?id=2");

// Header
switch(UCC_PHPF_VER) {
case 6:
	require_once BASEDIR."subheader.php";
	require_once ADMIN."navigation.php";
	break;
case "BSF":
	require_once BASEDIR."subheader.php";
	require_once ADMIN."navigation.php";
	break;
case 7:
	require_once THEMES."templates/admin_header.php";
	break;
default:
	redirect("error.php?id=3");
}

// Language Files
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";
}

if (!isset($_GET['section']) || ($_GET['section'] != "log" && $_GET['section'] != "gb")) {
	$section = "config";
} else {
	$section = $_GET['section'] == "log" ? "log" : "gb";
}

if (isset($_GET['rowstart']) AND isnum($_GET['rowstart']))
{ $rowstart = $_GET['rowstart']; } else { $rowstart = 0; }

if (isset($_GET['del_id']) AND isnum($_GET['del_id']))
{ $del_id = $_GET['del_id']; } else { $del_id = 0; }

if (isset($_GET['act_id']) AND isnum($_GET['act_id']))
{ $act_id = $_GET['act_id']; } else { $act_id = 0; }

$ausgabe = '';

opentable($locale['gb_100']." ".$gb_config['gb_version']." - ".$locale['gb_202']);
echo "<table align='center' cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>
<tr>
<td width='20%' class='tbl2' align='center'><a class='small' href='".ADMIN."index.php".$aidlink."'><strong>".$locale['gb_202']."</strong</a></td>

<td width='20%' class='".($section == "config" ? "tbl1" : "tbl2")."' align='center'><span class='small'>".($section == "config" ? "<strong>".$locale['gb_203']."</strong>" : "<a class='small' href='".FUSION_SELF.$aidlink."&amp;section=config'><strong>".$locale['gb_203']."</strong></a>")."</span></td>

<td width='20%' class='".($section == "gb" ? "tbl1" : "tbl2")."' align='center'><span class='small'>".($section == "gb" ? "<strong>".$locale['gb_205']."</strong>" : "<a class='small' href='".FUSION_SELF.$aidlink."&amp;section=gb'><strong>".$locale['gb_205']."</strong></a>")."</span></td>

<td width='20%' class='".($section == "log" ? "tbl1" : "tbl2")."' align='center'><span class='small'>".($section == "log" ? "<strong>".$locale['gb_204']."</strong>" : "<a class='small' href='".FUSION_SELF.$aidlink."&amp;section=log'><strong>".$locale['gb_204']."</strong></a>")."</span></td>

<td width='20%' class='tbl2' align='center'><span class='small'>".((UCC_PHPF_VER == 6  OR UCC_PHPF_VER == "BSF") ? "<span style='text-decoration:line-through'><strong>".$locale['gb_248']."</strong></span>" : "<a class='small' href='gb_bbcodes.php".$aidlink."'><strong>".$locale['gb_248']."</strong></a>")."</span></td>

</tr>";

$uptodate = 0;

require_once INFUSIONS."guest_book/admin/gb_update.php";

echo "</table>";
closetable();
tablebreak();

if($uptodate == 1) {

switch($section)
{
case "gb":


if ($del_id > 0)
{
	$result = dbquery("DELETE FROM ".DB_GB_ENTRY." WHERE gb_id='".$del_id."'");
}
elseif($act_id > 0)
{
	$result = dbquery("UPDATE ".DB_GB_ENTRY." SET gb_show = '1' WHERE gb_id='$act_id'");
}


opentable($locale['gb_205']);

$query = dbquery("SELECT * FROM ".DB_GB_ENTRY." WHERE gb_show = '0'");

$rows = dbrows($query);

if ($rows!=0) {

$query = dbquery("SELECT * FROM ".DB_GB_ENTRY." WHERE gb_show = '0' ORDER BY gb_datestamp DESC LIMIT ".$rowstart.",10");

if ($rows>10) echo "<div align='center' style='margin-top:5px;'>".makePageNav($rowstart,10,$rows,3,"gb_admin.php".$aidlink."&amp;section=gb&amp;")."</div><br />\n";

while($res = dbarray($query))  {

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


echo "<br /><table border='0' width='100%' align='center' cellpadding='0' cellspacing='1' class='tbl-border'>
<tr>
<td class='forum-caption'>".$locale['gb_260']."</td>
<td class='forum-caption'>".$locale['gb_261']."</td>
<td class='forum-caption'>".$locale['gb_262']."</td>
<td class='forum-caption'>".$locale['gb_266']."</td>
<td class='forum-caption'>".$locale['gb_267']."</td>
<td class='forum-caption'>".$locale['gb_268']."</td>
<td class='forum-caption'>".$locale['gb_127']."</td>
<td class='forum-caption'>".$locale['gb_125']."</td>
</tr>
<tr>
<td class='tbl2'>".$res["gb_id"]."</td>
<td class='tbl2'>".$res["gb_name"]."</td>
<td class='tbl2'>".date("d.m.y H:i",$res["gb_datestamp"])."</td>
<td class='tbl2'>".$res["gb_ip"]."</td>
<td class='tbl2'>".$res["gb_email"]."</td>
<td class='tbl2'>".$web."</td>
<td class='tbl2'><a href='gb_admin.php".$aidlink."&amp;section=gb&amp;act_id=".$res["gb_id"]."'><img border='0' src='".INFUSIONS."guest_book/images/activate.png' alt='".$locale['gb_127']."' title='".$locale['gb_127']."'></a></td>
<td class='tbl2'><a href='gb_admin.php".$aidlink."&amp;section=gb&amp;del_id=".$res["gb_id"]."'><img border='0' src='".INFUSIONS."guest_book/images/delete.png' alt='".$locale['gb_125']."' title='".$locale['gb_125']."'></a></td>
</tr>
<tr>
<td class='tbl1' align='left'>".$locale['gb_265']."</td>
<td class='tbl1' colspan='7' align='left'>";
if (UCC_PHPF_VER == 6) {
	echo gb_parseubb_v6(nl2br(parsesmileys($res['gb_message'])));
} elseif (UCC_PHPF_VER == "BSF") {
	echo gb_parseubb_v6(nl2br(parsesmileys($res['gb_message'])));
} elseif (UCC_PHPF_VER == 7) {
	echo nl2br(gb_parseubb_v7(parsesmileys($res['gb_message'])));
}
echo "</td>
</tr></table>";

}

if ($rows>10) echo "<div align='center' style='margin-top:5px;'>".makePageNav($rowstart,10,$rows,3,"gb_admin.php".$aidlink."&amp;section=gb&amp;")."</div><br />\n";

} else  {
echo "<br />".$locale['gb_271']."!<br /><br />";
}

closetable();


break;
case "log":

if ($del_id > 0)
{
	$result = dbquery("DELETE FROM ".DB_GB_LOG." WHERE gb_log_id='".$del_id."'");
}
elseif($act_id > 0)
{	$result = dbquery("SELECT * FROM ".DB_GB_LOG." WHERE gb_log_id='".$act_id."'");
	if (dbrows($result) != 0) {
	$data = dbarray($result);
	$result = dbquery("INSERT INTO ".DB_GB_ENTRY." (gb_name, gb_email, gb_weburl, gb_webtitle, gb_message, gb_show, gb_datestamp, gb_ip) VALUES('".$data['gb_log_name']."', '".$data['gb_log_email']."', '".$data['gb_log_url']."', '".$data['gb_log_urltitel']."', '".$data['gb_log_message']."', '1', '".$data['gb_log_datestamp']."', '".$data['gb_log_ip']."')");
	$result = dbquery("DELETE FROM ".DB_GB_LOG." WHERE gb_log_id='".$act_id."'");
	}
}
elseif (isset($_GET['del_all']) && $_GET['del_all'] == 1) {
	$result = dbquery("DELETE FROM ".DB_GB_LOG);
}

opentable($locale['gb_204']);

$query = dbquery("SELECT * FROM ".DB_GB_LOG);

$rows = dbrows($query);

if ($rows!=0) {

$query = dbquery("SELECT * FROM ".DB_GB_LOG." ORDER BY gb_log_datestamp DESC LIMIT ".$rowstart.",10");

echo "<a href='gb_admin.php".$aidlink."&amp;section=log&amp;del_all=1'>".$locale['gb_270']."</a><br>";

if ($rows>10) echo "<div align='center' style='margin-top:5px;'>".makePageNav($rowstart,10,$rows,3,"gb_admin.php".$aidlink."&section=log&")."</div><br />\n";


while($res = dbarray($query))  {

if ($res['gb_log_url']) {
	$weburl = str_replace("http://", "", $res['gb_log_url']);
	$web_log = "\n <a href='http://".$weburl."' target='_blank'>".$weburl."</a>";
} else {
	$web_log = "&nbsp;";
}


echo "<br /><table border='0' width='100%' align='center' cellpadding='0' cellspacing='1' class='tbl-border'>
<tr>
<td class='forum-caption'>".$locale['gb_260']."</td>
<td class='forum-caption'>".$locale['gb_261']."</td>
<td class='forum-caption'>".$locale['gb_262']."</td>
<td class='forum-caption'>".$locale['gb_263']."</td>
<td class='forum-caption'>".$locale['gb_264']."</td>
<td class='forum-caption'>".$locale['gb_266']."</td>
<td class='forum-caption'>".$locale['gb_267']."</td>
<td class='forum-caption'>".$locale['gb_268']."</td>
<td class='forum-caption'>".$locale['gb_127']."</td>
<td class='forum-caption'>".$locale['gb_125']."</td>
</tr>
<tr>
<td class='tbl2'>".$res['gb_log_id']."</td>
<td class='tbl2'>".$res['gb_log_name']."</td>
<td class='tbl2'>".date("d.m.y H:i",$res['gb_log_datestamp'])."</td>
<td class='tbl2'>".gb_get_user($res['gb_log_userid'])."</td>
<td class='tbl2'>".$res['gb_log_type']."</td>
<td class='tbl2'>".$res['gb_log_ip']."</td>
<td class='tbl2'>".$res['gb_log_email']."</td>
<td class='tbl2'>".$web_log."</td>
<td class='tbl2'><a href='gb_admin.php".$aidlink."&amp;section=log&amp;act_id=".$res["gb_log_id"]."'><img border='0' src='".INFUSIONS."guest_book/images/activate.png' alt='".$locale['gb_127']."' title='".$locale['gb_127']."'></a></td>
<td class='tbl2'><a href='gb_admin.php".$aidlink."&amp;section=log&amp;del_id=".$res['gb_log_id']."'><img border='0' src='".INFUSIONS."guest_book/images/delete.png' alt='".$locale['gb_125']."' title='".$locale['gb_125']."'></a></td>
</tr>
<tr>
<td class='tbl1' align='left'>".$locale['gb_265']."</td>
<td class='tbl1' colspan='9' align='left'>";

if (UCC_PHPF_VER == 6) {
	echo gb_parseubb_v6(nl2br(parsesmileys($res['gb_log_message'])));
} elseif (UCC_PHPF_VER == "BSF") {
	echo gb_parseubb_v6(nl2br(parsesmileys($res['gb_log_message'])));
} elseif (UCC_PHPF_VER == 7) {
	echo nl2br(gb_parseubb_v7(parsesmileys($res['gb_log_message'])));
}

echo "</td>
</tr>
</table>";

}

if ($rows>10) echo "<div align='center' style='margin-top:5px;'>".makePageNav($rowstart,10,$rows,3,"gb_admin.php".$aidlink."&amp;section=log&amp;")."</div><br />\n";

} else  {
echo "<br />".$locale['gb_269']."<br /><br />";
}

closetable();

break;
case "config":


if (isset($_POST['gb_save_submit'])) {
	$error = '';
$save_gb_num = stripinput($_POST['gb_num']);
$save_gb_email_req = stripinput($_POST['gb_email_required']);
$save_gb_mod = stripinput($_POST['gb_mod']);
$save_gb_mod_ac = stripinput($_POST['gb_mod_ac']);
$save_gb_notify = stripinput($_POST['gb_notify']);
$save_gb_notify_who = stripinput($_POST['gb_notify_who']);
$save_gb_cap_type = stripinput($_POST['gb_cap_type']);
$save_gb_cap_ac = stripinput($_POST['gb_cap_ac']);
$save_gb_spam_words = addslash($_POST['gb_spam_words']);
$save_gb_spam_ac = stripinput($_POST['gb_spam_ac']);
$save_gb_flood_ac = stripinput($_POST['gb_flood_ac']);
$save_gb_flood_time = stripinput($_POST['gb_flood_time']);
$save_gb_seo = stripinput($_POST['gb_seo_urlrewrite']);
$save_gb_bbcode = stripinput($_POST['gb_show_bbcode']);
$save_gb_color = stripinput($_POST['gb_show_color']);
$save_gb_image = stripinput($_POST['gb_show_image']);
	
	if (!isnum($save_gb_num))
	{ $error .= $locale['gb_255']."<br /><br />\n"; }
	if ($save_gb_num == 0)	$save_gb_num = 15;
	
	$save_gb_email_req = $save_gb_email_req == 1 ? "1" : "0";
	
	if (!isnum($save_gb_flood_time))
	{ $error .= $locale['gb_254']."<br /><br />\n"; }
	if ($save_gb_flood_time == 0)	$save_gb_flood_time = 10;

	$save_gb_seo = $save_gb_seo == 1 ? "1" : "0";
	
	$save_gb_bbcode = $save_gb_bbcode == 1 ? "1" : "0";

	$save_gb_color = $save_gb_color == 1 ? "1" : "0";
	
	$save_gb_image = $save_gb_image == 1 ? "1" : "0";

	if ($error != "") {
	$ausgabe .= "<u>".$locale['gb_253']."</u><br /><br />\n$error\n\n";
	} else {
	
	$result = dbquery("UPDATE ".DB_GB_SETTINGS." SET gb_num = '".$save_gb_num."', gb_email_required = '".$save_gb_email_req."', gb_moderated = '".$save_gb_mod."', gb_moderated_access = '".$save_gb_mod_ac."', gb_captcha_type = '".$save_gb_cap_type."', gb_captcha_access = '".$save_gb_cap_ac."', gb_spam_access = '".$save_gb_spam_ac."', gb_spam_words = '".$save_gb_spam_words."', gb_flood_access = '".$save_gb_flood_ac."', gb_flood_time = '".$save_gb_flood_time."', gb_notify_kind = '".$save_gb_notify."', gb_notify_who = '".$save_gb_notify_who."', gb_show_bbcode = '".$save_gb_bbcode."', gb_show_color = '".$save_gb_color."', gb_show_image = '".$save_gb_image."', gb_seo_active = '".$save_gb_seo."'");

	if($result) {
	redirect(FUSION_SELF.$aidlink."&amp;saved=yes");
	} else {
	redirect(FUSION_SELF.$aidlink."&amp;saved=no");
	}
	}
}

if($ausgabe != '')
{
opentable($locale['gb_130']);
echo $ausgabe;
closetable();
}

if(isset($_GET['saved']) && $_GET['saved'] == "yes") {
opentable($locale['gb_130']);
	echo $locale['gb_256']; // Settings saved
closetable();
}elseif(isset($_GET['saved']) && $_GET['saved'] == "no") {
opentable($locale['gb_130']);
	echo $locale['gb_257']; // not know why there is an error
closetable();
}

opentable($locale['gb_203']);

echo "<form name='gb_form' method='post' action='".FUSION_SELF.$aidlink."&amp;section=config&amp;action=save'>

	<table width='95%' cellspacing='1' cellpadding='3' class='tbl-border'>

	<tr><td colspan='3' class='tbl2'><u>".$locale['gb_220']."</u></td></tr>

	<tr>
		<td class='tbl1' width='150'>".$locale['gb_221'].":</td>
		<td class='tbl1'><input type='text' name='gb_num' value='".$gb_config['gb_num']."' size='40' maxlength='200' class='textbox' /></td>
	</tr>
	<tr>
		<td class='tbl1' width='150'>".$locale['gb_222'].":</td>
		<td class='tbl1'><select size='1' class='textbox' name='gb_email_required'>
		<option value='0'"; if($gb_config['gb_email_required'] == 0) echo " selected='selected' "; echo">".$locale['gb_215']."</option>
		<option value='1'"; if($gb_config['gb_email_required'] == 1) echo " selected='selected' "; echo">".$locale['gb_214']."</option>
		</select></td>
	</tr>
		
	<tr><td colspan='3' class='tbl2'><u>".$locale['gb_223']."</u></td></tr>

      <tr>	
		<td class='tbl1' width='150'>".$locale['gb_224'].":</td>
		<td class='tbl1'><select size='1' class='textbox' name='gb_mod'>
		<option value='0'"; if($gb_config['gb_moderated'] == 0) echo " selected='selected' "; echo">".$locale['gb_215']."</option>
		<option value='1'"; if($gb_config['gb_moderated'] == 1) echo " selected='selected' "; echo">".$locale['gb_214']."</option>
		</select></td>
	</tr>
      <tr>	
		<td class='tbl1' width='150'>".$locale['gb_225'].":</td>
		<td class='tbl1'><select size='1' class='textbox' name='gb_mod_ac'>
		<option value='101'"; if($gb_config['gb_moderated_access'] == 101) echo " selected='selected' "; echo">".$locale['gb_211']."</option>
		<option value='102'"; if($gb_config['gb_moderated_access'] == 102) echo " selected='selected' "; echo">".$locale['gb_212']."</option>
		<option value='103'"; if($gb_config['gb_moderated_access'] == 103) echo " selected='selected' "; echo">".$locale['gb_213']."</option>
		</select></td>
	</tr>

	<tr><td colspan='3' class='tbl2'><u>".$locale['gb_226']."</u></td></tr>

      <tr>	
		<td class='tbl1' width='150'>".$locale['gb_227'].":</td>
		<td class='tbl1'><select size='1' class='textbox' name='gb_notify'>
		<option value='0'"; if($gb_config['gb_notify_kind'] == 0) echo " selected='selected' "; echo">".$locale['gb_228']."</option>
		<option value='pm'"; if($gb_config['gb_notify_kind'] == "pm") echo " selected='selected' "; echo">".$locale['gb_229']."</option>
		<option value='mail'"; if($gb_config['gb_notify_kind'] == "mail") echo " selected='selected' "; echo">".$locale['gb_230']."</option>
		</select></td>
	</tr>
      <tr>	
		<td class='tbl1' width='150'>".$locale['gb_231'].":</td>
		<td class='tbl1'><select size='1' class='textbox' name='gb_notify_who'>
		<option value='102'"; if($gb_config['gb_notify_who'] == 102) echo " selected='selected' "; echo">".$locale['gb_212']."</option>
		<option value='103'"; if($gb_config['gb_notify_who'] == 103) echo " selected='selected' "; echo">".$locale['gb_213']."</option>
		</select></td>
	</tr>

	<tr><td colspan='3' class='tbl2'><u>".$locale['gb_232']."</u></td></tr>

      <tr>	
		<td class='tbl1' width='150'>".$locale['gb_233'].":</td>
		<td class='tbl1'><select size='1' class='textbox' name='gb_cap_type'>
		<option value='1'"; if($gb_config['gb_captcha_type'] == 1) echo " selected='selected' "; echo">".$locale['gb_234']."</option>
		<option value='2'"; if($gb_config['gb_captcha_type'] == 2) echo " selected='selected' "; echo">".$locale['gb_235']."</option>
		<option value='3'"; if($gb_config['gb_captcha_type'] == 3) echo " selected='selected' "; echo">".$locale['gb_237']."</option>";
		echo "
		</select></td>
	</tr>
      <tr>	
		<td class='tbl1' width='150'>".$locale['gb_238'].":</td>
		<td class='tbl1'><select size='1' class='textbox' name='gb_cap_ac'>
		<option value='101'"; if($gb_config['gb_captcha_access'] == 101) echo " selected='selected' "; echo">".$locale['gb_211']."</option>
		<option value='102'"; if($gb_config['gb_captcha_access'] == 102) echo " selected='selected' "; echo">".$locale['gb_212']."</option>
		<option value='103'"; if($gb_config['gb_captcha_access'] == 103) echo " selected='selected' "; echo">".$locale['gb_213']."</option>
		</select></td>
	</tr>

	<tr><td colspan='3' class='tbl2'><u>".$locale['gb_239']."</u></td></tr>

      <tr>	
		<td class='tbl1' width='150'>".$locale['gb_240'].":</td>
		<td class='tbl1'><select size='1' class='textbox' name='gb_spam_ac'>
		<option value='101'"; if($gb_config['gb_spam_access'] == 101) echo " selected='selected' "; echo">".$locale['gb_211']."</option>
		<option value='102'"; if($gb_config['gb_spam_access'] == 102) echo " selected='selected' "; echo">".$locale['gb_212']."</option>
		<option value='103'"; if($gb_config['gb_spam_access'] == 103) echo " selected='selected' "; echo">".$locale['gb_213']."</option>
		</select></td>
	</tr>
	<tr>
		<td valign='top' width='40%' class='tbl1'>".$locale['gb_241'].":<br /><span class='small2'>".$locale['gb_242']."<br />
		".$locale['gb_243']."</span></td>
		<td width='60%' class='tbl1'><textarea name='gb_spam_words' rows='7' cols='50' class='textbox'>".$gb_config['gb_spam_words']."</textarea>
		</td>
	</tr>

	<tr><td colspan='3' class='tbl2'><u>".$locale['gb_244']."</u></td></tr>

      <tr>	
		<td class='tbl1' width='150'>".$locale['gb_245'].":</td>
		<td class='tbl1'><select size='1' class='textbox' name='gb_flood_ac'>
		<option value='101'"; if($gb_config['gb_flood_access'] == 101)echo " selected='selected' "; echo">".$locale['gb_211']."</option>
		<option value='102'"; if($gb_config['gb_flood_access'] == 102)echo " selected='selected' "; echo">".$locale['gb_212']."</option>
		<option value='103'"; if($gb_config['gb_flood_access'] == 103)echo " selected='selected' "; echo">".$locale['gb_213']."</option>
		</select></td>
	</tr>
	<tr>
		<td class='tbl1' width='150'>".$locale['gb_246'].":</td>
		<td class='tbl1'><input type='text' name='gb_flood_time' value='".$gb_config['gb_flood_time']."' size='20' maxlength='50' class='textbox' />&nbsp;".$locale['gb_247'].": ".gb_floodtime($gb_config['gb_flood_time'])."</td>
	</tr>
	<tr><td colspan='3' class='tbl2'><u>".$locale['gb_258']."</u></td></tr>

	<tr>	
		<td class='tbl1' width='150'>".$locale['gb_259'].":<br /><span class='small2'>".$locale['gb_259i']."</span></td>
		<td class='tbl1'><select size='1' class='textbox' name='gb_seo_urlrewrite'>
		<option value='0'"; if($gb_config['gb_seo_active'] == 0) echo " selected='selected' "; echo">".$locale['gb_215']."</option>
		<option value='1'"; if($gb_config['gb_seo_active'] == 1) echo " selected='selected' "; echo">".$locale['gb_214']."</option>
		</select></td>
	</tr>\n
	<tr><td colspan='3' class='tbl2'><u>".$locale['gb_248']."</u></td></tr>

	<tr>	
		<td class='tbl1' width='150'>".$locale['gb_249'].":</td>
		<td class='tbl1'><select size='1' class='textbox' name='gb_show_bbcode'>
		<option value='0'"; if($gb_config['gb_show_bbcode'] == 0) echo " selected='selected' "; echo">".$locale['gb_215']."</option>
		<option value='1'"; if($gb_config['gb_show_bbcode'] == 1) echo " selected='selected' "; echo">".$locale['gb_214']."</option>
		</select></td>
	</tr>\n";
if(UCC_PHPF_VER == 6 OR UCC_PHPF_VER == "BSF") {
echo "	<tr>	
		<td class='tbl1' width='150'>".$locale['gb_250'].":</td>
		<td class='tbl1'><select size='1' class='textbox' name='gb_show_color'>
		<option value='0'"; if($gb_config['gb_show_color'] == 0) echo " selected='selected' "; echo">".$locale['gb_215']."</option>
		<option value='1'"; if($gb_config['gb_show_color'] == 1) echo " selected='selected' "; echo">".$locale['gb_214']."</option>
		</select></td>
	</tr>
	<tr>	
		<td class='tbl1' width='150'>".$locale['gb_251'].":</td>
		<td class='tbl1'><select size='1' class='textbox' name='gb_show_image'>
		<option value='0'"; if($gb_config['gb_show_image'] == 0) echo " selected='selected' "; echo">".$locale['gb_215']."</option>
		<option value='1'"; if($gb_config['gb_show_image'] == 1) echo " selected='selected' "; echo">".$locale['gb_214']."</option>
		</select></td>
	</tr>\n";
}
echo "	<tr>
		<td class='tbl2' width='150'> </td>
		<td class='tbl2'><input type='submit' value='".$locale['gb_252']."' name='gb_save_submit' class='button' /></td>
	</tr>
</table>
</form><br />";


closetable();

}

tablebreak();

opentable($locale['gb_290']);
$ausgabe = '';
    if(function_exists('fsockopen'))
    { 
      $version_new = latest_gb_version();
      if(version_compare($version_new, $gb_config['gb_version'], '<=') AND $version_new > 0)
      {
	  $ausgabe = "
	  <table cellpadding='0' cellspacing='1'>
	  <tr>
	  <td><img src='".INFUSIONS."guest_book/images/version.gif' alt='up to date' /></td>
	  <td><span style=\"font-weight: bold; color: #1bdc16;\">".$locale['gb_293'].": ".$gb_config['gb_version']."</span></td>
	  </tr>
	  </table>";
      } else {
        if (!empty($version_new))
        {
	$ausgabe = "
	<table cellpadding='0' cellspacing='1'>
	<tr>
	<td><img src='".INFUSIONS."guest_book/images/version_old.gif' alt='old version' /></td>
	<td><span style='font-weight: bold; color: red;'>".$locale['gb_291'].": ".$gb_config['gb_version']."</span><br />
	<span style='font-weight: bold; color: #1bdc16;'>".$locale['gb_292'].": ".$version_new."</span><br />
	<span style='font-weight: bold;'>".$locale['gb_294'].": </span><a href='http://basti2web.de' target='_blank' title='www.basti2web.de'><span style='font-weight: bold;'>http://basti2web.de</span></a></td>
	</tr>
	</table>";
       }
      }
    } 
	if (empty($version_new)) {
	$ausgabe = "<br />".$locale['gb_296']."!<br />".$locale['gb_295']." <a href=\"http://basti2web.de\" target=\"_blank\" title=\"www.basti2web.de\"><span style=\"font-weight: bold; \">http://basti2web.de</span></a><br /><br />";
    }

echo "<div align='left'>".$ausgabe."</div>";

closetable();

}

// Footer
switch(UCC_PHPF_VER) {
case 6:
	echo "</td>\n";
	require_once BASEDIR."footer.php";
	break;
case "BSF":
	echo "</td>\n";
	require_once BASEDIR."footer.php";
	break;
case 7:
require_once THEMES."templates/footer.php";
	break;
default:
	redirect("error.php?id=3");
}

?>
Return current item: PHP-Fusion: Guestbook