* @copyright (C) 2006 - 2012 Adam Armstrong * */ include("../includes/defaults.inc.php"); include("../config.php"); include_once("../includes/definitions.inc.php"); include("../includes/functions.php"); include("includes/functions.inc.php"); include('includes/plugins.inc.php'); Plugins::start(); // Check for install.inc.php if (!file_exists('../config.php') && $_SERVER['PATH_INFO'] != '/install.php') { // no config.php does so let's redirect to the install header('Location: /install.php'); exit; } $runtime_start = utime(); ob_start(); ini_set('allow_url_fopen', 0); ini_set('display_errors', 0); $_SERVER['PATH_INFO'] = (isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : $_SERVER['ORIG_PATH_INFO']); if (strpos($_SERVER['PATH_INFO'], "debug")) { $debug = "1"; ini_set('display_errors', 1); ini_set('display_startup_errors', 1); ini_set('log_errors', 1); ini_set('error_reporting', E_ALL); } else { $debug = FALSE; ini_set('display_errors', 0); ini_set('display_startup_errors', 0); ini_set('log_errors', 0); ini_set('error_reporting', 0); } foreach ($_GET as $key=>$get_var) { if (strstr($key, "opt")) { list($name, $value) = explode("|", $get_var); if (!isset($value)) { $value = "yes"; } $vars[$name] = $value; } } $segments = explode('/', trim($_SERVER['REQUEST_URI'], '/')); foreach ($segments as $pos => $segment) { $segment = urldecode($segment); if ($pos == "0") { $vars['page'] = $segment; } else { list($name, $value) = explode("=", $segment); if ($value == "" || !isset($value)) { $vars[$name] = yes; } else { $vars[$name] = $value; } } } foreach ($_GET as $name => $value) { $vars[$name] = $value; } foreach ($_POST as $name => $value) { $vars[$name] = $value; } include("includes/authenticate.inc.php"); if (strstr($_SERVER['REQUEST_URI'], 'widescreen=yes')) { $_SESSION['widescreen'] = 1; } if (strstr($_SERVER['REQUEST_URI'], 'widescreen=no')) { unset($_SESSION['widescreen']); } # Load the settings for Multi-Tenancy. if (isset($config['branding']) && is_array($config['branding'])) { if ($config['branding'][$_SERVER['SERVER_NAME']]) { foreach ($config['branding'][$_SERVER['SERVER_NAME']] as $confitem => $confval) { eval("\$config['" . $confitem . "'] = \$confval;"); } } else { foreach ($config['branding']['default'] as $confitem => $confval) { eval("\$config['" . $confitem . "'] = \$confval;"); } } } # page_title_prefix is displayed, unless page_title is set if ($config['page_title']) { $config['page_title_prefix'] = $config['page_title']; } ?> <?php echo($config['page_title_suffix']); ?> ' . "\n"); } ?> ' . "\n"); } ?>
 

"); print_r($_GET); print_r($vars); echo(""); } if ($_SESSION['authenticated']) { // Authenticated. Print a page. if (isset($vars['page']) && !strstr("..", $vars['page']) && is_file("pages/" . $vars['page'] . ".inc.php")) { include("pages/" . $vars['page'] . ".inc.php"); } else { if (isset($config['front_page']) && is_file($config['front_page'])) { include($config['front_page']); } else { include("pages/front/default.php"); } } } else { // Not Authenticated. Show status page if enabled if ( $config['public_status'] === true ) { if (isset($vars['page']) && strstr("login", $vars['page'])) { include("pages/logon.inc.php"); } else { echo '
'; include("pages/public.inc.php"); echo '
'; echo ''; } } else { include("pages/logon.inc.php"); } } ?>
MySQL: Cell '.($db_stats['fetchcell']+0).'/'.round($db_stats['fetchcell_sec']+0,3).'s'. ' Row '.($db_stats['fetchrow']+0). '/'.round($db_stats['fetchrow_sec']+0,3).'s'. ' Rows '.($db_stats['fetchrows']+0).'/'.round($db_stats['fetchrows_sec']+0,3).'s'. ' Column '.($db_stats['fetchcol']+0). '/'.round($db_stats['fetchcol_sec']+0,3).'s'); $fullsize = memory_get_usage(); unset($cache); $cachesize = $fullsize - memory_get_usage(); if ($cachesize < 0) { $cachesize = 0; } // Silly PHP! echo('
Cached data in memory is '.formatStorage($cachesize).'. Page memory usage is '.formatStorage($fullsize).', peaked at '. formatStorage(memory_get_peak_usage()) .'.'); echo('
Generated in ' . $gentime . ' seconds.'); } ?> \ndocument.title = '$title';\n"); } ?>