. * * @package phpservermon * @author Pepijn Over * @copyright Copyright (c) 2008-2014 Pepijn Over * @license http://www.gnu.org/licenses/gpl.txt GNU GPL v3 * @version Release: @package_version@ * @link http://phpservermon.neanderthal-technology.com/ **/ if(!file_exists('config.inc.php')) { die('Failed to locate config file. Please read docs/README for more information on how to setup PHP Server Monitor.'); } require_once 'config.inc.php'; sm_no_cache(); if(isset($_GET['action']) && $_GET['action'] == 'check') { require 'cron/status.cron.php'; header('Location: index.php'); } $type = (!isset($_GET['type'])) ? 'servers' : $_GET['type']; $allowed_types = array('servers', 'users', 'log', 'config'); // make sure user selected a valid type. if so, include the file and add to template if(!in_array($type, $allowed_types)) { $type = $allowed_types[0]; } eval('$mod = new mod'.ucfirst($type).'();'); // let the module prepare it's HTML code $mod->createHTML(); ?>