<?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"); }

		$xAdmin_Default_Theme = htmlentities($xAdmin_Default_Theme, ENT_QUOTES);
		$sql = "UPDATE `".TABLE_CONFIG_ADMIN."` SET `admintheme`='$xAdmin_Default_Theme' ";
		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_ADMIN."`");
		redirect_url("".$admin_file.".php?op=Configure");
}
}else {
	echo "Access Denied";
}