">
User Management $header_label", "98%", $colors["header"], "3", "center", ""); draw_user_form_select(); end_box(); } $header_label = "Graph Permissions [policy: " . (($graph_policy == "1") ? "ALLOW" : "DENY") . "]"; start_box($header_label, "98%", $colors["header"], "3", "center", ""); $graphs = db_fetch_assoc("select user_auth_graph.user_id, graph_templates_graph.local_graph_id, graph_templates_graph.title from graph_templates_graph left join user_auth_graph on (graph_templates_graph.local_graph_id=user_auth_graph.local_graph_id and user_auth_graph.user_id=" . (empty($_GET["id"]) ? "0" : $_GET["id"]) . ") where graph_templates_graph.local_graph_id > 0 order by graph_templates_graph.title"); ?>
0) { foreach ($graphs as $graph) { if ($graph["user_id"] == "") { $old_value = ""; }else{ $old_value = "on"; } $column1 = floor((sizeof($graphs) / 2) + (sizeof($graphs) % 2)); if ($i == $column1) { print ""; } form_base_checkbox("graph" . $graph["local_graph_id"], $old_value, $graph["title"], "", $_GET["id"], true); $i++; } } ?>
User Management $header_label", "98%", $colors["header"], "3", "center", ""); draw_user_form_select(); end_box(); } print "\n"; start_box("", "98%", $colors["header"], "3", "center", ""); if (sizeof($tabs_graphs) > 0) { foreach (array_keys($tabs_graphs) as $tab_short_name) { ?> "> Graph Settings [] 0) { foreach (array_keys($settings_graphs) as $setting) { /* make sure to skip group members here; only parents are allowed */ if (($settings_graphs[$setting]["method"] != "internal") && ($settings_graphs[$setting]["tab"] == $tab_short_name)) { form_alternate_row_color($colors["form_alternate1"],$colors["form_alternate2"],$i); /* draw the acual header and textbox on the form */ form_item_label($settings_graphs[$setting]["friendly_name"],$settings_graphs[$setting]["description"]); $current_value = db_fetch_cell("select value from settings_graphs where name='$setting' and user_id=" . $_GET["id"]); /* choose what kind of item this is */ switch ($settings_graphs[$setting]["method"]) { case 'textbox': form_text_box($setting,$current_value,$settings_graphs[$setting]["default"],""); break; case 'drop_sql': form_dropdown($setting,db_fetch_assoc($settings_graphs[$setting]["sql"]),"name","id",$current_value,"",$settings_graphs[$setting]["default"]); break; case 'drop_array': form_dropdown($setting,${$settings_graphs[$setting]["array_name"]},"","",$current_value,"",$settings_graphs[$setting]["default"]); break; } ++$i; print "\n"; } } } } } end_box(); form_hidden_id("user_id",$_GET["id"]); form_hidden_box("save_component_graph_config","1",""); form_save_button("user_admin.php"); } /* -------------------------- User Administration -------------------------- */ function user_remove() { if ((read_config_option("remove_verification") == "on") && ($_GET["confirm"] != "yes")) { include ('include/top_header.php'); form_confirm("Are You Sure?", "Are you sure you want to delete the user '" . db_fetch_cell("select username from user where id=" . $_GET["id"]) . "'?", getenv("HTTP_REFERER"), "user_admin.php?action=user_remove&id=" . $_GET["id"]); include ('include/bottom_footer.php'); exit; } if ((read_config_option("remove_verification") == "") || ($_GET["confirm"] == "yes")) { db_execute("delete from user where id=" . $_GET["id"]); db_execute("delete from user_auth_realm where user_id=" . $_GET["id"]); db_execute("delete from user_auth_hosts where user_id=" . $_GET["id"]); db_execute("delete from user_auth_graph where user_id=" . $_GET["id"]); db_execute("delete from user_auth_tree where user_id=" . $_GET["id"]); db_execute("delete from settings_graphs where user_id=" . $_GET["id"]); } } function user_edit() { global $colors; if (isset($_GET["id"])) { $user = db_fetch_row("select * from user where id=" . $_GET["id"]); $header_label = "[edit: " . $user["username"] . "]"; }else{ $header_label = "[new]"; } if (read_config_option("full_view_user_admin") == "") { start_box("User Management $header_label", "98%", $colors["header"], "3", "center", ""); draw_user_form_select(); end_box(); } start_box("User Management $header_label", "98%", $colors["header"], "3", "center", ""); ?> User Name
The login name for this user. Full Name
A more descriptive name for this user, that can include spaces or special characters. Password
Enter the password for this user twice. Remember that passwords are case sensitive!
Account Options
Set any user account-specific options here. Graph Options
Set any graph-specific options here. Default Policy
The default allow/deny graph policy for this user. "Allow", 2 => "Deny"); form_dropdown("graph_policy",$graph_policy,"","",$user["graph_policy"],"",""); ?> Login Options
What to do when this user logs in. Realm Permissions", "98%", $colors["header"], "3", "center", ""); $realms = db_fetch_assoc("select user_auth_realm.user_id, user_realm.id, user_realm.name from user_realm left join user_auth_realm on (user_realm.id=user_auth_realm.realm_id and user_auth_realm.user_id=" . (empty($_GET["id"]) ? "0" : $_GET["id"]) . ") order by user_realm.name"); ?>
0) { foreach ($realms as $realm) { if ($realm["user_id"] == "") { $old_value = ""; }else{ $old_value = "on"; } $column1 = floor((sizeof($realms) / 2) + (sizeof($realms) % 2)); if ($i == $column1) { print ""; } form_base_checkbox("section" . $realm["id"], $old_value, $realm["name"], "", $_GET["id"], true); $i++; } } ?>
User Management", "98%", $colors["header"], "3", "center", "user_admin.php?action=user_edit"); print ""; DrawMatrixHeaderItem("User Name",$colors["header_text"],1); DrawMatrixHeaderItem("Full Name",$colors["header_text"],1); DrawMatrixHeaderItem("Default Graph Policy",$colors["header_text"],2); print ""; $user_list = db_fetch_assoc("select id,username,full_name,graph_policy from user order by username"); if (sizeof($user_list) > 0) { foreach ($user_list as $user) { form_alternate_row_color($colors["alternate"],$colors["light"],$i); ?> "> ">Delete