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

$pagetitle = _CMAX;

incoh();
global $prefix, $admin_file, $bgcolor2, $cache, $cache_prefix, $cache_admin;


if (is_file("kernel/tabs/tabwindow.php")) {
include_once "kernel/tabs/tabwindow.php";
}

$currentTabs=new Tabs("cMax1");
$currentTabs->StartTabWindow();
$currentTabs->AddTab("Max Cache");


$currentTabs=new Tabs("cMax2");
$currentTabs->StartTabWindow();
$currentTabs->AddTab("Configuration");

if (!file_exists("".$cache."/Configuration/".$cache_prefix."_cMax_config.php") & !file_exists("".$cache."/Configuration/".$cache_prefix."_cMax_configold.php")) {
Max_OpenTable();
echo "<table width=\"100%\"><center>"._CACHECONFIG."<br /><br />"._CREATECACHE2."</center>"
    ."<form action=\"".$admin_file.".php\" method=\"post\">"
    ."<input type=\"hidden\" name=\"op\" value=\"UpdatecMax\">"
    ."<table align=\"center\"><td ><br /><input type=\"submit\" value=\""._CREATECACHE."\" /></td></form></table><br /><br />";
Max_CloseTable();
incof();
}



//Max_OpenTable();
echo "<table width='100%'><tr><td><center>"._CACHECONFIG."<br />";
if (file_exists("".$cache."/Configuration/".$cache_prefix."_cMax_config.php") && !file_exists("".$cache."/Configuration/".$cache_prefix."_cMax_configold.php")) {
include_once ("".$cache."/Configuration/".$cache_prefix."_cMax_config.php");
echo "<a href=\"".$admin_file.".php?op=DeactivecMax\">"._DEACTIVATECACHE."</a></center><br />";
$cmaxdeactive = 1 ; } else {
echo "<a href=\"".$admin_file.".php?op=ReactivecMax\">"._REACTIVATECACHE."</a></center><br />";}
echo "</td></tr></table>";
//Max_CloseTable();

echo "<table width=\"100%\"><tr><td>"
	."<img src=\"images/nukesentinel/delete.png\" alt='' /> <a href=\"".$admin_file.".php?op=EmptyCache&folder=Blocks\">"._EMPTYCACHEBLOCKS."</a><br />"
	."<img src=\"images/nukesentinel/delete.png\" alt='' / > <a href=\"".$admin_file.".php?op=EmptyCache&folder=Modules\">"._EMPTYCACHEMODULES."</a><br />"
	."<img src=\"images/nukesentinel/delete.png\" alt='' /> <a href=\"".$admin_file.".php?op=EmptyCache&folder=Configuration\">"._EMPTYCACHECONFIGURATION."</a><br />"
	."</td></tr></table><br />";



$currentTabs->AddTab(""._LISTING."");
echo ""._LISTINGFILE."";
br('2');


echo "<a href=\"".$admin_file.".php?op=CacheSize\" onclick=\"NewsReadWindow(this.href,'CacheSize','400','150','yes');return false;\"><img src=\"images/view.gif\" alt=\""._SHOW."\" title=\""._SHOW."\" border=\"0\" width=\"17\" height=\"17\" /> "._SIZE_CACHE."</a><br />"
    ."<a href=\"".$admin_file.".php?op=ListingcMax\" onclick=\"NewsReadWindow(this.href,'ListingcMax','700','500','yes');return false;\"><img src=\"images/view.gif\" alt=\""._SHOW."\" title=\""._SHOW."\" border=\"0\" width=\"17\" height=\"17\" /> "._LISTING_MODULES."</a><br />"
    ."<a href=\"".$admin_file.".php?op=ListingcMaxBlocks\" onclick=\"NewsReadWindow(this.href,'ListingcMaxBlocks','700','500','yes');return false;\"><img src=\"images/view.gif\" alt=\""._SHOW."\" title=\""._SHOW."\" border=\"0\" width=\"17\" height=\"17\"> "._LISTING_BLOCKS."</a><br />"
    ."<a href=\"".$admin_file.".php?op=ListingcMaxConfiguration\" onclick=\"NewsReadWindow(this.href,'ListingcMaxConfiguration','700','500','yes');return false;\"><img src=\"images/view.gif\" alt=\""._SHOW."\" title=\""._SHOW."\" border=\"0\" width=\"17\" height=\"17\" /> "._LISTING_CONFIG."</a>";


//clearstatcache();
$currentTabs->EndTabWindow();
$currentTabs->EndTabWindow();


$currentTabs=new Tabs("cMax1");


$currentTabs->AddTab(""._SESSIONS."");
max_sessions('1');


//$currentTabs->AddTab(""._VEILLE."");
//echo "Onglet pour admin bull";


$currentTabs->AddTab(""._SECURITYFILES."");
echo ""._SECURITYFILES1."<br /><br />";


