File size: 1.35Kb
<?php
define('DEBUG', false);
session_start();
@set_magic_quotes_runtime(0);
mt_srand((double)microtime() * 10000);
@ini_set('session.referer_check', '');
@ini_set('session.use_cookies', '0');
@ini_set('session.use_only_cookies', '0');
error_reporting(DEBUG ? E_ALL : E_ALL & ~E_NOTICE);
assert_options(ASSERT_WARNING, DEBUG ? 1 : 0);
session_name('sid');
include('smarty/Smarty.class.php');
$smarty = new Smarty;
require('db.php');
$_prefs = mysql_fetch_array(mysql_query("SELECT * FROM _prefs LIMIT 1"));
require('lng/'.$_prefs['language'].'.lang.php');
require('function.php');
$smarty->assign('_title', htmlentities($_prefs['title']));
$smarty->assign('selfurl', $_prefs['selfurl']);
$smarty->assign('charset', $_prefs['charset']);
$smarty->assign('css', 'template/m/default.css');
$smarty->assign('img', $_prefs['selfurl'].'template/m/images/');
$smarty->assign('sid', chklog());
$ses = getses(chklog());
$smarty->assign('UnreadCount', GetUnreadCount());
$info = getuserses($ses['userid']);
if($info > 0)
{
$smarty->assign('userlog', $info);
}
$smarty->template_dir = 'template/';
$smarty->compile_dir = 'template_c/';
@session_save_path($_prefs['selfurl'].'temp/session/');
$smarty->register->templateFunction('lng', 'Lang');
$smarty->register->templateFunction('pagenav', 'PageNav');
?>