function draw_tabs() { html_tab_start(); html_tab_draw("CDEFs", "presets.php?action=view_cdef", ((($_REQUEST["action"] == "") || ($_REQUEST["action"] == "view_cdef")) ? true : false)); html_tab_draw("Colors", "presets.php?action=view_color", (($_REQUEST["action"] == "view_color") ? true : false)); html_tab_draw("GPRINTs", "presets.php?action=view_gprint", (($_REQUEST["action"] == "view_gprint") ? true : false)); html_tab_draw("RRAs", "presets.php?action=view_rra", (($_REQUEST["action"] == "view_rra") ? true : false)); html_tab_end(); }
function user_edit() { global $colors, $fields_user_user_edit_host; if (!empty($_GET["id"])) { $user = api_user_info(array( "id" => $_GET["id"])); $header_label = _("[edit: ") . $user["username"] . "]"; }else{ $header_label = _("[new]"); } html_start_box("<strong>" . _("User Management") . "</strong> $header_label", "98%", $colors["header_background"], "3", "center", ""); draw_edit_form(array( "config" => array("form_name" => "chk"), "fields" => inject_form_variables($fields_user_user_edit_host, (isset($user) ? $user : array())) )); html_end_box(); if (!empty($_GET["id"])) { /* draw user admin nav tabs */ html_tab_start(); html_tab_draw(_("Realm Permissions"), "user_admin.php?action=user_realms_edit&id=" . $_GET["id"], ((($_REQUEST["action"] == "user_realms_edit") || ($_REQUEST["action"] == "user_edit")) ? true : false)); html_tab_draw(_("Graph Permissions"), "user_admin.php?action=graph_perms_edit&id=" . $_GET["id"], (($_REQUEST["action"] == "graph_perms_edit") ? true : false)); html_tab_draw(_("Graph Settings"), "user_admin.php?action=graph_settings_edit&id=" . $_GET["id"], (($_REQUEST["action"] == "graph_settings_edit") ? true : false)); html_tab_end(); } if ($_GET["action"] == "graph_settings_edit") { graph_settings_edit(); }elseif ($_GET["action"] == "user_realms_edit") { user_realms_edit(); }elseif ($_GET["action"] == "graph_perms_edit") { graph_perms_edit(); }else{ user_realms_edit(); } form_hidden_box("last_action", $_GET["action"], ""); form_save_button("user_admin.php"); }