0) { $title_graph = "Tree Items [graph]"; } /* bold the active "type" */ if ($tree_item["title"] != "") { $title_header = "Tree Items [header]"; } } print "
\n"; start_box("Tree Items", "98%", $colors["header"], "3", "center", ""); form_alternate_row_color($colors["form_alternate1"],$colors["form_alternate2"],0); ?> Parent Item
Choose the parent for this header/graph. Graph
Choose a graph from this list to add it to the tree. Round Robin Archive
Choose a round robin archive to control how this graph is displayed. Header Title
If this item is a header, enter a title here. 0) { branch_up($order_key, 'graph_tree_items', 'order_key', ''); } } function item_movedown() { include_once('include/tree_functions.php'); $order_key = db_fetch_cell("SELECT order_key FROM graph_tree_items WHERE id=" . $_GET["tree_item_id"]); if ($order_key > 0) { branch_down($order_key, 'graph_tree_items', 'order_key', ''); } } function item_remove() { include_once("include/tree_functions.php"); if ((read_config_option("remove_verification") == "on") && (!isset($_GET["confirm"]))) { $graph_tree_item = db_fetch_row("select title,local_graph_id from graph_tree_items where id=" . $_GET["id"]); if (empty($graph_tree_item["local_graph_id"])) { $text = "Are you sure you want to delete the header item '" . $graph_tree_item["title"] . "'?"; }else{ $text = "Are you sure you want to delete the graph item '" . db_fetch_cell("select title from graph_templates_graph where local_graph_id=" . $graph_tree_item["local_graph_id"]) . "'?"; } include ('include/top_header.php'); form_confirm("Are You Sure?", $text, $_SERVER["HTTP_REFERER"], "tree.php?action=item_remove&id=" . $_GET["id"] . "&tree_id=" . $_GET["tree_id"]); include ('include/bottom_footer.php'); exit; } if ((read_config_option("remove_verification") == "") || (isset($_GET["confirm"]))) { delete_branch($_GET["id"]); } header("Location: tree.php?action=edit&id=" . $_GET["tree_id"]); exit; } /* --------------------- Tree Functions --------------------- */ function tree_remove() { if ((read_config_option("remove_verification") == "on") && (!isset($_GET["confirm"]))) { include ('include/top_header.php'); form_confirm("Are You Sure?", "Are you sure you want to delete the tree '" . db_fetch_cell("select name from graph_tree where id=" . $_GET["id"]) . "'?", $_SERVER["HTTP_REFERER"], "tree.php?action=remove&id=" . $_GET["id"]); include ('include/bottom_footer.php'); exit; } if ((read_config_option("remove_verification") == "") || (isset($_GET["confirm"]))) { db_execute("delete from graph_tree where id=" . $_GET["id"]); db_execute("delete from graph_tree_items where graph_tree_id=" . $_GET["id"]); } } function tree_edit() { include_once("include/tree_view_functions.php"); global $colors; if (!empty($_GET["id"])) { $tree = db_fetch_row("select * from graph_tree where id=" . $_GET["id"]); $header_label = "[edit: " . $tree["name"] . "]"; }else{ $header_label = "[new]"; } start_box("Graph Trees $header_label", "98%", $colors["header"], "3", "center", ""); ?> Name
A useful name for this graph tree. Tree Items", "98%", $colors["header"], "3", "center", "tree.php?action=item_edit&tree_id=" . $tree["id"] . "&parent_id=0"); grow_edit_graph_tree($_GET["id"], "", ""); end_box(); } form_hidden_box("save_component_tree","1",""); form_save_button("tree.php"); } function tree() { global $colors; start_box("Graph Trees", "98%", $colors["header"], "3", "center", "tree.php?action=edit"); print ""; DrawMatrixHeaderItem("Name",$colors["header_text"],1); DrawMatrixHeaderItem(" ",$colors["header_text"],1); print ""; $trees = db_fetch_assoc("select * from graph_tree order by name"); $i = 0; if (sizeof($trees) > 0) { foreach ($trees as $tree) { form_alternate_row_color($colors["alternate"],$colors["light"],$i); $i++; ?> "> ">Delete  No Graphs Trees\n"; } end_box(); } ?>