diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index e7a5c2691b..d3b357227a 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -9,6 +9,12 @@ * godmode/reporting/*builder.php: Added code to show text if no reporting defined. + + * operation/reporting/*.php: Added code to show text + if no reporting defined. + + * operation/menu.php: Added code to highlight custom reporting + if selected. 2007-06-21 Sancho Lerena diff --git a/pandora_console/godmode/reporting/map_builder.php b/pandora_console/godmode/reporting/map_builder.php index 097c0eb83d..4618f29ef3 100644 --- a/pandora_console/godmode/reporting/map_builder.php +++ b/pandora_console/godmode/reporting/map_builder.php @@ -227,9 +227,9 @@ if ($createmode==2 OR isset($_GET["id"]) OR (isset($_POST["id_map"]))) { echo ""; echo ""; echo "'; echo "'; echo ""; echo "
"; echo $lang_label["report_name"]; - echo ""; + echo ""; echo ""; - + echo "
"; echo $lang_label["background"]; echo ""; @@ -237,14 +237,14 @@ if ($createmode==2 OR isset($_GET["id"]) OR (isset($_POST["id_map"]))) { echo ''; + echo '
"; echo $lang_label["width"]; @@ -273,7 +273,7 @@ if ($createmode==2 OR isset($_GET["id"]) OR (isset($_POST["id_map"]))) { echo "

".$lang_label["map_item_add"]; ?> - + "; echo "

"; @@ -298,7 +298,7 @@ if ($createmode==2 OR isset($_GET["id"]) OR (isset($_POST["id_map"]))) { if ( $id_agent != $row["id_agente"]) echo ""; } - echo ''; + echo '
"; @@ -310,7 +310,8 @@ if ($createmode==2 OR isset($_GET["id"]) OR (isset($_POST["id_map"]))) { echo ""; if (isset($id_agent)) echo ""; - + + echo "
"; echo "".$lang_label["modules"].""; echo ""; diff --git a/pandora_console/operation/menu.php b/pandora_console/operation/menu.php index 7b7951ee91..ae63ead936 100644 --- a/pandora_console/operation/menu.php +++ b/pandora_console/operation/menu.php @@ -258,7 +258,9 @@ if (give_acl($_SESSION["id_usuario"], 0, "AR")==1) { // Custom reporting if (isset($_GET["sec"]) && $_GET["sec"] == "reporting"){ - if (isset($_GET["sec2"]) && $_GET["sec2"] == "operation/reporting/custom_reporting"){ + if (isset($_GET["sec2"]) && $_GET["sec2"] == + "operation/reporting/custom_reporting" || $_GET["sec2"] == + "operation/reporting/reporting_viewer"){ echo "
"; } else { echo "
"; diff --git a/pandora_console/operation/reporting/custom_reporting.php b/pandora_console/operation/reporting/custom_reporting.php index bf7c12f401..6a506e4104 100644 --- a/pandora_console/operation/reporting/custom_reporting.php +++ b/pandora_console/operation/reporting/custom_reporting.php @@ -31,18 +31,22 @@ if (comprueba_login() != 0) { echo "

".$lang_label["reporting"]." > "; echo $lang_label["custom_reporting"]."

"; -echo ""; -echo " - - -"; + $color=1; $sql="SELECT * FROM treport"; $res=mysql_query($sql); -while ($row = mysql_fetch_array($res)){ - if (($row["private"]==0) || ($row["id_user"] == $id_user)){ - // Calculate table line color - if ($color == 1){ +if (mysql_num_rows($res)) { + echo "
".$lang_label["report_name"]."".$lang_label["description"]."".$lang_label["view"]."
"; + echo " + + + + "; + + while ($row = mysql_fetch_array($res)){ + if (($row["private"]==0) || ($row["id_user"] == $id_user)){ + // Calculate table line color + if ($color == 1){ $tdcolor = "datos"; $color = 0; } @@ -58,9 +62,11 @@ while ($row = mysql_fetch_array($res)){ "; + } } + echo "
".$lang_label["report_name"]."".$lang_label["description"]."".$lang_label["view"]."
"; +} else { + echo "
".$lang_label["no_reporting_def"]."
"; } -echo "
"; - ?> diff --git a/pandora_console/operation/reporting/graph_viewer.php b/pandora_console/operation/reporting/graph_viewer.php index 7584396778..08e139067a 100644 --- a/pandora_console/operation/reporting/graph_viewer.php +++ b/pandora_console/operation/reporting/graph_viewer.php @@ -147,41 +147,46 @@ if (isset($_GET["view_graph"])){ } echo "

".$lang_label["reporting"]." > "; echo $lang_label["custom_graph_viewer"]."

"; -echo ""; -echo ""; - echo ""; +if (mysql_num_rows($res)) { + echo "
".$lang_label["graph_name"]."".$lang_label["description"]."".$lang_label["view"]; -if ((give_acl($id_usuario,0,"AW") == 1 ) OR (dame_admin($id_usuario)==1)) - echo ""; $color=1; $sql="SELECT * FROM tgraph"; $res=mysql_query($sql); -while ($row = mysql_fetch_array($res)){ - if (($row["private"]==0) || ($row["id_user"] == $id_user)){ - // Calculate table line color - if ($color == 1){ - $tdcolor = "datos"; - $color = 0; - } - else { - $tdcolor = "datos2"; - $color = 1; - } - echo "
".$row["name"]; - echo "".$row["description"]; - $id_graph = $row["id_graph"]; - echo ""; - - if ((give_acl($id_usuario,0,"AW") == 1 ) OR (dame_admin($id_usuario)==1)) { - echo "'; - echo "
"; + echo " + + + "; + if ((give_acl($id_usuario,0,"AW") == 1 ) OR (dame_admin($id_usuario)==1)) + echo ""; + echo ""; + + while ($row = mysql_fetch_array($res)){ + if (($row["private"]==0) || ($row["id_user"] == $id_user)){ + // Calculate table line color + if ($color == 1){ + $tdcolor = "datos"; + $color = 0; + } + else { + $tdcolor = "datos2"; + $color = 1; + } + echo ""; + echo ""; + echo ""; + $id_graph = $row["id_graph"]; + echo ""; + } } } + echo "
".$lang_label["graph_name"]."".$lang_label["description"]."".$lang_label["view"]."".$lang_label["delete"]."
".$row["name"]."".$row["description"].""; + + if ((give_acl($id_usuario,0,"AW") == 1 ) OR (dame_admin($id_usuario)==1)) { + echo "'; + echo "
"; +} else { + echo "
".$lang_label["no_reporting_def"]."
"; } -echo ""; - - - - ?> diff --git a/pandora_console/operation/reporting/reporting_viewer.php b/pandora_console/operation/reporting/reporting_viewer.php index d839447200..c142ef410c 100644 --- a/pandora_console/operation/reporting/reporting_viewer.php +++ b/pandora_console/operation/reporting/reporting_viewer.php @@ -49,7 +49,10 @@ $report_private= give_db_value ("private", "treport", "id_report", $id_report); $report_user = give_db_value ("id_user", "treport", "id_report", $id_report); if (($report_user == $id_user) OR (dame_admin($id_user)==1) OR ($report_private == 0)) { //echo "SLA for Tato: %".return_module_SLA (50, 604800, 1, 1); - echo "

".$lang_label["custom_reporting"]." - ".$report_name."

"; + + echo "

".$lang_label["reporting"]." > "; + echo $lang_label["custom_reporting"]." - "; + echo $report_name."

"; echo ""; echo "";