summaryrefslogtreecommitdiffstats
path: root/frontends/php/sysmap.php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2004-07-29 19:52:18 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2004-07-29 19:52:18 +0000
commite1ca70ccee2979487753ce2fa58c1378211a1097 (patch)
tree8dceffe4c29a5fe43ef07bdfc89e8461c7227783 /frontends/php/sysmap.php
parent0b31e21be61308d1037e5e1a91521728c49e93ca (diff)
downloadzabbix-e1ca70ccee2979487753ce2fa58c1378211a1097.tar.gz
zabbix-e1ca70ccee2979487753ce2fa58c1378211a1097.tar.xz
zabbix-e1ca70ccee2979487753ce2fa58c1378211a1097.zip
- added table 'images' (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@1366 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/sysmap.php')
-rw-r--r--frontends/php/sysmap.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/frontends/php/sysmap.php b/frontends/php/sysmap.php
index 2fdc5649..40e8d1f5 100644
--- a/frontends/php/sysmap.php
+++ b/frontends/php/sysmap.php
@@ -270,7 +270,7 @@
echo "Icon";
show_table2_h_delimiter();
echo "<select class=\"biginput\" name=\"icon\" size=1>";
- $icons=array();
+/* $icons=array();
if(function_exists("imagecreatetruecolor")&&@imagecreatetruecolor(1,1))
{
$icons[0]="Server";
@@ -291,17 +291,20 @@
$icons[2]="Printer";
$icons[3]="Hub";
$num=4;
- }
- for($i=0;$i<$num;$i++)
+ }*/
+ $result=DBselect("select name from images where imagetype=1 order by name");
+/* for($i=0;$i<$num;$i++)*/
+ for($i=0;$i<DBnum_rows($result);$i++)
{
- if(isset($HTTP_GET_VARS["shostid"]) && ($icon==$icons[$i]))
+ $name=DBget_field($result,$i,0);
+ if(isset($HTTP_GET_VARS["shostid"]) && ($icon==$name))
// if(isset($HTTP_GET_VARS["hostid"]) && ($HTTP_GET_VARS["icon"]==$icons[$i]))
{
- echo "<OPTION VALUE='".$icons[$i]."' SELECTED>".$icons[$i];
+ echo "<OPTION VALUE='".$name."' SELECTED>".$name;
}
else
{
- echo "<OPTION VALUE='".$icons[$i]."'>".$icons[$i];
+ echo "<OPTION VALUE='".$name."'>".$name;
}
}
echo "</SELECT>";