From 1ad5d81dff9ab714d1ca992c9a7344f192eeaa61 Mon Sep 17 00:00:00 2001 From: hugetoad Date: Mon, 17 Jan 2005 19:07:17 +0000 Subject: - configurable format of icon labels for maps (Alexei) - added column sysmaps.label_type (Alexei) git-svn-id: svn://svn.zabbix.com/trunk@1615 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/map.php | 44 +++++++++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 11 deletions(-) (limited to 'frontends/php/map.php') diff --git a/frontends/php/map.php b/frontends/php/map.php index 3ac814ad..669df00e 100644 --- a/frontends/php/map.php +++ b/frontends/php/map.php @@ -28,12 +28,14 @@ $grid=50; - $result=DBselect("select name,width,height,background from sysmaps where sysmapid=".$_GET["sysmapid"]); + $result=DBselect("select * from sysmaps where sysmapid=".$_GET["sysmapid"]); + $row=DBfetch($result); - $name=DBget_field($result,0,0); - $width=DBget_field($result,0,1); - $height=DBget_field($result,0,2); - $background=DBget_field($result,0,3); + $name=$row["name"]; + $width=$row["width"]; + $height=$row["height"]; + $background=$row["background"]; + $label_type=$row["label_type"]; // Header( "Content-type: text/html"); if(MAP_OUTPUT_FORMAT == "JPG") Header( "Content-type: image/jpeg"); @@ -230,7 +232,7 @@ # Draw hosts $icons=array(); - $result=DBselect("select h.host,sh.shostid,sh.sysmapid,sh.hostid,sh.label,sh.x,sh.y,h.status,sh.icon,sh.icon_on from sysmaps_hosts sh,hosts h where sh.sysmapid=".$_GET["sysmapid"]." and h.hostid=sh.hostid"); + $result=DBselect("select h.host,sh.shostid,sh.sysmapid,sh.hostid,sh.label,sh.x,sh.y,h.status,sh.icon,sh.icon_on,h.ip from sysmaps_hosts sh,hosts h where sh.sysmapid=".$_GET["sysmapid"]." and h.hostid=sh.hostid"); for($i=0;$i