echo "<table width=\"100%\"><tr><td width=\"33%\">";
Max_OpenTable();
echo "<a href=\"".$admin_file.".php?op=cMaxFolderAbuse\" onclick=\"NewsReadWindow(this.href,'cMaxFolderAbuse','400','500','yes');return false;\"><img src=\"images/view.gif\" alt=\""._SHOW."\" title=\""._SHOW."\" border=\"0\" width=\"17\" height=\"17\" /> "._FOLDERABUSE."</a><br />";
Max_CloseTable();

echo "</td></tr><tr><td width=\"33%\">";

Max_OpenTable();
echo "<a href=\"".$admin_file.".php?op=cMaxFolderAdmin\" onclick=\"NewsReadWindow(this.href,'cMaxFolderAdmin','400','500','yes');return false;\"><img src=\"images/view.gif\" alt=\""._SHOW."\" title=\""._SHOW."\" border=\"0\" width=\"17\" height=\"17\" /> "._FOLDERADMIN."</a><br />";
Max_CloseTable();

echo "</td></tr><tr><td width=\"33%\">";

Max_OpenTable();
echo "<a href=\"".$admin_file.".php?op=cMaxFolderBlocks\" onclick=\"NewsReadWindow(this.href,'cMaxFolderBlocks','500','600','yes');return false;\"><img src=\"images/view.gif\" alt=\""._SHOW."\" title=\""._SHOW."\" border=\"0\" width=\"17\" height=\"17\" /> "._FOLDERBLOCKS."</a><br />";
Max_CloseTable();
echo "</td></tr><tr><td width=\"33%\">";
/*
Max_OpenTable();
echo "<a href=\"".$admin_file.".php?op=cMaxFolderDB\" onclick=\"NewsReadWindow(this.href,'cMaxFolderDB','500','600','yes');return false;\"><img src=\"images/view.gif\" alt=\""._SHOW."\" title=\""._SHOW."\" border=\"0\" width=\"17\" height=\"17\" /> "._FOLDERDB."</a><br />";
Max_CloseTable();
echo "</td></tr><tr><td width=\"33%\">";
*/
Max_OpenTable();
echo "<a href=\"".$admin_file.".php?op=cMaxFolderImages\" onclick=\"NewsReadWindow(this.href,'cMaxFolderImages','400','500','yes');return false;\"><img src=\"images/view.gif\" alt=\""._SHOW."\" title=\""._SHOW."\" border=\"0\" width=\"17\" height=\"17\" /> "._FOLDERIMAGES."</a><br />";
Max_CloseTable();
echo "</td></tr><tr><td width=\"33%\">";

Max_OpenTable();
echo "<a href=\"".$admin_file.".php?op=cMaxFolderIncludes\" onclick=\"NewsReadWindow(this.href,'cMaxFolderIncludes','400','500','yes');return false;\"><img src=\"images/view.gif\" alt=\""._SHOW."\" title=\""._SHOW."\" border=\"0\" width=\"17\" height=\"17\" /> "._FOLDERINCLUDES."</a><br />";
Max_CloseTable();
echo "</td></tr><tr><td width=\"33%\">";

Max_OpenTable();
echo "<a href=\"".$admin_file.".php?op=cMaxFolderKernel\" onclick=\"NewsReadWindow(this.href,'cMaxFolderModules','500','600','yes');return false;\"><img src=\"images/view.gif\" alt=\""._SHOW."\" title=\""._SHOW."\" border=\"0\" width=\"17\" height=\"17\" /> "._FOLDERKERNEL."</a><br />";
Max_CloseTable();

echo "</td></tr><tr><td width=\"33%\">";

Max_OpenTable();
echo "<a href=\"".$admin_file.".php?op=cMaxFolderLanguage\" onclick=\"NewsReadWindow(this.href,'cMaxFolderLanguage','500','600','yes');return false;\"><img src=\"images/view.gif\" alt=\""._SHOW."\" title=\""._SHOW."\" border=\"0\" width=\"17\" height=\"17\" /> "._FOLDERLANGUAGE."</a><br />";
Max_CloseTable();

echo "</td></tr><tr><td width=\"33%\">";

Max_OpenTable();
echo "<a href=\"".$admin_file.".php?op=cMaxFolderModules\" onclick=\"NewsReadWindow(this.href,'cMaxFolderModules','500','600','yes');return false;\"><img src=\"images/view.gif\" alt=\""._SHOW."\" title=\""._SHOW."\" border=\"0\" width=\"17\" height=\"17\" /> "._FOLDERMODULES."</a><br />";
Max_CloseTable();

echo "</td></tr><tr><td width=\"33%\">";

