compile_dir= '/var/spool/gosa/'; /* Check for compile directory */ if (!(is_dir($smarty->compile_dir) && is_writable($smarty->compile_dir))){ msg_dialog::display(_("Smarty"),sprintf(_("Directory '%s' specified as compile directory is not accessible!"), $smarty->compile_dir),FATAL_ERROR_DIALOG); exit(); } /* Get posted language */ if(!session::is_set('lang')){ session::set('lang',get_browser_language()); } if(isset($_POST['lang_selected'])){ if($_POST['lang_selected'] != ""){ session::set('lang',$_POST['lang_selected']); }else{ session::set('lang',get_browser_language()); } } /* Check for js */ if (!isset($_GET['js']) && !session::is_set('js')){ echo ''; session::set('js',FALSE); } elseif(isset($_GET['js'])) { session::set('js',TRUE); } $lang = session::get('lang'); /* Append .UTF-8 to language string if necessary */ if(!preg_match("/utf(-)8$/i",$lang)){ $lang .= ".UTF-8"; } putenv("LANGUAGE="); putenv("LANG=$lang"); setlocale(LC_ALL, $lang); $GLOBALS['t_language']= $lang; $GLOBALS['t_gettext_message_dir'] = $BASE_DIR.'/locale/'; /* Set the text domain as 'messages' */ $domain = 'messages'; bindtextdomain($domain, LOCALE_DIR); textdomain($domain); /* Call setup */ $display = ""; require_once("../setup/main.inc"); $smarty->assign("date", date("l, dS F Y H:i:s O")); $header= "".$smarty->fetch(get_template_path('setup_headers.tpl')); /* Set focus to the error button if we've an error message */ $focus= ""; if (session::is_set('errors') && session::get('errors') != ""){ $focus= ''; } $focus= ''; /* show web frontend */ $setup = session::get('setup'); $smarty->assign("contents" , $display); $smarty->assign("navigation", $setup->get_navigation_html()); $smarty->assign("header", $setup->get_header_html()); $smarty->assign("bottom", $focus.$setup->get_bottom_html()); $smarty->assign("msg_dialogs", msg_dialog::get_dialogs()); if ($error_collector != ""){ $smarty->assign("php_errors", preg_replace("/%BUGBODY%/",$error_collector_mailto,$error_collector).""); } else { $smarty->assign("php_errors", ""); } $smarty->assign("version",get_gosa_version()); echo $header.$smarty->fetch("../setup/setup_frame.tpl"); // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?>