ERROR: '.$errstr."
\n";
echo ' Fatal error in line '.$errline.' of file '.$errfile;
echo ', PHP '.PHP_VERSION.' ('.PHP_OS.')
Backtrace '.$bt.'
'."\n";
die();
break;
case E_USER_WARNING:
case E_WARNING:
echo '\n";
break;
case E_USER_NOTICE:
case E_NOTICE:
echo '\n";
break;
case E_STRICT:
break;
default:
echo 'Unkown error type: ['.$errno.'] '.$errstr.'
Backtrace '.$bt.'
'."
\n";
}
}
if (isset($GLOBALS['debug']) && $GLOBALS['debug'] == true) {
set_error_handler('my_error_handler');
}
$Lang = 'en';
if (isset($GLOBALS['currentLanguage'])) {
$Lang = $GLOBALS['currentLanguage'];
}
define('AKB_WL_LANG_FILE', dirname(__FILE__).'/../includes/language/'.$Lang.'/whitelabel.ini');
define('AKB_LANG_FILE', dirname(__FILE__).'/../includes/language/'.$Lang.'/back_language.ini');
define('AKB_TPL_LOAD_PATH', dirname(__FILE__).'/templates/');
define('AKB_TPL_PHP_PATH', dirname(__FILE__).'/includes/display/');
define('AKB_TPL_HTTP_PATH', $GLOBALS['pathToKB'].'/admin/templates/');
define('AKB_TPL_IMAGE_PATH', AKB_TPL_HTTP_PATH.'Images');
define('AKB_PANEL_LOAD_PATH', AKB_TPL_LOAD_PATH.'Panels/');
define('AKB_SNIPPET_LOAD_PATH', AKB_TPL_LOAD_PATH.'Snippets/');
define('CLASS_DIR', dirname(__FILE__).'/includes/classes');
require(dirname(__FILE__).'/../lib/email.php');
require_once(dirname(__FILE__).'/../lib/multibyte.php');
require(dirname(__FILE__).'/includes/helpers/helper.template.php');
$GLOBALS['SNIPPETS'] = '';
$GLOBALS['Message'] = '';
$GLOBALS['HidePanels'] = array();
if (!class_exists('AKB_HELPER')) {
require(CLASS_DIR.'/class.helper.php');
}
require(CLASS_DIR.'/class.category.php');
require(CLASS_DIR.'/class.fileindex.php');
require(CLASS_DIR.'/class.news.php');
require(CLASS_DIR.'/class.template.php');
require(CLASS_DIR.'/class.auth.php');
require(CLASS_DIR.'/class.install.php');
require(CLASS_DIR.'/class.engine.php');
require(CLASS_DIR.'/class.admintable.php');
require(CLASS_DIR.'/class.customfields.php');
$GLOBALS['e'] = ucwords(strtolower(AKB_HELPER::get1n()));
$GLOBALS['AKB_CLASS_FILEINDEX'] = new AKB_FILEINDEX();
$GLOBALS['AKB_CLASS_HELPER'] = new AKB_HELPER();
$GLOBALS['AKB_CLASS_CATEGORY'] = new AKB_CATEGORY();
$GLOBALS['AKB_CLASS_NEWS'] = new AKB_NEWS();
$GLOBALS['AKB_CLASS_CUSTOMFIELDS'] = new AKB_CUSTOMFIELDS();
$GLOBALS['AKB_CLASS_TEMPLATE'] = new AKB_TEMPLATE();
$GLOBALS['AKB_CLASS_AUTH'] = new AKB_AUTH();
$GLOBALS['AKB_CLASS_INSTALL'] = new AKB_INSTALL();
$GLOBALS['AKB_CLASS_ENGINE'] = new AKB_ENGINE();
if (!pageLoad()) {
$_GET['sessionloggedout'] = true;
$GLOBALS['AKB_CLASS_AUTH']->DoLogin();
die();
}
$GLOBALS['AKB_CLASS_ENGINE']->HandlePage();
$end_time = microtime_float();
if (isset($GLOBALS['debug']) && $GLOBALS['debug'] == true) {
if (function_exists('memory_get_usage')) {
$mem_used = memory_get_usage()/1024/1024;
} else {
$mem_used = 0;
}
printf('Time taken to generate the page %.4f seconds and performed %d sql queries and used %.4f MB of memory
', ($end_time - $start_time), $GLOBALS['AKB_DB']->NumQueries, $mem_used);
}
?>