Max_OpenTable();
echo "<a href=\"".$admin_file.".php?op=cMaxFolderThemes\" onclick=\"NewsReadWindow(this.href,'cMaxFolderThemes','500','600','yes');return false;\"><img src=\"images/view.gif\" alt=\""._SHOW."\" title=\""._SHOW."\" border=\"0\" width=\"17\" height=\"17\" /> "._FOLDERTHEMES."</a><br />";
Max_CloseTable();

echo "</td><td width=\"33%\">"
    ."</td></table>";


$currentTabs->AddTab("cControl Max");
echo ""._UPLOAD_CONTROL."<br /><br />"
    ."<table width=\"100%\"><tr><td width=\"33%\">";

/*
Max_OpenTable();
echo "<a href=\"".$admin_file.".php?op=cMaxSizeWebSpace\" onclick=\"NewsReadWindow(this.href,'cMaxSizeFolderAbuse','600','400','yes');return false;\"><img src=\"images/view.gif\" alt=\""._SHOW."\" title=\""._SHOW."\" border=\"0\" width=\"17\" height=\"17\" /> "._FOLDERABUSE."</a><br />";
Max_CloseTable();

echo "</td></tr><tr><td width=\"33%\"><br /><br />";*/

Max_OpenTable();
echo "<a href=\"".$admin_file.".php?op=cMaxSizeFolder&folder=abuse\" onclick=\"NewsReadWindow(this.href,'cMaxSizeFolderAbuse','500','150','yes');return false;\"><img src=\"images/view.gif\" alt=\""._SHOW."\" title=\""._SHOW."\" border=\"0\" width=\"17\" height=\"17\" /> "._FOLDERABUSE."</a><br />";
Max_CloseTable();

echo "</td></tr><tr><td width=\"33%\">";

Max_OpenTable();
echo "<a href=\"".$admin_file.".php?op=cMaxSizeFolder&folder=admin\" onclick=\"NewsReadWindow(this.href,'cMaxSizeFolderAdmin','500','150','yes');return false;\"><img src=\"images/view.gif\" alt=\""._SHOW."\" title=\""._SHOW."\" border=\"0\" width=\"17\" height=\"17\" /> "._FOLDERADMIN."</a><br />";
Max_CloseTable();

echo "</td></tr><tr><td width=\"33%\">";

Max_OpenTable();
echo "<a href=\"".$admin_file.".php?op=cMaxSizeFolder&folder=blocks\" onclick=\"NewsReadWindow(this.href,'cMaxSizeFolderBlocks','500','150','yes');return false;\"><img src=\"images/view.gif\" alt=\""._SHOW."\" title=\""._SHOW."\" border=\"0\" width=\"17\" height=\"17\" /> "._FOLDERBLOCKS."</a><br />";
Max_CloseTable();
echo "</td></tr><tr><td width=\"33%\">";

Max_OpenTable();
echo "<a href=\"".$admin_file.".php?op=cMaxSizeFolder&folder=images\" onclick=\"NewsReadWindow(this.href,'cMaxSizeFolderImages','500','150','yes');return false;\"><img src=\"images/view.gif\" alt=\""._SHOW."\" title=\""._SHOW."\" border=\"0\" width=\"17\" height=\"17\" /> "._FOLDERIMAGES."</a><br />";
Max_CloseTable();
echo "</td></tr><tr><td width=\"33%\">";

Max_OpenTable();
echo "<a href=\"".$admin_file.".php?op=cMaxSizeFolder&folder=includes\" onclick=\"NewsReadWindow(this.href,'cMaxSizeFolderIncludes','500','150','yes');return false;\"><img src=\"images/view.gif\" alt=\""._SHOW."\" title=\""._SHOW."\" border=\"0\" width=\"17\" height=\"17\" /> "._FOLDERINCLUDES."</a><br />";
Max_CloseTable();
echo "</td></tr><tr><td width=\"33%\">";

Max_OpenTable();
echo "<a href=\"".$admin_file.".php?op=cMaxSizeFolder&folder=kernel\" onclick=\"NewsReadWindow(this.href,'cMaxSizeFolderKernel','500','150','yes');return false;\"><img src=\"images/view.gif\" alt=\""._SHOW."\" title=\""._SHOW."\" border=\"0\" width=\"17\" height=\"17\" /> "._FOLDERKERNEL."</a><br />";
Max_CloseTable();

echo "</td></tr><tr><td width=\"33%\">";

Max_OpenTable();
echo "<a href=\"".$admin_file.".php?op=cMaxSizeFolder&folder=language\" onclick=\"NewsReadWindow(this.href,'cMaxSizeFolderLanguage','500','150','yes');return false;\"><img src=\"images/view.gif\" alt=\""._SHOW."\" title=\""._SHOW."\" border=\"0\" width=\"17\" height=\"17\" /> "._FOLDERLANGUAGE."</a><br />";
Max_CloseTable();

echo "</td></tr><tr><td width=\"33%\">";

