diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2003-03-24 21:02:37 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2003-03-24 21:02:37 +0000 |
| commit | ca98b85a6aab48b82c835b95bea815743ce99b40 (patch) | |
| tree | 4118cf2ee3e207304c0df25640a77fd22f866aad /frontends/php/include/config.inc.php | |
| parent | 06545c5e2f782f79772f7d2dbcf10f80e1d172ce (diff) | |
| download | zabbix-ca98b85a6aab48b82c835b95bea815743ce99b40.tar.gz zabbix-ca98b85a6aab48b82c835b95bea815743ce99b40.tar.xz zabbix-ca98b85a6aab48b82c835b95bea815743ce99b40.zip | |
Added permissions from Screens.
git-svn-id: svn://svn.zabbix.com/trunk@717 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/config.inc.php')
| -rw-r--r-- | frontends/php/include/config.inc.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php index b9acfc03..d4975708 100644 --- a/frontends/php/include/config.inc.php +++ b/frontends/php/include/config.inc.php @@ -306,6 +306,23 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid"; return $result; } + function get_screen_by_screenid($screenid) + { + global $ERROR_MSG; + + $sql="select * from screens where scid=$screenid"; + $result=DBselect($sql); + if(DBnum_rows($result) == 1) + { + return DBfetch($result); + } + else + { + $ERROR_MSG="No screen with screenid=[$screenid]"; + } + return $result; + } + function get_map_by_sysmapid($sysmapid) { global $ERROR_MSG; @@ -3213,6 +3230,7 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid"; echo "<option value=\"Default permission\">Default permission"; echo "<option value=\"Graph\">Graph"; echo "<option value=\"Host\">Host"; + echo "<option value=\"Screen\">Screen"; echo "<option value=\"Service\">IT Service"; echo "<option value=\"Item\">Item"; echo "<option value=\"Network map\">Network map"; @@ -3861,6 +3879,18 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid"; $res="All hosts"; } } + else if($permission=="Screen") + { + if(isset($id)&&($id!=0)) + { + $screen=get_screen_by_screenid($id); + $res=$screen["name"]; + } + else + { + $res="All hosts"; + } + } else if($permission=="Item") { if(isset($id)&&($id!=0)) |
