+/*
+ Uncomment the setting below when using FA on shared hosting
+ to avoid unexpeced session timeouts.
+ Make sure this directory exists and is writable!
+*/
+//ini_set('session.save_path', dirname(__FILE__).'/../tmp/');
+
+ini_set('session.gc_maxlifetime', 36000); // 10hrs
+
+session_name('FA'.md5(dirname(__FILE__)));
+//include_once($path_to_root.'/modules/www_statistics/includes/db_sessions.inc');
+session_start();
+
+// this is to fix the "back-do-you-want-to-refresh" issue - thanx PHPFreaks
+header("Cache-control: private");
+
+include_once($path_to_root . "/config.php");
+get_text_init();
+
+// Page Initialisation
+if (!isset($_SESSION['language']) || !method_exists($_SESSION['language'], 'set_language'))
+{
+ $l = array_search_value($dflt_lang, $installed_languages, 'code');
+ $_SESSION['language'] = new language($l['name'], $l['code'], $l['encoding'],
+ (isset($l['rtl']) && $l['rtl'] === true) ? 'rtl' : 'ltr');
+}
+
+$_SESSION['language']->set_language($_SESSION['language']->code);
+
+include_once($path_to_root . "/includes/hooks.inc");
+
+$Hooks = array();
+// include current langauge related $Hooks object if locale file exists
+if (file_exists($path_to_root . "/lang/".$_SESSION['language']->code."/locale.inc"))
+{
+ include_once($path_to_root . "/lang/".$_SESSION['language']->code."/locale.inc");
+ $code = $_SESSION['language']->code;
+ $hook_class = 'hooks_'.$code;
+ $Hooks[$code] = new $hook_class;
+ unset($code, $hook_class);
+}
+
+include_once($path_to_root . "/includes/access_levels.inc");
+include_once($path_to_root . "/version.php");
+include_once($path_to_root . "/includes/main.inc");
+
+// Ajax communication object
+$Ajax = new Ajax();