summaryrefslogtreecommitdiffstats
path: root/frontends/php/include
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2004-10-07 07:50:39 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2004-10-07 07:50:39 +0000
commitfef1cff5dd9e820db489de0cff3b3f75ab3ffb92 (patch)
tree831a9a38d4e18557cb5c841772eaeb56f7dea802 /frontends/php/include
parent654e8d572e3c6e140c0e4c85e0a2a2b4f60f0a53 (diff)
downloadzabbix-fef1cff5dd9e820db489de0cff3b3f75ab3ffb92.tar.gz
zabbix-fef1cff5dd9e820db489de0cff3b3f75ab3ffb92.tar.xz
zabbix-fef1cff5dd9e820db489de0cff3b3f75ab3ffb92.zip
Forntend improvements.
git-svn-id: svn://svn.zabbix.com/trunk@1460 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
-rw-r--r--frontends/php/include/config.inc.php21
1 files changed, 17 insertions, 4 deletions
diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php
index 12aa595d..8578f9c9 100644
--- a/frontends/php/include/config.inc.php
+++ b/frontends/php/include/config.inc.php
@@ -1611,6 +1611,7 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
$menu=array(
"view"=>array(
"label"=>"View",
+ "pages"=>array("latest.php","tr_status.php","queue.php","latestalarms.php","alerts.php","maps.php","charts.php","screens.php","srv_status.php"),
"level2"=>array(
array("label"=>"Latest data","url"=>"latest.php"),
array("label"=>"Triggers","url"=>"tr_status.php?onlytrue=true&noactions=true&compact=true.php"),
@@ -1625,12 +1626,14 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
),
"reports"=>array(
"label"=>"Reports",
+ "pages"=>array("report2.php"),
"level2"=>array(
array("label"=>"Availability report","url"=>"report2.php")
)
),
"configuration"=>array(
"label"=>"Configuration",
+ "pages"=>array("config.php","users.php","audit.php","hosts.php","items.php","triggers.php","sysmaps.php","graphs.php","screenconf.php","services.php"),
"level2"=>array(
array("label"=>"General","url"=>"config.php"),
array("label"=>"Users","url"=>"users.php"),
@@ -1646,6 +1649,7 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
),
"login"=>array(
"label"=>"Login",
+ "pages"=>array("index.php"),
"level2"=>array(
array("label"=>"Login","url"=>"index.php"),
)
@@ -1665,10 +1669,19 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
$i=0;
foreach($menu as $label=>$sub)
{
- if($i==0)
- echo "<td class=\"horizontal_menu\" height=24 colspan=9><b><a href=\"http://www.zabbix.com/index.php\" class=\"highlight\">".$sub["label"]."</a></b></td>";
+ $active=0;
+ foreach($sub["pages"] as $label2)
+ {
+ if($page["file"]==$label2)
+ {
+ $active=1;
+ $active_level1=$label;
+ }
+ }
+ if($active==1)
+ echo "<td class=\"horizontal_menu\" height=24 colspan=9><b><a href=\"".$sub["level2"][0]["url"]."\" class=\"highlight\">".$sub["label"]."</a></b></td>";
else
- echo "<td class=\"horizontal_menu_n\" height=24 colspan=9><b><a href=\"http://www.zabbix.com/index.php\" class=\"highlight\">".$sub["label"]."</a></b></td>";
+ echo "<td class=\"horizontal_menu_n\" height=24 colspan=9><b><a href=\"".$sub["level2"][0]["url"]."\" class=\"highlight\">".$sub["label"]."</a></b></td>";
$i++;
}
?>
@@ -1678,7 +1691,7 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
<tr><td class="horizontal_menu" height=24 colspan=9><b>
<?php
$i=0;
- foreach($menu["view"]["level2"] as $label=>$sub)
+ foreach($menu[$active_level1]["level2"] as $label=>$sub)
{
if($i==0)
echo "<a href=\"".$sub["url"]."\" class=\"highlight\">".$sub["label"]."</a><span class=\"divider\">&nbsp;&nbsp;|&nbsp;&nbsp;</span>";