<?php

/********************************************************************************
	- MemHT Portal -
	
	Copyright (C) 2007-2008 by Miltenovik Manojlo
	http://www.memht.com
	
	This program is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2 of the License, or
	(at your opinion) any later version.
	
	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
	GNU General Public License for more details.
	
	You should have received a copy of the GNU General Public License along
	with this program; if not, see <http://www.gnu.org/licenses/> (GPLv2)
	or write to the Free Software Foundation, Inc., 51 Franklin Street,
	Fifth Floor, Boston, MA02110-1301, USA.
		
********************************************************************************/

if (!defined("_LOAD_PAGE_")) {
	die("<table style='padding: 2px; border: 1px solid #999; background-color: #EEE; font-family: Verdana; font-size: 10px;' align='center'><tr><td><b>Error:</b> This file cannot be opened directly!</td></tr></table>");
}

if (isSet($_GET['op'])) { $op = incode($_GET['op']); } else { $op = ""; }
if (isSet($_GET['id'])) { $id = incode($_GET['id']); } else { $id = ""; }
if (isSet($_GET['ok'])) { $ok = incode($_GET['ok']); } else { $ok = false; }
if (isSet($_GET['subop'])) { $subop = incode($_GET['subop']); } else { $subop = ""; }
if (isSet($_GET['word'])) { $word = incode($_GET['word']); } else { $word = ""; }

