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

$file = fopen("".$cache."/Configuration/".$cache_prefix."_configadvance.php", "w");
$content  = "";
$content .= "<?php\n defined(\"MAXIMUS\") or  Header(\"Location: ../index.php\"); \n";
$content .= "\n";
$content .= "define( 'MAXADV_MESSAGE_BOX', '$message_box' );\n";
$content .= "define( 'MAXADV_CENTER_BLOCKS', '$center_blocks' );\n";
$content .= "define( 'MAXADV_BLOCKS_CENTER', '$blocks_center' );\n";
$content .= "define( 'MAXADV_CUSTOM_HEAD', '$custom_head' );\n";
$content .= "define( 'MAXADV_CUSTOM_HEADER', '$custom_header' );\n";
$content .= "define( 'MAXADV_CRON1', '$cron1' );\n";
$content .= "define( 'MAXADV_CRON2', '$cron2' );\n";
$content .= "define( 'MAXADV_CRON3', '$cron3' );\n";
$content .= "define( 'MAXADV_CRON4', '$cron4' );\n";
$content .= "define( 'MAXADV_TIME_GENERATION', '$time_generation' );\n";
$content .= "define( 'MAXADV_PHPMYSQL', '$phpmysql' );\n";
$content .= "define( 'MAXADV_SQLREQUESTS', '$sqlrequests' );\n";
$content .= "define( 'MAXADV_MEMORY', '$memory' );\n";
$content .= "define( 'MAXADV_VIEWSPAGE', '$viewspages' );\n";
$content .= "define( 'MAXADV_BLOCKSFOOTER', '$blocksfooter' );\n";
$content .= "define( 'MAXADV_CENTERBLOCKSFOOTER', '$centerblocksfooter' );\n";
$content .= "define( 'MAXADV_STATISTICS', '$statistics' );\n";
$content .= "define( 'MAXADV_MSANALYSIS', '$msanalysis' );\n";
$content .= "define( 'MAXADV_CUSTOMFOOTER', '$customfooter' );\n";
$content .= "define( 'MAXADV_MAPFORUM', '$mapforum' );\n";
$content .= "define( 'MAXADV_MAPTOPICS', '$maptopics' );\n";
$content .= "define( 'MAXADV_CRYPTAGE', '$cryptage' );\n";
$content .= "define( 'MAXADV_ANTICLICKRIGHT', '$anticlikright' );\n";
$content .= "define( 'MAXADV_ANTISELECT', '$antiselect' );\n";
$content .= "define( 'MAXADV_TIMESESSION_U', '$xtimesessionu' );\n";
$content .= "define( 'MAXADV_TIMESESSION_V', '$xtimesessionv' );\n";
$content .= "define( 'MAXADV_IMAGETOP', '$imtop' );\n";
$content .= "define( 'MAXADV_IMAGEMAXCACHE', '$immaxcache' );\n";
$content .= "define( 'MAXADV_IMAGECOPY', '$imcopy' );\n";
$content .= "define( 'MAXADV_IMAGEML', '$imml' );\n";
$content .= "define( 'MAXADV_IMAGEWEBSITE', '$imwebsite' );\n";
fwrite($file, $content);
fclose($file);
		redirect_url("".$admin_file.".php?op=ConfigureAdvance");
}
}else {
	echo "Access Denied";
}