<?php
mb_internal_encoding('UTF-8');
require_once('config.inc.php');
require_once('util.inc.php');
require_once('Setting.class.php');
Setting::Load();
date_default_timezone_set(TIMEZONE);
$dtz = new DateTimeZone(date_default_timezone_get());
$GLOBALS['time_diff'] = $dtz->getOffset(new DateTime('now', $dtz));
session_set_cookie_params(259200, BASE_URL);	//60*60*24*3
ini_set('session.gc_maxlifetime', 259200);
session_save_path(SESSION);
session_cache_expire(4320);
if (session_start()) {
	if (empty($_SESSION['uid'])) {
		$_SESSION['anonymous'] = TRUE;
		$_SESSION['trip'] = '';
		$_SESSION['expire'] = time() + 86400;	//60*60*24
	}
	$_SESSION['uid'] = generate_id();
}
load_auth();
?>