";
}
print "";
if ($disable_controls == false) { print ""; }
print "Item # " . ($i+1) . "";
if ($disable_controls == false) { print ""; }
print " | \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)", $_graph_type_name):
$matrix_title = "HRULE: " . $item["value"];
break;
case ereg("(VRULE)", $_graph_type_name):
$matrix_title = "VRULE: " . $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";
if ($disable_controls == false) {
print "
 | \n";
print " | \n";
}
print "
";
$i++;
}
}else{
print "\n";
/* loop through each header */
while (list($header_name, $header_array) = each($user_menu)) {
/* pass 1: see if we are allowed to view any children */
$show_header_items = false;
while (list($item_url, $item_title) = each($header_array)) {
$current_realm_id = (isset($user_auth_realm_filenames{basename($item_url)}) ? $user_auth_realm_filenames{basename($item_url)} : 0);
if ((isset($user_realms[$current_realm_id])) || (!isset($user_auth_realm_filenames{basename($item_url)}))) {
$show_header_items = true;
}
}
reset($header_array);
if ($show_header_items == true) {
print " \n";
}
/* pass 2: loop through each top level item and render it */
while (list($item_url, $item_title) = each($header_array)) {
$current_realm_id = (isset($user_auth_realm_filenames{basename($item_url)}) ? $user_auth_realm_filenames{basename($item_url)} : 0);
/* if this item is an array, then it contains sub-items. if not, is just
the title string and needs to be displayed */
if (is_array($item_title)) {
$i = 0;
if ((isset($user_realms[$current_realm_id])) || (!isset($user_auth_realm_filenames{basename($item_url)}))) {
/* if the current page exists in the sub-items array, draw each sub-item */
if (array_key_exists(basename($_SERVER["PHP_SELF"]), $item_title) == true) {
$draw_sub_items = true;
}else{
$draw_sub_items = false;
}
while (list($item_sub_url, $item_sub_title) = each($item_title)) {
$item_sub_url = $config['url_path'] . $item_sub_url;
/* indent sub-items */
if ($i > 0) {
$prepend_string = "--- ";
}else{
$prepend_string = "";
}
/* do not put a line between each sub-item */
if (($i == 0) || ($draw_sub_items == false)) {
$background = $config['url_path'] . "images/menu_line.gif";
}else{
$background = "";
}
/* draw all of the sub-items as selected for ui grouping reasons. we can use the 'bold'
or 'not bold' to distinguish which sub-item is actually selected */
if ((basename($_SERVER["PHP_SELF"]) == basename($item_sub_url)) || ($draw_sub_items)) {
$td_class = "textMenuItemSelected";
}else{
$td_class = "textMenuItem";
}
/* always draw the first item (parent), only draw the children if we are viewing a page
that is contained in the sub-items array */
if (($i == 0) || ($draw_sub_items)) {
if (basename($_SERVER["PHP_SELF"]) == basename($item_sub_url)) {
print "$prepend_string$item_sub_title | \n";
}else{
print "$prepend_string$item_sub_title | \n";
}
}
$i++;
}
}
}else{
if ((isset($user_realms[$current_realm_id])) || (!isset($user_auth_realm_filenames{basename($item_url)}))) {
/* draw normal (non sub-item) menu item */
$item_url = $config['url_path'] . $item_url;
if (basename($_SERVER["PHP_SELF"]) == basename($item_url)) {
print " \n";
}else{
print " \n";
}
}
}
}
}
print " \n";
print " |
";
}
/* draw_actions_dropdown - draws a table the allows the user to select an action to perform
on one or more data elements
@arg $actions_array - an array that contains a list of possible actions. this array should
be compatible with the form_dropdown() function */
function draw_actions_dropdown($actions_array) {
global $config;
?>