<?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)  {

$file = fopen("".$cache."/Configuration/".$cache_prefix."_configadvance.php", "w");
$content = "<?php\n";
$content .= "$begin_content";
$content .= "\$maxadv_message_box = \"$maxadv_message_box\";\n";
$content .= "\$maxadv_center_blocks = \"$maxadv_center_blocks\";\n";
$content .= "\$maxadv_blocks_center = \"$maxadv_blocks_center\";\n";
$content .= "\$maxadv_custom_head = \"$maxadv_custom_head\";\n";
$content .= "\$maxadv_custom_header = \"$maxadv_custom_header\";\n";

$content .= "\$maxadv_cron1 = \"$maxadv_cron1\";\n";
$content .= "\$maxadv_cron2 = \"$maxadv_cron2\";\n";
$content .= "\$maxadv_cron3 = \"$maxadv_cron3\";\n";
$content .= "\$maxadv_cron4 = \"$maxadv_cron4\";\n";
$content .= "\$maxadv_time_generation = \"$maxadv_time_generation\";\n";
$content .= "\$maxadv_phpmysql = \"$maxadv_phpmysql\";\n";
$content .= "\$maxadv_sqlrequests = \"$maxadv_sqlrequests\";\n";
$content .= "\$maxadv_memory = \"$maxadv_memory\";\n";
$content .= "\$maxadv_viewspages = \"$maxadv_viewspages\";\n";
$content .= "\$maxadv_maxcache = \"$maxadv_maxcache\";\n";
$content .= "\$maxadv_blocksfooter = \"$maxadv_blocksfooter\";\n";
$content .= "\$maxadv_centerblocksfooter = \"$maxadv_centerblocksfooter\";\n";
$content .= "\$maxadv_statistics = \"$maxadv_statistics\";\n";
$content .= "\$maxadv_msanalysis = \"$maxadv_msanalysis\";\n";
$content .= "\$maxadv_customfooter = \"$maxadv_customfooter\";\n";

$content .= "\$maxmapforum = \"$maxmapforum\";\n";
$content .= "\$maxmaptopics = \"$maxmaptopics\";";
fwrite($file, $content);
fclose($file);
//@chmod("data/nukeconfig.php",0400);
		redirect_url("".$admin_file.".php?op=ConfigureAdvance");
}
}else {
	echo "Access Denied";
}