diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2004-12-18 14:01:18 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2004-12-18 14:01:18 +0000 |
| commit | 734d69b5e7cf19752e3f36396c499cbdb21aa6f9 (patch) | |
| tree | 93a52166ccf111f23027ffa71876b5e1184baa4b /frontends/php/include | |
| parent | 8d2c56ee22cd641a7dbab7b2b28b200a83031921 (diff) | |
- added link to ZABBIX manual from all forms (Alexei)
- icmppingsec to return '0' if cannot ping (Alexei)
- added error reason for unsupported items (Alexei)
- added error reason for unreachable hosts (Alexei)
- added hosts.error (Alexei)
- added items.error (Alexei)
- added alerts.error (Alexei)
- added error reason for undelivered alerts (Alexei)
- added upgrades/dbpatches/1.1alpha3_to_1.1alpha4 (Alexei)
- fixed empty macros in alert messages if '.' in key (Alexei)
- do not show menu item if no permissions (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@1539 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
| -rw-r--r-- | frontends/php/include/config.inc.php | 86 | ||||
| -rw-r--r-- | frontends/php/include/forms.inc.php | 22 | ||||
| -rw-r--r-- | frontends/php/include/local_en.inc.php | 3 |
3 files changed, 76 insertions, 35 deletions
diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php index 790a154d..d8d46378 100644 --- a/frontends/php/include/config.inc.php +++ b/frontends/php/include/config.inc.php @@ -1156,12 +1156,12 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid"; } if($refresh!=0) { - echo "<meta http-equiv=\"refresh\" content=\"$refresh\">"; - echo "<title>$title [refreshed every $refresh sec]</title>"; + echo "<meta http-equiv=\"refresh\" content=\"$refresh\">\n"; + echo "<title>$title [refreshed every $refresh sec]</title>\n"; } else { - echo "<title>$title</title>"; + echo "<title>$title</title>\n"; } echo "</head>"; @@ -1670,6 +1670,29 @@ echo "</head>"; $i=0; foreach($menu as $label=>$sub) { +// Check permissions + if($label=="configuration") + { + if( !check_anyright("Configuration of Zabbix","U") + &&!check_anyright("User","U") + &&!check_anyright("Host","U") + &&!check_anyright("Graph","U") + &&!check_anyright("Screen","U") + &&!check_anyright("Network map","U") + &&!check_anyright("Service","U") + ) + { + continue; + } + if( !check_anyright("Default permission","R") + &&!check_anyright("Host","R") + ) + { + continue; + } + + } +// End of check permissions $active=0; foreach($sub["pages"] as $label2) { @@ -1694,6 +1717,35 @@ echo "</head>"; $i=0; foreach($menu[$active_level1]["level2"] as $label=>$sub) { +// Check permissions + if(($sub["url"]=="latest.php")&&!check_anyright("Host","R")) continue; + if(($sub["url"]=="tr_status.php?onlytrue=true&noactions=true&compact=true")&&!check_anyright("Host","R")) continue; + if(($sub["url"]=="queue.php")&&!check_anyright("Host","R")) continue; + if(($sub["url"]=="latestalarms.php")&&!check_anyright("Default permission","R")) continue; + if(($sub["url"]=="alerts.php")&&!check_anyright("Default permission","R")) continue; + if(($sub["url"]=="maps.php")&&!check_anyright("Network map","R")) continue; + if(($sub["url"]=="charts.php")&&!check_anyright("Graph","R")) continue; + if(($sub["url"]=="screens.php")&&!check_anyright("Screen","R")) continue; + if(($sub["url"]=="srv_status.php")&&!check_anyright("Service","R")) continue; + if(($sub["url"]=="about.php")&&!check_anyright("Default permission","R")) continue; + if(($sub["url"]=="report1.php")&&!check_anyright("Default permission","R")) continue; + if(($sub["url"]=="report2.php")&&!check_anyright("Host","R")) continue; + if(($sub["url"]=="config.php")&&!check_anyright("Configuration of Zabbix","U")) continue; + if(($sub["url"]=="users.php")&&!check_anyright("User","U")) continue; + if(($sub["url"]=="media.php")&&!check_anyright("User","U")) continue; + if(($sub["url"]=="audit.php")&&!check_anyright("Audit","U")) continue; + if(($sub["url"]=="hosts.php")&&!check_anyright("Host","U")) continue; + if(($sub["url"]=="items.php")&&!check_anyright("Host","U")) continue; + if(($sub["url"]=="triggers.php")&&!check_anyright("Host","U")) continue; + if(($sub["url"]=="actions.php")&&!check_anyright("Host","U")) continue; + if(($sub["url"]=="sysmaps.php")&&!check_anyright("Network map","U")) continue; + if(($sub["url"]=="sysmap.php")&&!check_anyright("Network map","U")) continue; + if(($sub["url"]=="graphs.php")&&!check_anyright("Graph","U")) continue; + if(($sub["url"]=="graph.php")&&!check_anyright("Graph","U")) continue; + if(($sub["url"]=="screenedit.php")&&!check_anyright("Screen","U")) continue; + if(($sub["url"]=="screenconf.php")&&!check_anyright("Screen","U")) continue; + if(($sub["url"]=="services.php")&&!check_anyright("Service","U")) continue; +// End of check permissions if($i==0) echo "<a href=\"".$sub["url"]."\" class=\"highlight\">".$sub["label"]."</a><span class=\"divider\"> | </span>"; else @@ -3676,8 +3728,8 @@ echo "</head>"; } - - function show_table2_header_begin() +// function show_table2_header_begin() + function show_form_begin($help="") { ?> <p align=center> @@ -3685,18 +3737,11 @@ echo "</head>"; <tr> <td class="form_row_first" height=24 colspan=2> <?php -/* echo "<table border=0 align=center cellspacing=0 cellpadding=0 width=50% bgcolor=000000>"; - cr(); - echo "<tr>"; - cr(); - echo "<td valign=\"top\">"; - cr(); - echo "<table width=100% border=0 cellspacing=1 cellpadding=3>"; - cr(); - echo "<tr>"; - cr(); - echo "<td colspan=2 bgcolor=6d88ad align=center valign=\"top\">"; - cr();*/ + if($help!="") + { + echo " <a href=\"http://www.zabbix.com/manual/v1.1/web.$help.php\">?</a> "; + cr(); + } } function show_table_header_begin() @@ -3993,9 +4038,7 @@ echo "</head>"; # Show history function show_freehist($itemid,$period) { - - echo "<br>"; - show_table2_header_begin(); + show_form_begin("history.period"); echo "Choose period"; show_table2_v_delimiter(); @@ -4022,7 +4065,7 @@ echo "</head>"; # Show in plain text function show_plaintxt($itemid,$period) { - show_table2_header_begin(); + show_form_begin("history.plain"); echo "Data in plain text format"; show_table2_v_delimiter(); @@ -4071,6 +4114,7 @@ echo "</head>"; </p> </body> +</html> <?php } diff --git a/frontends/php/include/forms.inc.php b/frontends/php/include/forms.inc.php index dfe59383..e76c0e2d 100644 --- a/frontends/php/include/forms.inc.php +++ b/frontends/php/include/forms.inc.php @@ -48,7 +48,7 @@ $col=0; - show_table2_header_begin(); + show_form_begin("users.user"); echo S_USER; show_table2_v_delimiter($col++); @@ -159,7 +159,7 @@ $formula=DBget_field($result,0,22); } - show_table2_header_begin(); + show_form_begin("items.item"); echo S_ITEM; $col=0; @@ -443,7 +443,7 @@ $name=""; } - show_table2_header_begin(); + show_form_begin("hosts.group"); echo S_HOST_GROUP; show_table2_v_delimiter($col++); @@ -513,7 +513,7 @@ $name=""; } - show_table2_header_begin(); + show_form_begin("users.group"); echo S_USER_GROUP; show_table2_v_delimiter($col++); @@ -595,9 +595,7 @@ # Insert form for User permissions function insert_permissions_form($userid) { - echo "<br>"; - - show_table2_header_begin(); + show_form_begin("users.permission"); echo "New permission"; show_table2_v_delimiter(); @@ -647,7 +645,7 @@ $col=0; - show_table2_header_begin(); + show_form_begin("index.login"); echo "Login"; show_table2_v_delimiter($col++); @@ -672,9 +670,7 @@ # Insert form for Problem function insert_problem_form($problemid) { - echo "<br>"; - - show_table2_header_begin(); + show_form_begin(); echo "Problem definition"; show_table2_v_delimiter(); echo "<form method=\"post\" action=\"helpdesk.php\">"; @@ -744,7 +740,7 @@ $url=""; } - show_table2_header_begin(); + show_form_begin("triggers.trigger"); echo "Trigger configuration"; show_table2_v_delimiter($col++); @@ -881,7 +877,7 @@ $yaxismax=$row["yaxismax"]; } - show_table2_header_begin(); + show_form_begin("graphs.graph"); echo S_GRAPH; show_table2_v_delimiter(); diff --git a/frontends/php/include/local_en.inc.php b/frontends/php/include/local_en.inc.php index fdfb9414..b075695c 100644 --- a/frontends/php/include/local_en.inc.php +++ b/frontends/php/include/local_en.inc.php @@ -95,6 +95,7 @@ define("S_ALERTS_BIG", "ALERTS"); define("S_TYPE", "Type"); define("S_RECIPIENTS", "Recipient(s)"); + define("S_ERROR", "Error"); define("S_SENT", "sent"); define("S_NOT_SENT", "not sent"); define("S_NO_ALERTS", "No alerts"); @@ -169,7 +170,7 @@ define("S_COMPARE", "Compare"); // Footer - define("S_ZABBIX_VER", "ZABBIX 1.1alpha2"); + define("S_ZABBIX_VER", "ZABBIX 1.1alpha4"); define("S_COPYRIGHT_BY", "Copyright 2001-2004 by "); define("S_CONNECTED_AS", "Connected as"); define("S_ALEXEI_VLADISHEV", "Alexei Vladishev"); |
