* @link https://github.com/loadavg/loadavg * @author Karsten Becker * @copyright 2014 Sputnik7 * * This file is licensed under the Affero General Public License version 3 or * later. */ ?> <?php /* * Security wrapper for private pages * */ if (!$loadavg->isLoggedIn() && !LoadAvg::checkInstall()) { include 'login.php'; } else { ?> <?php //run this code if the settings have been changed or updated if (isset($_POST['update_settings'])) { //get current settings $settings = LoadAvg::$_settings->general; //need to check all modules status first //as form drops unchecked values when posted for some reason $modules = LoadPlugins::$_plugins; foreach ($plugins as $plugin => $pluginName) { $_POST['formsettings']['plugins'][$plugin] = !isset($_POST['formsettings']['plugins'][$plugin]) ? "false" : "true"; }
$plugins = LoadPlugins::$_settings->general['plugins']; //var_dump ($plugins); if (DEBUG) { $loadavg->memoryDebugData($memory_usage); } //draw the header require_once APP_PATH . '/layout/header.php'; /* * check for successful installation */ //check if installation is complete passed over by installer if (isset($_GET['check'])) { $loadavg->cleanUpInstaller(); } else { //check installation has been cleaned up for security reasons $loadavg->checkInstall(); } /* * start polling time to generate charts */ $timer->setStartTime(); // Setting page load start time /* * draw the current page view */ //grab the log diretory - needs to be dynamic really //as this is also set in settings.ini.php !!! $logdir = LOG_PATH; //check to see if ip is banned before going on $banned = false; $flooding = false;