function LayoutDefault($content = array()) { $this->pagecontent = $content; $this->fpdb =& new FPDB(); $GLOBALS['fpdb'] =& $this->fpdb; $this->fp_widgets =& new widget_indexer(); $GLOBALS['fp_widgets'] =& $this->fp_widgets; $this->smarty =& $GLOBALS['_FP_SMARTY']; $GLOBALS['fp_config'] =& $this->config; $this->config = $GLOBALS['fp_config']['general']; $this->theme = theme_loadsettings(); $GLOBALS['theme'] =& $this->theme; $this->lang = lang_load(); $GLOBALS['lang'] =& $this->lang; // user_loggedin() or sess_setup(); plugin_loadall(); // init smarty $this->smarty->compile_dir = CACHE_DIR; $this->smarty->cache_dir = SMARTY_DIR . 'cache/'; $this->smarty->caching = 0; do_action('init'); }
function system_init() { system_sanitizequery(); system_unregister_globals(); system_prepare_iis(); $GLOBALS['fpdb'] = new FPDB(); $GLOBALS['fp_widgets'] = new widget_indexer(); $GLOBALS['smarty'] =& $GLOBALS['_FP_SMARTY']; $smarty =& $GLOBALS['smarty']; $GLOBALS['fp_config'] = config_load(); cookie_setup(); sess_setup(); user_loggedin(); ob_start(); $GLOBALS['theme'] = theme_loadsettings(); $GLOBALS['lang'] = lang_load(); plugin_loadall(); // init smarty $smarty->compile_dir = CACHE_DIR; $smarty->cache_dir = SMARTY_DIR . 'cache/'; $smarty->caching = 0; do_action('init'); ob_end_clean(); }