<?php
/************************************************************************/
/* Maximus CMS: Web Portal System                                       */
/* ==============================                                       */
/*                                                                      */
/* Copyright (c) 2002 - 2006                                            */
/* http://www.php-maximus.fr                                            */
/* dev@php-maximus.org                                                  */
/*                                                                      */
/* 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.       */
/************************************************************************/
/* Based on PHP-NUKE: Web Portal System                                 */
/************************************************************************/
if (!defined('ADMIN_ALLOW') && !defined('ADMIN_MAX')) {
	die ("Access Denied");
}
if ($acces == 1) {
if($admintest && $adminsecu)  {

if (!defined('SECUR_MAX')) {
	die ();
}

if (!is_god($admin)) { redirect_url("".$admin_file.".php"); }
if (!is_admin($admin)) { redirect_url("".$admin_file.".php"); }
if (!is_user($user)) { redirect_url("".$admin_file.".php"); }

		$xsitename          = htmlentities($xsitename, ENT_QUOTES);
		$xslogan            = htmlentities($xslogan, ENT_QUOTES);
		$xbackend_title     = htmlentities($xbackend_title, ENT_QUOTES);
		$xnotify_subject    = htmlentities($xnotify_subject, ENT_QUOTES);
		$xnotify_message    = htmlentities($xnotify_message, ENT_QUOTES);
		$xsingleaccountname = htmlentities($xsingleaccountname, ENT_QUOTES);
		$xwysiwyg           = htmlentities($Xwysiwyg, ENT_QUOTES);
		$sql = "UPDATE `".TABLE_CONFIG."` SET `sitename`='$xsitename', `nukeurl`='$xnukeurl', `site_logo`='$xsite_logo', `slogan`='$xslogan', startdate='$xstartdate', `adminmail`='$xadminmail', `anonpost`='$xanonpost', `Default_Theme`='$xDefault_Theme', `foot1`='$xfoot1', `foot2`='$xfoot2', `foot3`='$xfoot3', `anonymous`='$xanonymous', `broadcast_msg`='$xbroadcast_msg', `my_headlines`='$xmy_headlines', `top`='$xtop', `user_news`='$xuser_news', `oldnum`='$xoldnum', `ultramode`='$xultramode', `banners`='$xbanners', `backend_title`='$xbackend_title', `backend_language`='$xbackend_language', `language`='$xlanguage', `locale`='$xlocale', `decalage`='$xdecalage', `multilingual`='$xmultilingual', `useflags`='$xuseflags', `admingraphic`='$xadmingraphic', `httpref`='$xhttpref', `httprefmax`='$xhttprefmax',  `wysiwyg`='$xwysiwyg', `dbi`='$Cldbi', `rewrite`='$xrewrite' ";
		if ( !($result = $GLOBALS['db']->sql_query($sql)) )
{ query_die(GENERAL_ERROR, 'Could not INSERT Config WebSite', '', __LINE__, __FILE__, $sql);}
		$GLOBALS['db']->sql_query("OPTIMIZE TABLE `".TABLE_CONFIG."`");
		if (file_exists("".$cache."/Configuration/".$cache_prefix."_cache_config.php")) {
			unlink ("".$cache."/Configuration/".$cache_prefix."_cache_config.php");}
		redirect_url("".$admin_file.".php?op=Configure");
}
}else {
	echo "Access Denied";
}