compile_dir= '/var/spool/gosa/'; /* Check for compile directory */ if (!(is_dir($smarty->compile_dir) && is_writable($smarty->compile_dir))){ echo sprintf(_("Directory '%s' specified as compile directory is not accessible!"), $smarty->compile_dir); exit(); } /* Get posted language */ if(!isset($_SESSION['lang'])){ $_SESSION['lang'] = get_browser_language(); } if(isset($_POST['lang_selected'])){ if($_POST['lang_selected'] != ""){ $_SESSION['lang'] = $_POST['lang_selected']; }else{ $_SESSION['lang'] = get_browser_language(); } } /* Check for js */ if (!isset($_GET['js']) && !isset($_SESSION['js'])){ echo ''; $_SESSION['js']= FALSE; } elseif(isset($_GET['js'])) { $_SESSION['js']= TRUE; } $lang = $_SESSION['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, "$BASE_DIR/locale"); textdomain($domain); /* Call setup */ $display = ""; require_once("../setup/main.inc"); /* Print_out last ErrorMessage repeated string. */ print_red(NULL); $smarty->assign("date", date("l, dS F Y H:i:s O")); $header= "".$smarty->fetch(get_template_path('setup_headers.tpl')); /* show web frontend */ $smarty->assign("contents" , $display); $smarty->assign("navigation", $_SESSION['setup']->get_navigation_html()); $smarty->assign("header", $_SESSION['setup']->get_header_html()); $smarty->assign("bottom", $_SESSION['setup']->get_bottom_html()); if ($error_collector != ""){ $smarty->assign("php_errors", preg_replace("/%BUGBODY%/",$error_collector_mailto,$error_collector).""); } else { $smarty->assign("php_errors", ""); } if (isset($_SESSION['errors'])){ $smarty->assign("errors", $_SESSION['errors']); }else{ $smarty->assign("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: ?>