* { margin: 0; padding: 0; }
body { padding: 1em; font-family: sans-serif; }
Error happened
';
if (ALTERNZ_SHOW_ERRORS)
{
echo '
In '.$err_src.' at line '.$err_line.'.
';
echo '
'.utf8_decode($err_msg).'
';
if (!empty($GLOBALS['_debug_log']))
{
echo '
';
print_r($GLOBALS['_debug_log']);
echo '
';
}
}
echo '
';
if (ALTERNZ_REPORT_ERRORS)
{
@mail(ALTERNZ_REPORT_ERRORS, 'alternZ Error', 'Error in '.$err_src.' at line '.$err_line."\n\nMessage:\n".$err_msg);
}
exit;
}
define('ENABLE_DEBUG', true);
set_error_handler('alternz_error_handler');
if (!file_exists('config.local.php'))
die('You should copy config.inc.php to config.local.php and edit it to meet your needs.');
require_once('config.local.php');
require_once('class.mysql.php');
DB::setConfig(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD, MYSQL_BASE);
require_once SMARTY_DIR . 'Smarty.class.php';
$tpl = new Smarty();
$tpl->template_dir = 'templates/';
$tpl->compile_dir = 'cache/';
$tpl->caching = 0;
$tpl->compile_check = true;
function loadClass($class)
{
$file = 'class.'.$class.'.php';
if (!in_array($file, get_included_files()))
require_once($file);
}
if (!defined('LOGIN_PROCESS'))
{
loadClass('users');
$users = new Users();
if (!$users->isLogged())
{
header('location: ./login.php');
exit;
}
if (MYDNS_MYSQL_DATABASE != '')
{
loadClass('domains');
$tpl->assign('domains_list', Domains::getList());
}
$tpl->assign('user', Users::getVars());
}
?>