">
Graph Template Management $header_label", "98%", $colors["header"], "3", "center", "");
draw_graph_form_select("?action=item&id=" . $_GET["id"]);
end_box();
}
start_box("Graph Template Items $header_label", "98%", $colors["header"], "3", "center", "graph_templates.php?action=item_edit&graph_template_id=" . $_GET["id"]);
print "";
DrawMatrixHeaderItem("Graph Item",$colors["header_text"],1);
DrawMatrixHeaderItem("Task Name",$colors["header_text"],1);
DrawMatrixHeaderItem("Graph Item Type",$colors["header_text"],1);
DrawMatrixHeaderItem("CF Type",$colors["header_text"],1);
DrawMatrixHeaderItem("Item Color",$colors["header_text"],4);
print "
";
$group_counter = 0; $_graph_type_name = ""; $i = 0;
$alternate_color_1 = $colors["alternate"]; $alternate_color_2 = $colors["alternate"];
if (sizeof($template_item_list) > 0) {
foreach ($template_item_list as $item) {
$this_row_style = ""; $use_custom_row_color = false; $hard_return = "";
if ($graph_item_types{$item["graph_type_id"]} != "GPRINT") {
$this_row_style = "font-weight: bold;"; $use_custom_row_color = true;
if ($group_counter % 2 == 0) {
$alternate_color_1 = "EEEEEE";
$alternate_color_2 = "EEEEEE";
$custom_row_color = "D5D5D5";
}else{
$alternate_color_1 = $colors["alternate"];
$alternate_color_2 = $colors["alternate"];
$custom_row_color = "D2D6E7";
}
$group_counter++;
}
$_graph_type_name = $graph_item_types{$item["graph_type_id"]};
if ($use_custom_row_color == false) {
form_alternate_row_color($alternate_color_1,$alternate_color_2,$i);
}else{
print "";
}
print "| Item # " . ($i+1) . " | \n";
if (empty($item["data_source_name"])) { $item["data_source_name"] = "No Task"; }
switch (true) {
case ereg("(AREA|STACK|GPRINT|LINE[123])", $_graph_type_name):
$matrix_title = "(" . $item["data_source_name"] . "): " . $item["text_format"];
break;
case ereg("(HRULE|VRULE)", $_graph_type_name):
$matrix_title = "HRULE: " . $item["value"];
break;
case ereg("(COMMENT)", $_graph_type_name):
$matrix_title = "COMMENT: " . $item["text_format"];
break;
}
if ($item["hard_return"] == "on") {
$hard_return = "<HR>";
}
print "" . htmlspecialchars($matrix_title) . $hard_return . " | \n";
print "" . $graph_item_types{$item["graph_type_id"]} . " | \n";
print "" . $consolidation_functions{$item["consolidation_function_id"]} . " | \n";
print " | \n";
print "" . $item["hex"] . " | \n";
print "
 | \n";
print " | \n";
print "
";
$i++;
}
}else{
print "| No Items |
";
}
end_box();
start_box("Graph Item Inputs", "98%", $colors["header"], "3", "center", "graph_templates.php?action=input_edit&graph_template_id=" . $_GET["id"]);
print "";
DrawMatrixHeaderItem("Name",$colors["header_text"],2);
print "
";
$template_item_list = db_fetch_assoc("select id,name from graph_template_input where graph_template_id=" . $_GET["id"] . " order by name");
if (sizeof($template_item_list) > 0) {
foreach ($template_item_list as $item) {
form_alternate_row_color($colors["alternate"],$colors["light"],$i);
?>
&graph_template_id=">
|
&graph_template_id=">
|
No Inputs | ";
}
end_box();
}
function item_remove() {
db_execute("delete from graph_templates_item where id=" . $_GET["id"]);
}
function item_edit() {
global $colors, $struct_graph_item, $graph_item_types, $consolidation_functions;
$header_label = "[edit graph: " . db_fetch_cell("select name from graph_templates where id=" . $_GET["graph_template_id"]) . "]";
if (read_config_option("full_view_graph_template") == "") {
start_box("Graph Template Management $header_label", "98%", $colors["header"], "3", "center", "");
draw_graph_form_select("?action=item&id=" . $_GET["id"]);
end_box();
}
start_box("Graph Template Items $header_label", "98%", $colors["header"], "3", "center", "");
if (!empty($_GET["id"])) {
$template_item = db_fetch_row("select * from graph_templates_item where id=" . $_GET["id"]);
}
print "