summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/maps.inc.php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-11-25 11:17:18 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-11-25 11:17:18 +0000
commit1e8cf592866d7330849fd60551be7b8e5344cc98 (patch)
treeaba7fdf01a44fa71031e99363ffe448d4d03e6e6 /frontends/php/include/maps.inc.php
parent8aee7a4bf11b6a36d74892f56d8937219cba0be0 (diff)
downloadzabbix-1e8cf592866d7330849fd60551be7b8e5344cc98.tar.gz
zabbix-1e8cf592866d7330849fd60551be7b8e5344cc98.tar.xz
zabbix-1e8cf592866d7330849fd60551be7b8e5344cc98.zip
Getting rid of DBget_field (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@2358 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/maps.inc.php')
-rw-r--r--frontends/php/include/maps.inc.php25
1 files changed, 13 insertions, 12 deletions
diff --git a/frontends/php/include/maps.inc.php b/frontends/php/include/maps.inc.php
index 9845240f..90a08797 100644
--- a/frontends/php/include/maps.inc.php
+++ b/frontends/php/include/maps.inc.php
@@ -161,18 +161,18 @@
{
$map="\n<map name=links$sysmapid>";
$result=DBselect("select h.host,sh.shostid,sh.sysmapid,sh.hostid,sh.label,sh.x,sh.y,h.status,sh.icon,sh.url from sysmaps_hosts sh,hosts h where sh.sysmapid=$sysmapid and h.hostid=sh.hostid");
- for($i=0;$i<DBnum_rows($result);$i++)
+ while($row=DBfetch($result))
{
- $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);
- $icon=DBget_field($result,$i,8);
- $url=DBget_field($result,$i,9);
+ $host=$row["host"];
+ $shostid=$row["shostid"];
+ $sysmapid=$row["sysmapid"];
+ $hostid=$row["hostid"];
+ $label=$row["label"];
+ $x=$row["x"];
+ $y=$row["y"];
+ $status=$row["status"];
+ $icon=$row["icon"];
+ $url=$row["url"];
if($status==HOST_STATUS_MONITORED)
{
@@ -180,7 +180,8 @@
$result2=DBselect($sql);
if(DBnum_rows($result2)==1)
{
- $back=ImageCreateFromString(DBget_field($result2,0,0));
+ $row2=DBfetch($result2);
+ $back=ImageCreateFromString($row2["image"]);
$sizex = imagesx($back);
$sizey = imagesy($back);
if($url=="")