summaryrefslogtreecommitdiffstats
path: root/frontends/php/include
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2003-08-16 07:05:49 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2003-08-16 07:05:49 +0000
commit09aea2874df0ffc5a2600640862e3874b05083ce (patch)
treecdb3fe09d8d4bd5feb8f5f1ecf97aa3ad9981f62 /frontends/php/include
parentc8a9bbeef8c4daff678aae52fecae8536ed9787d (diff)
downloadzabbix-09aea2874df0ffc5a2600640862e3874b05083ce.tar.gz
zabbix-09aea2874df0ffc5a2600640862e3874b05083ce.tar.xz
zabbix-09aea2874df0ffc5a2600640862e3874b05083ce.zip
Improvements for screen handling code.
git-svn-id: svn://svn.zabbix.com/trunk@926 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
-rw-r--r--frontends/php/include/config.inc.php32
1 files changed, 25 insertions, 7 deletions
diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php
index d3e62765..3daad5db 100644
--- a/frontends/php/include/config.inc.php
+++ b/frontends/php/include/config.inc.php
@@ -4328,13 +4328,7 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
function update_screen_item($screenitemid,$resource,$resourceid,$width,$height)
{
- $sql="update screens_items set resource=$resourceid,resourceid=$resourceid,width=$width,height=$height where screenitemid=$screenitemid";
- return DBexecute($sql);
- }
-
- function update_screen_graph($screengraphid,$itemid,$width,$height)
- {
- $sql="update screens_graphs set itemid=$itemid,width=$width,height=$height where screengraphid=$screengraphid";
+ $sql="update screens_items set resource=$resource,resourceid=$resourceid,width=$width,height=$height where screenitemid=$screenitemid";
return DBexecute($sql);
}
@@ -4381,4 +4375,28 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
echo "</SCRIPT>";
}
+ function get_map_imagemap($sysmapid)
+ {
+ $map="\n<map name=links>";
+ $result=DBselect("select h.host,sh.shostid,sh.sysmapid,sh.hostid,sh.label,sh.x,sh.y,h.status from sysmaps_hosts sh,hosts h where sh.sysmapid=$sysmapid and h.hostid=sh.hostid");
+ for($i=0;$i<DBnum_rows($result);$i++)
+ {
+ $host=DBget_field($result,$i,0);
+ $shostid=DBget_field($result,$i,1);
+ $sysmapid=DBget_field($result,$i,2);
+ $hostid=DBget_field($result,$i,3);
+ $label=DBget_field($result,$i,4);
+ $x=DBget_field($result,$i,5);
+ $y=DBget_field($result,$i,6);
+ $status=DBget_field($result,$i,7);
+
+ if( ($status==0)||($status==2))
+ {
+ $map=$map."\n<area shape=rect coords=$x,$y,".($x+32).",".($y+32)." href=\"tr_status.php?hostid=$hostid&noactions=true&onlytrue=true&compact=true\" alt=\"$host\">";
+ }
+ }
+ $map=$map."\n</map>";
+ return $map;
+ }
+
?>