function utilities_view_tech() { global $colors, $config, $rrdtool_versions; /* Remove all cached settings, cause read of database */ kill_session_var("sess_config_array"); $tabs = array( "general" => __("General"), "database" => __("DB Info"), "process" => __("DB Processes"), "php" => __("PHP Info"), "i18n" => __("Languages") ); /* set the default settings category */ if (!isset($_REQUEST["tab"])) { /* there is no selected tab; select the first one */ $current_tab = array_keys($tabs); $current_tab = $current_tab[0]; }else{ $current_tab = $_REQUEST["tab"]; } /* draw the categories tabs on the top of the page */ print "<table width='100%' cellspacing='0' cellpadding='0' align='center'><tr>"; print "<td><div class='tabs'>"; if (sizeof($tabs) > 0) { foreach (array_keys($tabs) as $tab_short_name) { print "<div class='tabDefault'><a " . (($tab_short_name == $current_tab) ? "class='tabSelected'" : "class='tabDefault'") . " href='" . htmlspecialchars("utilities.php?action=view_tech&tab=$tab_short_name") . "'>$tabs[$tab_short_name]</a></div>"; } } print "</div></td></tr></table>"; if (!isset($_REQUEST["tab"])) { $_REQUEST["tab"] = "general"; } switch (get_request_var_request("tab")) { case "general": display_general(); break; case "database": display_database(); break; case "process": display_database_processes(); break; case "php": display_php(); break; case "i18n": display_languages(); default: break; } }
//--------------------------------------------------------------------------------------------- if ($Mode == 'Delete') { handle_delete($selected_id); } if ($Mode == 'ADD_ITEM' || $Mode == 'UPDATE_ITEM') { if (check_data() && handle_submit($selected_id)) { $Mode = 'RESET'; } } if ($id = find_submit('Update', false)) { install_language($id); } if (get_post('_CurDflt_update') || get_post('Refresh') && get_post('CurDflt', -1) != -1) { $new_lang = $installed_languages[get_post('CurDflt', 0)]['code']; if ($new_lang != $dflt_lang) { $dflt_lang = $new_lang; write_lang(); $Ajax->activate('lang_tbl'); } } if (get_post('_DisplayAll_update')) { $Ajax->activate('lang_tbl'); } //--------------------------------------------------------------------------------------------- if (isset($_GET['popup']) || get_post('Add') || $Mode == 'Edit' || $Mode == 'ADD_ITEM' || $Mode == 'UPDATE_ITEM') { display_language_edit($selected_id); } else { display_languages(); } //--------------------------------------------------------------------------------------------- end_page();