function siteConfig($ok=false) {
	global $dblink,$siteConfig,$visitorInfo,$tzNOW;
	
	if (!$ok) {
		$row_conf = $dblink->get_row("SELECT * FROM memht_config");
		$dbtemplate = outCode($row_conf['template']);
		$dblanguage = outCode($row_conf['lingua']);
		
		openTable();
			echo "<div class='tpl_slideBox'>
				<span class='tpl_slideBox_item'><a href='javascript:void(0);' onClick=\"itemSlide('1','8');\">"._GENERAL_."</a></span>
				<span class='tpl_slideBox_item'><a href='javascript:void(0);' onClick=\"itemSlide('2','8');\">"._METATAGS_."</a></span>
				<span class='tpl_slideBox_item'><a href='javascript:void(0);' onClick=\"itemSlide('3','8');\">"._USER_."</a></span>
				<span class='tpl_slideBox_item'><a href='javascript:void(0);' onClick=\"itemSlide('4','8');\">"._EMAIL_."</a></span>
				<span class='tpl_slideBox_item'><a href='javascript:void(0);' onClick=\"itemSlide('5','8');\">"._CONTENT_."</a></span>
				<span class='tpl_slideBox_item'><a href='javascript:void(0);' onClick=\"itemSlide('6','8');\">"._COMMENTS_."</a></span>
				<span class='tpl_slideBox_item'><a href='javascript:void(0);' onClick=\"itemSlide('7','8');\">"._MAINTENANCE_."</a></span>
				<span class='tpl_slideBox_item'><a href='javascript:void(0);' onClick=\"itemSlide('8','8');\">"._FTP_."</a></span>
			</div>";
		echo "<form name='form_cfg' method='post' action='admin.php?page=configuration&op=siteConfig&ok=true'>";
		
		//GENERAL
		echo "<div id='1'>\n";
			echo "<table width='100%' align='center' cellspacing='1' cellpadding='0' class='std_nicetable'>";
			echo "<thead>\n";
				echo "<tr><td colspan='2'>"._GENERAL_."</td></tr>\n";
			echo "</thead>\n";
			echo "<tbody>\n";
				echo "<tr><td class='clean'><b>"._SITENAME_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._INFO_EXPLAIN_SITENAME_."]\"></td><td align='right' class='clean'><input type='text' name='nome_sito' value=\"".$siteConfig['site_name']."\" size='40' maxlength='255'></td></tr>\n";
				echo "<tr><td class='hlight'><b>"._SITEURL_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._INFO_EXPLAIN_SITEURL_."]\"></td><td align='right' class='hlight'><span id='info'>"._NOFINALSLASH_."</span> <input type='text' name='site_url' value=\"".$siteConfig['site_url']."\" size='40' maxlength='255'></td></tr>\n";
				echo "<tr><td class='clean'><b>"._WEBMASTERMAIL_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._INFO_EXPLAIN_WEBMASTERMAIL_."]\"></td><td align='right' class='clean'><input type='text' name='webmaster_mail' value=\"".$siteConfig['webmaster_mail']."\" size='40' maxlength='255'></td></tr>\n";
				echo "<tr><td class='hlight'><b>"._SITEOPEN_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._INFO_EXPLAIN_SITEOPEN_."]\"></td><td align='right' class='hlight'>\n";
					echo "<select name='site_open'>\n";
					if ($siteConfig['site_open']) {
						echo "<option value='1' selected>"._OPEN_."</option>\n";
						echo "<option value='0'>"._CLOSED_."</option>\n";
					} else {
						echo "<option value='1'>"._OPEN_."</option>\n";
						echo "<option value='0' selected>"._CLOSED_."</option>\n";
					}
						echo "</select></td></tr>\n";
				echo "<tr><td valign='top' class='clean' colspan='2'><b>"._OFFLINEMESSAGE_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._INFO_EXPLAIN_OFFLINEMESSAGE_."]\"><br>";
					textarea("offlinemsg","100%","150px",1,"simple",$siteConfig['offlinemsg']);
					echo "</td></tr>";
				echo "<tr><td class='hlight'><b>"._LANGUAGE_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._INFO_EXPLAIN_LANGUAGE_."]\"></td><td align='right' class='clean'>\n";
					echo "<select name='lang'>\n";
					unset($filearray);
					$filearray = array();
					$handle = opendir('lang/');
					while (false !== ($file = readdir($handle))) {
						if ($file != "." AND $file != ".." AND !eregi("html",$file)) {
							$file = str_replace(".php","",$file);
							
							$filearray[] = $file;
						}
					}
					closedir($handle);
					@sort($filearray);
					@reset($filearray);
					foreach($filearray as $file) {
						if ($dblanguage=="$file") {
							echo "<option value='$file' selected>$file</option>\n";
						} else {
							echo "<option value='$file'>$file</option>\n";
						}
					}
					echo "</select></td></tr>\n";
				echo "<tr><td class='clean'><b>"._TEMPLATE_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._INFO_EXPLAIN_TEMPLATE_."]\"></td><td align='right' class='clean'>\n";
					echo "<select name='template'>\n";
					unset($filearray);
					$filearray = array();
					$handle = opendir('templates/');
					while (false !== ($file = readdir($handle))) {
						if ($file != "." AND $file != ".." AND !eregi("html",$file) AND file_exists("templates/$file/home.html")) {
						
							$filearray[] = $file;
						}
					}
					closedir($handle);
					@sort($filearray);
					@reset($filearray);
					foreach($filearray as $file) {
						if ($dbtemplate=="$file") {
							echo "<option value='$file' selected>$file</option>\n";
						} else {
							echo "<option value='$file'>$file</option>\n";
						}
					}
					echo "</select></td></tr>\n";
				echo "<tr><td class='hlight'><b>"._DEFAULTPAGEINHOME_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._INFO_EXPLAIN_DEFAULTPAGEINHOME_."]\"></td><td align='right' class='hlight'>";
					echo "<select name='defpage'>\n";
						echo "<option value='' style='font-weight:bold;' selected>-- "._PAGES_." --</option>\n";
						if ($nav_res = $dblink->get_list("SELECT * FROM memht_pagine ORDER BY titolo")) {
							foreach ($nav_res as $nav_row) {
								$name = outCode($nav_row['nome']);
								$title = outCode($nav_row['titolo']);
								
								if ($siteConfig['defpage']==$name) {
									echo "<option value='$name' selected>$title</option>\n";
								} else {
									echo "<option value='$name'>$title</option>\n";
								}
							}
						} else {
							echo "<option value=''>"._EMPTY_."</option>\n";
						}
						
						if ($siteConfig['virtualpages']==1) {
							echo "<option value='' style='font-weight:bold;'>-- "._VIRTUAL_PAGES_." --</option>\n";
							if ($nav_res_vp = $dblink->get_list("SELECT name,title FROM memht_virtualpages ORDER BY title")) {
								foreach ($nav_res_vp as $nav_row_vp) {
									$name = outCode($nav_row_vp['name']);
									$title = outCode($nav_row_vp['title']);
									
									if ($siteConfig['defpage']==$name) {
										echo "<option value='$name' selected>$title</option>\n";
									} else {
										echo "<option value='$name'>$title</option>\n";
									}
								}
							} else {
								echo "<option value=''>"._EMPTY_."</option>\n";
							}
						}
						
					echo "</select></td></tr>\n";
				echo "<tr><td class='clean'><b>"._TIMESTAMP_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._INFO_EXPLAIN_TIMESTAMP_."]\"></td><td align='right' class='clean'><input type='text' name='timestamp' value=\"".$siteConfig['timestamp']."\" size='20' maxlength='30'></td></tr>\n";
				
				echo "<tr><td class='hlight'><b>"._TIMEZONE_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._INFO_EXPLAIN_TIMEZONE_."]\"></td><td align='right' class='hlight'>\n";
					$row = $dblink->get_row("SELECT $tzNOW as now");
					echo $row['now']." <select name='timezone'>\n";
						for ($i=12;$i>=-12;$i--) {
							if ($i>0) { $i = "+$i"; }
							$selected = ($siteConfig['timezone']==$i) ? "selected" : "";
							echo "<option value='$i' style='text-align:right;' $selected>$i "._HOURS_."</option>\n";
						}
					echo "</select></td></tr>\n";
				
				echo "<tr><td class='clean'><b>"._ADMINGHOSTS_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._INFO_EXPLAIN_ADMINGHOSTS_."]\"></td><td align='right' class='clean'>\n";
					echo "<select name='admin_ghosts'>\n";
					if ($siteConfig['admin_ghosts']==1) {
						echo "<option value='1' selected>"._YES_."</option>\n";
						echo "<option value='0'>"._NO_."</option>\n";
					} else {
						echo "<option value='1'>"._YES_."</option>\n";
						echo "<option value='0' selected>"._NO_."</option>\n";
					}
					echo "</select></td></tr>\n";
					
				echo "<tr><td class='hlight'><b>"._INFOBAR_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._INFO_EXPLAIN_INFOBAR_."]\"></td><td align='right' class='hlight'>\n";
					echo "<select name='infobar'>\n";
					if ($siteConfig['informationbar']==1) {
						echo "<option value='1' selected>"._YES_."</option>\n";
						echo "<option value='0'>"._NO_."</option>\n";
					} else {
						echo "<option value='1'>"._YES_."</option>\n";
						echo "<option value='0' selected>"._NO_."</option>\n";
					}
					echo "</select></td></tr>\n";
				
				echo "<tr><td class='clean'><b>"._SEC_GRAPHIC_CHECK_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._INFO_EXPLAIN_SEC_GRAPHIC_CHECK_."]\"></td><td align='right' class='clean'>\n";
					echo "<select name='graphic_check'>\n";
					if ($siteConfig['graphic_check']==1) {
						echo "<option value='1' selected>"._YES_."</option>\n";
						echo "<option value='0'>"._NO_."</option>\n";
					} else {
						echo "<option value='1'>"._YES_."</option>\n";
						echo "<option value='0' selected>"._NO_."</option>\n";
					}
					echo "</select></td></tr>\n";
				
				echo "<tr><td class='hlight'><b>"._TEXTAREA_EDITOR_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._INFO_EXPLAIN_TEXTAREA_EDITOR_."]\"></td><td align='right' class='hlight'>\n";
					echo "<select name='textarea_editor'>\n";
					if ($siteConfig['textarea_editor']==1) {
						echo "<option value='1' selected>"._YES_."</option>\n";
						echo "<option value='0'>"._NO_."</option>\n";
					} else {
						echo "<option value='1'>"._YES_."</option>\n";
						echo "<option value='0' selected>"._NO_."</option>\n";
					}
					echo "</select></td></tr>\n";
				
				echo "<tr><td class='clean'><b>"._MODREWRITE_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._INFO_EXPLAIN_MODREWRITE_."]\"></td><td align='right' class='clean'>\n";
					echo "<select name='modrewrite'>\n";
					if ($siteConfig['modrewrite']==1) {
						echo "<option value='1' selected>"._YES_."</option>\n";
						echo "<option value='0'>"._NO_."</option>\n";
					} else {
						echo "<option value='1'>"._YES_."</option>\n";
						echo "<option value='0' selected>"._NO_."</option>\n";
					}
					echo "</select></td></tr>\n";
					
				echo "<tr><td class='hlight'><b>"._SEARCHENGSPIDER_IN_STATISTICS_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._INFO_EXPLAIN_SEARCHENGSPIDER_IN_STATSISTICS_."]\"></td><td align='right' class='hlight'>\n";
					echo "<select name='searchengineinstat'>\n";
					if ($siteConfig['searchengineinstat']==1) {
						echo "<option value='1' selected>"._YES_."</option>\n";
						echo "<option value='0'>"._NO_."</option>\n";
					} else {
						echo "<option value='1'>"._YES_."</option>\n";
						echo "<option value='0' selected>"._NO_."</option>\n";
					}
					echo "</select></td></tr>\n";	
				
				echo "<tr><td valign='top' class='clean' colspan='2'><b>"._FOOTMESSAGE_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._INFO_EXPLAIN_FOOTMESSAGE_."]\"><br>";
					textarea("footmsg","100%","150px",1,"simple",$siteConfig['footmsg']);
					echo "</td></tr>";
				echo "<tr><td class='hlight' valign='top' colspan='2'><b>"._COPYRIGHTTEXT_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._INFO_EXPLAIN_COPYRIGHTTEXT_."]\"><br>";
					textarea("copyright","100%","150px",1,"simple",$siteConfig['copyright']);
					echo "</td></tr>\n";
			echo "</tbody>\n";
			echo "</table>\n";
		echo "</div>\n";
		
		//METATAGS
		echo "<div id='2' style='display:none;'>\n";
			echo "<table width='100%' align='center' cellspacing='1' cellpadding='0' class='std_nicetable'>";
			echo "<thead>\n";
				echo "<tr><td colspan='2'>"._METATAGS_."</td></tr>\n";
			echo "</thead>\n";
			echo "<tbody>\n";
				echo "<tr valign='top'><td class='clean' width='30%'><b>"._DESCRIPTION_."</b></td><td class='clean'><div align='right'>";
					textarea("descrizione","100%","70px",0,"",$siteConfig['site_description']);
					echo "</div></td></tr>\n";
				echo "<tr valign='top'><td class='hlight'><b>"._KEYWORDS_."</b><div id='info'>("._SEPARATEDBYCOMMAS_.")</div></td><td class='hlight'><div align='right'>";
					textarea("metatags","100%","70px",0,"",$siteConfig['metatags']);
					echo "</div></td></tr>\n";
			echo "</tbody>\n";
			echo "</table>\n";
		echo "</div>\n";
		
		//USERS
		echo "<div id='3' style='display:none;'>\n";
			echo "<table width='100%' align='center' cellspacing='1' cellpadding='0' class='std_nicetable'>";
			echo "<thead>\n";
				echo "<tr><td colspan='2'>"._USERS_."</td></tr>\n";
			echo "</thead>\n";
			echo "<tbody>\n";
				echo "<tr><td class='clean'><b>"._MAXLENGTH_USER_."</b></td><td align='right' class='clean'><input type='text' name='user_max_lunghezza' value=\"".$siteConfig['user_max_lunghezza']."\" size='10' maxlength='10'></td></tr>\n";
				echo "<tr><td class='hlight'><b>"._MAXLENGTH_PASS_."</b></td><td align='right' class='hlight'><input type='text' name='pass_max_lunghezza' value=\"".$siteConfig['pass_max_lunghezza']."\" size='10' maxlength='10'></td></tr>\n";
				echo "<tr><td class='clean'><b>"._AVATAR_."</b>: "._IMG_MAX_W_."</td><td align='right' class='clean'><input type='text' name='avatar_max_w' value=\"".$siteConfig['avatar_max_w']."\" size='10' maxlength='10'></td></tr>\n";
				echo "<tr><td class='hlight'><b>"._AVATAR_."</b>: "._IMG_MAX_H_."</td><td align='right' class='hlight'><input type='text' name='avatar_max_h' value=\"".$siteConfig['avatar_max_h']."\" size='10' maxlength='10'></td></tr>\n";
				
				echo "<tr><td class='clean'><b>"._USER_CONFIRM_EMAIL_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._USER_CONFIRM_EMAIL_EXPLAIN_."<br><b>"._DEFAULT_.":</b> "._YES_."]\"></td><td align='right' class='clean'>\n";
					echo "<select name='user_confirm_email'>\n";
					if ($siteConfig['user_confirm_email']) {
						echo "<option value='1' selected>"._YES_."</option>\n";
						echo "<option value='0'>"._NO_."</option>\n";
					} else {
						echo "<option value='1'>"._YES_."</option>\n";
						echo "<option value='0' selected>"._NO_."</option>\n";
					}
					echo "</select></td></tr>\n";
				
				echo "<tr><td class='hlight'><b>"._APPROVE_USERS_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._APPROVE_USERS_EXPLAIN_."<br><b>"._DEFAULT_.":</b> "._NO_."]\"></td><td align='right' class='hlight'>\n";
					echo "<select name='approve_users'>\n";
					if ($siteConfig['approve_users']) {
						echo "<option value='1' selected>"._YES_."</option>\n";
						echo "<option value='0'>"._NO_."</option>\n";
					} else {
						echo "<option value='1'>"._YES_."</option>\n";
						echo "<option value='0' selected>"._NO_."</option>\n";
					}
					echo "</select></td></tr>\n";
			echo "</tbody>\n";	
			echo "</table>\n";
		echo "</div>\n";
		
		//EMAIL
		echo "<div id='4' style='display:none;'>\n";
			echo "<table width='100%' align='center' cellspacing='1' cellpadding='0' class='std_nicetable'>";
			echo "<thead>\n";
				echo "<tr><td colspan='2'>"._EMAIL_."</td></tr>\n";
			echo "</thead>\n";
			echo "<tbody>\n";
				echo "<tr><td class='clean'><b>"._TYPE_."</b></td><td class='clean'>";
					echo "<select name='mail_usesmtp'>\n";
					if ($siteConfig['mail_usesmtp']==1) {
						echo "<option value='1' selected>SMTP</option>\n";
						echo "<option value='0'>Mail (Standard)</option>\n";
					} else {
						echo "<option value='1'>SMTP</option>\n";
						echo "<option value='0' selected>Mail (Standard)</option>\n";
					}
					echo "</select>";	
				echo "</td></tr>\n";
				echo "<tr><td class='hlight'><b>"._SMTP_."</b></td><td class='hlight'><input type='text' name='mail_smtp' value=\"".$siteConfig['mail_smtp']."\" size='30' maxlength='255'></td></tr>\n";
				
				echo "<tr><td class='clean'><b>"._USEAUTH_."</b></td><td class='clean'>";
					echo "<select name='mail_smtpauth'>\n";
					if ($siteConfig['mail_smtpauth']==1) {
						echo "<option value='1' selected>"._YES_."</option>\n";
						echo "<option value='0'>"._NO_."</option>\n";
					} else {
						echo "<option value='1'>"._YES_."</option>\n";
						echo "<option value='0' selected>"._NO_."</option>\n";
					}
					echo "</select>";	
				echo "</td></tr>\n";
				echo "<tr><td class='hlight'><b>"._USERNAME_."</b></td><td class='hlight'><input type='text' name='mail_smtpuser' value=\"".$siteConfig['mail_smtpuser']."\" size='30' maxlength='255'></td></tr>\n";
				echo "<tr><td class='clean'><b>"._PASSWORD_."</b></td><td class='clean'><input type='password' name='mail_smtppass' value=\"".$siteConfig['mail_smtppass']."\" size='30' maxlength='255'></td></tr>\n";
			echo "</tbody>\n";	
			echo "</table>\n";
		echo "</div>\n";
		
		//CONTENT
		echo "<div id='5' style='display:none;'>\n";
			echo "<table width='100%' align='center' cellspacing='1' cellpadding='0' class='std_nicetable'>";
			echo "<thead>\n";
				echo "<tr><td colspan='2'>"._CONTENT_."</td></tr>\n";
			echo "</thead>\n";
			echo "<tbody>\n";
				echo "<tr><td class='clean' width='30%'><b>"._HOME_NUMNEWS_."</b></td><td align='right' class='clean'><input type='text' name='num_news_home' value=\"".$siteConfig['num_news_home']."\" size='10' maxlength='10'></td></tr>\n";
				echo "<tr><td class='hlight'><b>"._PAGE_NUMNEWS_."</b></td><td align='right' class='hlight'><input type='text' name='num_news_page' value=\"".$siteConfig['num_news_page']."\" size='10' maxlength='10'></td></tr>\n";
				
				echo "<tr><td class='hlight'><b>"._GUESTCANUSEMEXBOX_."</b></td><td align='right' class='hlight'>\n";
					echo "<select name='guest_msgbox'>\n";
					if ($siteConfig['guest_msgbox']) {
						echo "<option value='1' selected>"._YES_."</option>\n";
						echo "<option value='0'>"._NO_."</option>\n";
					} else {
						echo "<option value='1'>"._YES_."</option>\n";
						echo "<option value='0' selected>"._NO_."</option>\n";
					}
					echo "</select></td></tr>\n";
				echo "<tr><td class='clean'><b>"._FORUM_." "._ATTACHMENT_."</b></td><td align='right' class='clean'>\n";
					echo "<select name='forumattachment'>\n";
					if ($siteConfig['forumattachment']) {
						echo "<option value='1' selected>"._ON2_."</option>\n";
						echo "<option value='0'>"._OFF_."</option>\n";
					} else {
						echo "<option value='1'>"._ON2_."</option>\n";
						echo "<option value='0' selected>"._OFF_."</option>\n";
					}
					echo "</select></td></tr>\n";
				echo "<tr><td class='hlight'><b>"._FORUM_." "._ATTACHMENT_."</b>: "._FOLDER_."</td><td align='right' class='hlight'><span id='info'>"._CHGTHEDEFVALTOIMPSECREAS_."</span> <input type='text' name='forumattachmentfolder' value=\"".$siteConfig['forumattachmentfolder']."\" size='20' maxlength='250'></td></tr>\n";
				echo "<tr><td class='clean'><b>"._VIRTUAL_PAGES_."</b></td><td align='right' class='clean'>\n";
					echo "<select name='virtualpages'>\n";
					if ($siteConfig['virtualpages']==1) {
						echo "<option value='1' selected>"._ON2_."</option>\n";
						echo "<option value='0'>"._OFF_."</option>\n";
					} else {
						echo "<option value='1'>"._ON2_."</option>\n";
						echo "<option value='0' selected>"._OFF_."</option>\n";
					}
					echo "</select></td></tr>\n";
			echo "</tbody>\n";
			echo "</table>\n";
		echo "</div>\n";
		
		//COMMENTS
		echo "<div id='6' style='display:none;'>\n";
			echo "<table width='100%' align='center' cellspacing='1' cellpadding='0' class='std_nicetable'>";
			echo "<thead>\n";
				echo "<tr><td colspan='2'>"._COMMENTS_."</td></tr>\n";
			echo "</thead>\n";
			echo "<tbody>\n";
				
				echo "<tr><td class='clean'><b>"._COMMENTSENABLED_."</b></td><td align='right' class='clean'>\n";
					echo "<select name='usecomments'>\n";
					if ($siteConfig['usecomments']) {
						echo "<option value='1' selected>"._YES_."</option>\n";
						echo "<option value='0'>"._NO_."</option>\n";
					} else {
						echo "<option value='1'>"._YES_."</option>\n";
						echo "<option value='0' selected>"._NO_."</option>\n";
					}
					echo "</select></td></tr>\n";
				
				echo "<tr><td class='hlight'><b>"._MODERATECOMMENTS_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._INFO_EXPLAIN_MODERATECOMMENTS_ALWAYS_."]\"></td><td align='right' class='hlight'>"._ALWAYS_."\n";
					echo "<select name='moderate_comments'>\n";
					if ($siteConfig['moderate_comments']) {
						echo "<option value='1' selected>"._YES_."</option>\n";
						echo "<option value='0'>"._NO_."</option>\n";
					} else {
						echo "<option value='1'>"._YES_."</option>\n";
						echo "<option value='0' selected>"._NO_."</option>\n";
					}
					echo "</select></td></tr>\n";
					
				echo "<tr><td class='clean'><b>"._MODERATECOMMENTS_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._INFO_EXPLAIN_MODERATECOMMENTS_ONSPAMONLY_."]\"></td><td align='right' class='clean'>"._ONSPAMONLY_."\n";
					echo "<select name='moderate_comments_onspam'>\n";
					if ($siteConfig['moderate_comments_onspam']) {
						echo "<option value='1' selected>"._YES_."</option>\n";
						echo "<option value='0'>"._NO_."</option>\n";
					} else {
						echo "<option value='1'>"._YES_."</option>\n";
						echo "<option value='0' selected>"._NO_."</option>\n";
					}
					echo "</select></td></tr>\n";
					
				echo "<tr valign='top'><td class='hlight' width='30%'><b>"._SPAMWORDS_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._INFO_EXPLAIN_SPAMWORDS_."]\"><div id='info'>("._SEPARATEDBYCOMMAS_.")</div></td><td class='hlight'><div align='right'>";
					textarea("comments_spam_words","100%","70px",0,"",$siteConfig['comments_spam_words']);
					echo "</div></td></tr>\n";
				
				echo "<tr><td class='clean'><b>"._GUESTCANCOMMENT_."</b></td><td align='right' class='clean'>\n";
					echo "<select name='guest_com'>\n";
					if ($siteConfig['guest_comment']) {
						echo "<option value='1' selected>"._YES_."</option>\n";
						echo "<option value='0'>"._NO_."</option>\n";
					} else {
						echo "<option value='1'>"._YES_."</option>\n";
						echo "<option value='0' selected>"._NO_."</option>\n";
					}
					echo "</select></td></tr>\n";
			echo "</tbody>\n";	
			echo "</table>\n";
		echo "</div>\n";
		
		//MAINTENANCE
		echo "<div id='7' style='display:none;'>\n";
			echo "<table width='100%' align='center' cellspacing='1' cellpadding='0' class='std_nicetable'>";
			echo "<thead>\n";
				echo "<tr><td colspan='2'>"._MAINTENANCE_."</td></tr>\n";
			echo "</thead>\n";
			echo "<tbody>\n";
				echo "<tr><td class='clean' colspan='2' align='center'>"._MAINTENANCE_EXPLAIN_."</td></tr>\n";
				echo "<tr><td class='clean' width='60%'><b>"._MAINTENANCE_." ("._GENERAL_.")</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._INFO_EXPLAIN_MAINTENANCE_."]\"></td><td align='right' class='clean'><span id='info'>"._MINUTES_." </span><input type='text' name='maintenance' value=\"".$siteConfig['maintenance']."\" size='10' maxlength='10'></td></tr>\n";
				echo "<tr><td class='hlight'><img src='images/sub.gif'> <b>"._MESBOXFLOOD_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._INFO_EXPLAIN_MESBOXFLOOD_."]\"></td><td align='right' class='hlight'><span id='info'>"._MINUTES_." </span><input type='text' name='maintenance_mesboxflood' value=\"".$siteConfig['maintenance_mesboxflood']."\" size='10' maxlength='10'></td></tr>\n";
				echo "<tr><td class='clean'><img src='images/sub.gif'> <b>"._OLDWAITUSER_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._INFO_EXPLAIN_OLDWAITUSER_."]\"></td><td align='right' class='clean'><span id='info'>"._HOURS_." </span><input type='text' name='maintenance_waitusers' value=\"".$siteConfig['maintenance_waitusers']."\" size='10' maxlength='10'></td></tr>\n";
				echo "<tr><td class='hlight'><img src='images/sub.gif'> <b>"._OLDPVTMSG_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._INFO_EXPLAIN_OLDPVTMSG_."]\"></td><td align='right' class='hlight'><span id='info'>"._DAYS_." </span><input type='text' name='maintenance_oldpm' value=\"".$siteConfig['maintenance_oldpm']."\" size='10' maxlength='10'></td></tr>\n";
				echo "<tr><td class='clean'><img src='images/sub.gif'> <b>"._OLDLOGINATMPT_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._INFO_EXPLAIN_OLDLOGINATMTP_."]\"></td><td align='right' class='clean'><span id='info'>"._MINUTES_." </span><input type='text' name='maintenance_failedlogin' value=\"".$siteConfig['maintenance_failedlogin']."\" size='10' maxlength='10'></td></tr>\n";
				echo "<tr><td class='hlight'><img src='images/sub.gif'> <b>"._STBYGRPMBRS_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._INFO_EXPLAIN_STBYGRPMBRS_."]\"></td><td align='right' class='hlight'><span id='info'>"._DAYS_." </span><input type='text' name='maintenance_standbygroup' value=\"".$siteConfig['maintenance_standbygroup']."\" size='10' maxlength='10'></td></tr>\n";
				echo "<tr><td class='clean'><img src='images/sub.gif'> <b>"._RESLOADTIME_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._INFO_EXPLAIN_RESLOADTIME_."]\"></td><td align='right' class='clean'><span id='info'>"._HOURS_." </span><input type='text' name='maintenance_loadtime' value=\"".$siteConfig['maintenance_loadtime']."\" size='10' maxlength='10'></td></tr>\n";
				
				echo "<tr><td class='hlight'><b>"._USECRON_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._INFO_EXPLAIN_CRONJOBS_."]\"></td><td align='right' class='hlight'>\n";
					echo "<select name='usecronjobs'>\n";
					if ($siteConfig['usecronjobs']) {
						echo "<option value='1' selected>"._YES_."</option>\n";
						echo "<option value='0'>"._NO_."</option>\n";
					} else {
						echo "<option value='1'>"._YES_."</option>\n";
						echo "<option value='0' selected>"._NO_."</option>\n";
					}
					echo "</select></td></tr>\n";				
			echo "</tbody>\n";	
			echo "</table>\n";
		echo "</div>\n";
		
		//FTP
		echo "<div id='8' style='display:none;'>\n";
			echo "<table width='100%' align='center' cellspacing='1' cellpadding='0' class='std_nicetable'>";
			echo "<thead>\n";
				echo "<tr><td colspan='2'>"._FTP_."</td></tr>\n";
			echo "</thead>\n";
			echo "<tbody>\n";
				echo "<tr><td class='clean' colspan='2' align='center'>"._FTP_EXPLAIN_."</td></tr>\n";
				echo "<tr><td class='clean' width='60%'><b>"._URL_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._INFO_EXPLAIN_FTP_URL_."]\"></td><td align='right' class='clean'><input type='text' name='ftp_server' value=\"".$siteConfig['ftp_server']."\" size='30' maxlength='255'></td></tr>\n";
				echo "<tr><td class='hlight'><b>"._USERNAME_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._INFO_EXPLAIN_FTP_USER_."]\"></td><td align='right' class='hlight'><input type='text' name='ftp_user' value=\"".$siteConfig['ftp_user']."\" size='30' maxlength='30'></td></tr>\n";
				echo "<tr><td class='clean'><b>"._PASSWORD_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._INFO_EXPLAIN_FTP_PASS_."]\"></td><td align='right' class='clean'><input type='password' name='ftp_pass' value=\"".$siteConfig['ftp_pass']."\" size='30' maxlength='30'></td></tr>\n";
				echo "<tr><td class='hlight'><b>"._BASEPATH_."</b> <img src='images/info.gif' alt='"._INFORMATIONS_."' title=\"header=["._INFORMATIONS_."] body=["._INFO_EXPLAIN_FTP_BASEPATH_."]\"></td><td align='right' class='hlight'><input type='text' name='ftp_base' value=\"".$siteConfig['ftp_base']."\" size='30' maxlength='255'></td></tr>\n";
			echo "</tbody>\n";
			echo "</table>\n";
		echo "</div>\n";
		
			echo "<table width='100%' align='center' cellspacing='0' cellpadding='2'>";
				echo "<tr><td colspan='2'><input type='submit' name='Submit' value='"._SAVE_."'></td></tr>\n";
			echo "</table>\n";
		closeTable();
		
		echo "</form>\n";
	} else {	
		$nome = inCode($_POST['nome_sito']);
		$site_url = inCode($_POST['site_url']);
		$descrizione = inCode($_POST['descrizione']);
		$metatags = inCode($_POST['metatags']);
		$footmsg = inCode($_POST['footmsg']);
		$copyright = inCode($_POST['copyright']);
		$site_open = inCode($_POST['site_open']);
		$lang = inCode($_POST['lang']);
		$template = inCode($_POST['template']);
		$num_news_home  = inCode($_POST['num_news_home']);
		$num_news_page  = inCode($_POST['num_news_page']);
		$email  = inCode($_POST['webmaster_mail']);
		$guest_com  = inCode($_POST['guest_com']);
		$guest_msgbox = inCode($_POST['guest_msgbox']);
		$admin_ghosts = inCode($_POST['admin_ghosts']);
		$user_max_lunghezza = inCode($_POST['user_max_lunghezza']);
		$pass_max_lunghezza = inCode($_POST['pass_max_lunghezza']);
		$defpage = inCode($_POST['defpage']);
		$timestamp = inCode($_POST['timestamp']);
		$forumattachment = intval($_POST['forumattachment']);
		$forumattachmentfolder = inCode($_POST['forumattachmentfolder']);
		$avatar_max_w = intval($_POST['avatar_max_w']);
		$avatar_max_h = intval($_POST['avatar_max_h']);
		$informationbar = intval($_POST['infobar']);
		$graphic_check = intval($_POST['graphic_check']);
		$textarea_editor = intval($_POST['textarea_editor']);
		$modrewrite = intval($_POST['modrewrite']);
		$timezone = inCode($_POST['timezone']);
		$searchengineinstat = intval($_POST['searchengineinstat']);
		$user_confirm_email = intval($_POST['user_confirm_email']);
		$approve_users = intval($_POST['approve_users']);
		$ftp_server = inCode($_POST['ftp_server']);
		$ftp_user = inCode($_POST['ftp_user']);
		$ftp_pass = inCode($_POST['ftp_pass']);
		$ftp_base = inCode($_POST['ftp_base']);
		$usecomments = intval($_POST['usecomments']);
		$moderate_comments = intval($_POST['moderate_comments']);
		$moderate_comments_onspam = intval($_POST['moderate_comments_onspam']);
		$comments_spam_words = inCode($_POST['comments_spam_words']);
		$usecronjobs = intval($_POST['usecronjobs']);
		$virtualpages = intval($_POST['virtualpages']);
		$offlinemsg = inCode($_POST['offlinemsg']);
		$mail_usesmtp = intval($_POST['mail_usesmtp']);
		$mail_smtp = inCode($_POST['mail_smtp']);
		$mail_smtpauth = intval($_POST['mail_smtpauth']);
		$mail_smtpuser = inCode($_POST['mail_smtpuser']);
		$mail_smtppass = inCode($_POST['mail_smtppass']);
		
		$maintenance = intval($_POST['maintenance']);
		$maintenance_mesboxflood = intval($_POST['maintenance_mesboxflood']);
		$maintenance_waitusers = intval($_POST['maintenance_waitusers']);
		$maintenance_oldpm = intval($_POST['maintenance_oldpm']);
		$maintenance_failedlogin = intval($_POST['maintenance_failedlogin']);
		$maintenance_standbygroup = intval($_POST['maintenance_standbygroup']);
		$maintenance_loadtime = intval($_POST['maintenance_loadtime']);
		
		$save = true;
		if ($nome=="") { $save = false; $msg = "<b>"._EMPTY_."</b>: "._SITENAME_; }
		if ($site_url=="") { $save = false; $msg = "<b>"._EMPTY_."</b>: "._SITEURL_; }
		if ($num_news_home=="") { $save = false; $msg = "<b>"._EMPTY_."</b>: "._HOME_NUMNEWS_; }
		if ($num_news_page=="") { $save = false; $msg = "<b>"._EMPTY_."</b>: "._PAGE_NUMNEWS_; }
		if (!validEmail($email)) { $save = false; $msg = _MAILNOTVALID_; }
		if ($user_max_lunghezza=="") { $save = false; $msg = "<b>"._EMPTY_."</b>: "._MAXLENGTH_USER_; }
		if ($pass_max_lunghezza=="") { $save = false; $msg = "<b>"._EMPTY_."</b>: "._MAXLENGTH_PASS_; }
		if ($defpage=="") { $save = false; $msg = "<b>"._EMPTY_."</b>: "._DEFAULTPAGEINHOME_;}
		if ($timestamp=="") { $save = false; $msg = "<b>"._EMPTY_."</b>: "._TIMESTAMP_; }
		if ($forumattachment AND $forumattachmentfolder=="") { $save = false; $msg = "<b>"._EMPTY_."</b>: "._FORUM_." "._ATTACHMENT_." "._OR_." "._FOLDER_; }
		if ($avatar_max_w=="") { $avatar_max_w = 100; }
		if ($avatar_max_h=="") { $avatar_max_h = 100; }
		if ($ftp_base=="") { $ftp_base = "/"; }
		
		if ($maintenance<10) { $maintenance = 10; }
		if ($maintenance_mesboxflood<10) { $maintenance_mesboxflood = 10; }
		if ($maintenance_waitusers<1) { $maintenance_waitusers = 1; }
		if ($maintenance_oldpm<1) { $maintenance_oldpm = 1; }
		if ($maintenance_failedlogin<10) { $maintenance_failedlogin = 10; }
		if ($maintenance_standbygroup<1) { $maintenance_standbygroup = 1; }
		if ($maintenance_loadtime<24) { $maintenance_loadtime = 24; }
		
		$site_url = (eregi("/",$site_url{strlen($site_url)-1})) ? substr($site_url,0,strlen($site_url)-1) : $site_url ;
		
		openTable();
		
		if ($save) {
			echo "<div align='center'><b>"._SAVINGCONFIGURATION_."</b></div>";
			adminLog("[page:Configuration][query:".getenv('QUERY_STRING')."][END]");
			$dblink->query("UPDATE memht_config SET nome='$nome',site_url='$site_url',descrizione='$descrizione',metatags='$metatags',footmsg='$footmsg',copyright='$copyright',site_open='$site_open',lingua='$lang',template='$template',num_news_home='$num_news_home',num_news_page='$num_news_page',email='$email',guest_com='$guest_com',guest_msgbox='$guest_msgbox',admin_ghosts='$admin_ghosts',user_max_lunghezza='$user_max_lunghezza',pass_max_lunghezza='$pass_max_lunghezza',defpage='$defpage',timestamp='$timestamp',forumattachment='$forumattachment',forumattachmentfolder='$forumattachmentfolder',avatar_max_w='$avatar_max_w',avatar_max_h='$avatar_max_h',informationbar='$informationbar',graphic_check='$graphic_check',textarea_editor='$textarea_editor',modrewrite='$modrewrite',timezone='$timezone',searchengineinstat='$searchengineinstat',user_confirm_email='$user_confirm_email',approve_users='$approve_users',ftp_server='$ftp_server',ftp_user='$ftp_user',ftp_pass='$ftp_pass',ftp_base='$ftp_base',usecomments='$usecomments',moderate_comments='$moderate_comments',moderate_comments_onspam='$moderate_comments_onspam',comments_spam_words='$comments_spam_words',usecronjobs='$usecronjobs',virtualpages='$virtualpages',offlinemsg='$offlinemsg',mail_usesmtp='$mail_usesmtp',mail_smtp='$mail_smtp',mail_smtpauth='$mail_smtpauth',mail_smtpuser='$mail_smtpuser',mail_smtppass='$mail_smtppass'");
			
			$dblink->query("UPDATE memht_maintenance SET maintenance='$maintenance',maintenance_mesboxflood='$maintenance_mesboxflood',maintenance_waitusers='$maintenance_waitusers',maintenance_oldpm='$maintenance_oldpm',maintenance_failedlogin='$maintenance_failedlogin',maintenance_standbygroup='$maintenance_standbygroup',maintenance_loadtime='$maintenance_loadtime'");
			
			echo "<meta http-equiv='refresh' content='0;URL=admin.php?page=configuration'>";
		} else {
			echo "<div align='center' id='errorText'><b>"._CONFIGNOTSAVEDCHECKFIELDS_."</b><br>$msg</div>";
		}
		
		closeTable();
	}
}

