0) { $title = "Tree Item [graph]"; }else{ $title = "Tree Item [graph]"; } print "
\n"; start_box("Tree Item", "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. Tree Item [header]"; }else{ $title = "Tree Item [header]"; } start_box($title, "98%", $colors["header"], "3", "center", ""); form_alternate_row_color($colors["form_alternate1"],$colors["form_alternate2"],0); ?> 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_save() { include_once("include/tree_functions.php"); if (empty($_POST["id"])) { /* new/save - generate new order key */ $order_key = get_next_tree_id(db_fetch_cell("select order_key from graph_tree_items where id=" . $_POST["parent_item_id"]),"graph_tree_items","order_key"); }else{ /* edit/save - use old order_key */ $order_key = db_fetch_cell("select order_key from graph_tree_items where id=" . $_POST["id"]); } $save["id"] = $_POST["id"]; $save["graph_tree_id"] = $_POST["graph_tree_id"]; $save["title"] = $_POST["title"]; $save["order_key"] = $order_key; $save["local_graph_id"] = $_POST["local_graph_id"]; $save["rra_id"] = $_POST["rra_id"]; if (sql_save($save, "graph_tree_items")) { raise_message(1); reparent_branch($_POST["parent_item_id"], $_POST["id"]); }else{ raise_message(2); header("Location: " . $_SERVER["HTTP_REFERER"]); exit; } } function item_remove() { include_once("include/tree_functions.php"); 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 item '" . db_fetch_cell("select title from graph_tree_items where id=" . $_GET["id"]) . "'?", getenv("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") == "") || ($_GET["confirm"] == "yes")) { delete_branch($_GET["id"]); } header("Location: tree.php?action=edit&id=" . $_GET["tree_id"]); exit; } /* --------------------- Tree Functions --------------------- */ function tree_save() { $save["id"] = $_POST["id"]; $save["name"] = $_POST["name"]; if (sql_save($save, "graph_tree")) { raise_message(1); }else{ raise_message(2); header("Location: " . $_SERVER["HTTP_REFERER"]); exit; } } function tree_remove() { global $config; 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 tree '" . db_fetch_cell("select name from graph_tree where id=" . $_GET["id"]) . "'?", getenv("HTTP_REFERER"), "tree.php?action=remove&id=" . $_GET["id"]); include ('include/bottom_footer.php'); exit; } if ((read_config_option("remove_verification") == "") || ($_GET["confirm"] == "yes")) { db_execute("delete from graph_tree where id=" . $_GET["id"]); } } function tree_edit() { include_once("include/tree_view_functions.php"); global $colors, $cdef_item_types; start_box("Trees [edit]", "98%", $colors["header"], "3", "center", ""); if (isset($_GET["id"])) { $tree = db_fetch_row("select * from graph_tree where id=" . $_GET["id"]); }else{ unset($tree); } ?>
Name
A useful name for this graph tree.
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"); if (sizeof($trees) > 0) { foreach ($trees as $tree) { form_alternate_row_color($colors["alternate"],$colors["light"],$i); $i++; ?> "> ">Delete