Max_OpenTable();
echo "<a href=\"".$admin_file.".php?op=cMaxSizeFolder&folder=modules\" onclick=\"NewsReadWindow(this.href,'cMaxSizeFolderModules','500','150','yes');return false;\"><img src=\"images/view.gif\" alt=\""._SHOW."\" title=\""._SHOW."\" border=\"0\" width=\"17\" height=\"17\" /> "._FOLDERMODULES."</a><br />";
Max_CloseTable();

echo "</td></tr><tr><td width=\"33%\">";

Max_OpenTable();
echo "<a href=\"".$admin_file.".php?op=cMaxSizeFolder&folder=themes\" onclick=\"NewsReadWindow(this.href,'cMaxSizeFolderThemes','500','150','yes');return false;\"><img src=\"images/view.gif\" alt=\""._SHOW."\" title=\""._SHOW."\" border=\"0\" width=\"17\" height=\"17\" /> "._FOLDERTHEMES."</a><br />";
Max_CloseTable();

echo "</td><td width=\"33%\">"
    ."</td></table>";

// debug
$currentTabs->AddTab(""._DEBUG1."");

max_debug('1');


$currentTabs->AddTab("PHPInfo");
echo "Informations PHPInfo<br /><br />"
    ."<table border=\"1\" width=\"100%\"><tr><td width=\"30%\" valign=\"top\">"
    ."<a href=\"".$admin_file.".php?op=ViewPHPInfo&info=0\" onclick=\"NewsReadWindow(this.href,'ViewPHPInfo','800','600','yes');return false;\"><img src=\"images/view.gif\" alt=\""._SHOW."\" title=\""._SHOW."\" border=\"0\" width=\"17\" height=\"17\"> "._INFO_TOTAL."</a><br />"
    ."</td><td>"
    ."<a href=\"".$admin_file.".php?op=ViewPHPInfo&info=1\" onclick=\"NewsReadWindow(this.href,'ViewPHPInfo','800','600','yes');return false;\"><img src=\"images/view.gif\" alt=\""._SHOW."\" title=\""._SHOW."\" border=\"0\" width=\"17\" height=\"17\" /> "._INFO_GENERAL."</a><br />"
    ."<a href=\"".$admin_file.".php?op=ViewPHPInfo&info=4\" onclick=\"NewsReadWindow(this.href,'ViewPHPInfo','800','600','yes');return false;\"><img src=\"images/view.gif\" alt=\""._SHOW."\" title=\""._SHOW."\" border=\"0\" width=\"17\" height=\"17\" /> "._INFO_CONFIGURATION."</a><br />"
    ."<a href=\"".$admin_file.".php?op=ViewPHPInfo&info=8\" onclick=\"NewsReadWindow(this.href,'ViewPHPInfo','800','600','yes');return false;\"><img src=\"images/view.gif\" alt=\""._SHOW."\" title=\""._SHOW."\" border=\"0\" width=\"17\" height=\"17\" /> "._INFO_MODULES."</a><br />"
    ."<a href=\"".$admin_file.".php?op=ViewPHPInfo&info=16\" onclick=\"NewsReadWindow(this.href,'ViewPHPInfo','800','600','yes');return false;\"><img src=\"images/view.gif\" alt=\""._SHOW."\" title=\""._SHOW."\" border=\"0\" width=\"17\" height=\"17\"> "._INFO_ENVIRONMENT."</a><br />"
    ."<a href=\"".$admin_file.".php?op=ViewPHPInfo&info=32\" onclick=\"NewsReadWindow(this.href,'ViewPHPInfo','800','600','yes');return false;\"><img src=\"images/view.gif\" alt=\""._SHOW."\" title=\""._SHOW."\" border=\"0\" width=\"17\" height=\"17\" /> "._INFO_VARIABLES."</a><br />"
    ."<a href=\"".$admin_file.".php?op=ViewPHPInfo&info=64\" onclick=\"NewsReadWindow(this.href,'ViewPHPInfo','800','600','yes');return false;\"><img src=\"images/view.gif\" alt=\""._SHOW."\" title=\""._SHOW."\" border=\"0\" width=\"17\" height=\"17\" /> "._INFO_LICENCE."</a><br />"
    ."<a href=\"".$admin_file.".php?op=ViewPHPInfo&info=2\" onclick=\"NewsReadWindow(this.href,'ViewPHPInfo','800','600','yes');return false;\"><img src=\"images/view.gif\" alt=\""._SHOW."\" title=\""._SHOW."\" border=\"0\" width=\"17\" height=\"17\" /> "._INFO_CREDITS."</a><br />"
    ."</td></table>";


$currentTabs->AddTab(""._HELP."");
br('2');
echo ""._HELP1."";
$currentTabs->EndTabWindow();

incof();

}
}else {
	echo "Access Denied";
}