function newVersion() {
	global $siteConfig,$siteInfo;
	
	$lrfile = @fopen($siteConfig['versionremotefile'], "r");
	if ($lrfile) {
	    $remoteversion = @fgets($lrfile, 1024);
	}
	@fclose($lrfile);
	
	openTable();
	if (@$remoteversion>$siteInfo['version']) {
		echo "<div align='center' class='box' style='background-color: #EAC6C6;'><b>"._UPDATEREQUIRED_."</b></div>";
	} else {
		echo "<div align='center' class='box' style='background-color: #C8E8CA;'><b>"._NOUPDATEREQUIRED_."</b></div>";
	}
	closeTable();
}

function censorList($word,$subop,$ok=false) {
	global $dblink;
	
	openTable();
		echo "<div align='center' class='box'>";
			echo "<a href='admin.php?page=configuration&op=censorList' title='"._LIST_."'><img src='admin/icons/list.png' border='0' title='"._LIST_."' align='top'> "._LIST_."</a>";
			echo " - <a href='admin.php?page=configuration&op=censorList&subop=addWord' title='"._ADD_."'><img src='admin/icons/add.png' border='0' title='"._ADD_."' align='top'> "._ADD_."</a>";
		echo "</div>";
	
	switch($subop) {
		case "getList":
		default:
			$n = 0;
			echo "<table width='100%' align='center' cellspacing='1' cellpadding='0' class='std_nicetable'>\n";
			echo "<thead>\n";
			echo "<tr><td>"._WORD_."</td><td width='1%'>&nbsp;</td></tr>\n";
			echo "</thead>\n";
			echo "<tbody>\n";
			$result = $dblink->get_list("SELECT * FROM memht_censorlist ORDER BY cens");
			foreach ($result as $row) {
				$word = outCode($row['cens']);

				$class = (($n++%2)!=0) ? "hlight" : "clean" ;
				echo "<tr><td class='$class'><b>$word</b></td><td class='$class' align='right'><a href='admin.php?page=configuration&op=censorList&subop=deleteWord&word=$word' title='"._DELETE_."'><img src='images/delete.gif' alt='Delete' border='0'></a></td></tr>\n";
			}
			if (!$n) {
				echo "<tr><td colspan='2' id='errorText' align='center' class='clean'><b>"._EMPTY_."</b></td></tr>\n";
			}
			echo "</tbody>\n";
			echo "</table>\n";
		break;
		
		case "addWord":
			if (!$ok) {
				echo "<table width='100%' align='center' cellspacing='0' cellpadding='1'>";
				echo "<form name='form' method='post' action='admin.php?page=configuration&op=censorList&subop=addWord&ok=true'>";
					echo "<tr><td width='25%'><b>"._WORD_."</b></td><td class='clean'><input type='text' name='word' size='30' maxlength='255'></td></tr>\n";
					echo "<tr><td colspan='2'><input type='submit' name='Submit' value='"._ADD_."'>\n";
				echo "</form>\n";
				echo "</table>\n";
			} else {
				$save = true;
				if (isSet($_POST['word']) AND $_POST['word']!="") { $word = inCode($_POST['word']);} else { $save = false; }
				
				if ($save) {
					$dblink->query("INSERT INTO memht_censorlist (cens) VALUES ('$word')");
					echo "<meta http-equiv='refresh' content='0;URL=admin.php?page=configuration&op=censorList'>";
				} else {
					echo "<div align='center' id='errorText'><b>"._FIELDINVALID_."</b></div>";
				}
			}
		break;
		
		case "deleteWord":
			if ($ok) {
				$dblink->query("DELETE FROM memht_censorlist WHERE cens='$word'");
				echo "<meta http-equiv='refresh' content='0;URL=admin.php?page=configuration&op=censorList'>";		
			} else {
				echo "<div align='center'><b>"._SUREDELETE_."</b><br><a href='admin.php?page=configuration&op=censorList&subop=deleteWord&word=$word&ok=true' title='"._YES_."'>"._YES_."</a> - <a href='admin.php?page=configuration&op=censorList' title='"._NO_."'>"._NO_."</a></div>";
			}
		break;
	}
	closeTable();
}

require_once("admin/inc/inc_header.php");
	admin_page_title($page);
	
	openTable();
		echo "<div align='center' class='box'>";
			echo "<a href='admin.php?page=configuration&op=siteConfig' title='"._SITECONFIG_."'><img src='admin/icons/config.png' border='0' title='"._SITECONFIG_."' align='top'> "._SITECONFIG_."</a>";
			echo " - <a href='admin.php?page=configuration&op=censorList' title='"._CENSOR_LIST_."'><img src='admin/icons/list.png' border='0' title='"._CENSOR_LIST_."' align='top'> "._CENSOR_LIST_."</a>";
			echo " - <a href='admin.php?page=configuration&op=newVersion' title='"._CHECKUPDATES_."'><img src='admin/icons/update.png' border='0' title='"._CHECKUPDATES_."' align='top'> "._CHECKUPDATES_."</a>";
		echo "</div>";
	closeTable();
	
		switch($op) {
			case "siteConfig":
				siteConfig($ok);
			break;
			
			case "newVersion":
				newVersion();
			break;
			
			case "censorList":
				censorList($word,$subop,$ok);
			break;
		
			default:
				siteConfig($ok);
			break;
		}

require_once("admin/inc/inc_footer.php");

?>