From fef1cff5dd9e820db489de0cff3b3f75ab3ffb92 Mon Sep 17 00:00:00 2001 From: hugetoad Date: Thu, 7 Oct 2004 07:50:39 +0000 Subject: Forntend improvements. git-svn-id: svn://svn.zabbix.com/trunk@1460 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/include/config.inc.php | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'frontends/php/include') 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 "".$sub["label"].""; + $active=0; + foreach($sub["pages"] as $label2) + { + if($page["file"]==$label2) + { + $active=1; + $active_level1=$label; + } + } + if($active==1) + echo "".$sub["label"].""; else - echo "".$sub["label"].""; + echo "".$sub["label"].""; $i++; } ?> @@ -1678,7 +1691,7 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid"; $sub) + foreach($menu[$active_level1]["level2"] as $label=>$sub) { if($i==0) echo "".$sub["label"]."  |  "; -- cgit