<?php /** * LoadAvg - Server Monitoring & Analytics * http://www.loadavg.com * * logout module interface * * @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 LoadAvg::logOut(); header('Location: index.php');
$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; if (isset($settings['ban_ip']) && $settings['ban_ip'] == "true") { $banned = $loadavg->checkIpBan(); if ($banned) { //clean up session $loadavg->logOut(); } } //used for remember me at login time //if no session exists check for cookies if ((!isset($_SESSION['logged_in']) || $_SESSION['logged_in'] == false) && $banned == false) { //if cookies are here and match log them in if ($loadavg->checkCookies()) { $_SESSION['logged_in'] = true; header("Location: /index.php"); } } //first lets see if a name has been set... $pageName = ""; //security check for all access if (isset($settings['settings']['allow_anyone']) && $settings['settings']['allow_anyone'] == "false" && !$loadavg->isLoggedIn() || $banned == true) {