. */ 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(); ?>