summaryrefslogtreecommitdiffstats
path: root/frontends/php/map.php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2004-07-15 09:10:12 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2004-07-15 09:10:12 +0000
commit4b4dbe182b15eab00c5b82241324592ff18b86d0 (patch)
treef2001de4eebde739d14b46e277514e8444062acf /frontends/php/map.php
parent4ae0536321adc4643d8e0eacc1d39728a805b7ae (diff)
downloadzabbix-4b4dbe182b15eab00c5b82241324592ff18b86d0.tar.gz
zabbix-4b4dbe182b15eab00c5b82241324592ff18b86d0.tar.xz
zabbix-4b4dbe182b15eab00c5b82241324592ff18b86d0.zip
- added basic support of background images (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@1359 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/map.php')
-rw-r--r--frontends/php/map.php18
1 files changed, 14 insertions, 4 deletions
diff --git a/frontends/php/map.php b/frontends/php/map.php
index 2a299740..8bc34c9c 100644
--- a/frontends/php/map.php
+++ b/frontends/php/map.php
@@ -28,14 +28,16 @@
$grid=50;
- $result=DBselect("select name,width,height from sysmaps where sysmapid=".$HTTP_GET_VARS["sysmapid"]);
+ $result=DBselect("select name,width,height,use_background,background from sysmaps where sysmapid=".$HTTP_GET_VARS["sysmapid"]);
$name=DBget_field($result,0,0);
$width=DBget_field($result,0,1);
$height=DBget_field($result,0,2);
+ $use_background=DBget_field($result,0,3);
+ $background=DBget_field($result,0,4);
-// Header( "Content-type: text/html");
- Header( "Content-type: image/png");
+ Header( "Content-type: text/html");
+// Header( "Content-type: image/png");
Header( "Expires: Mon, 17 Aug 1998 12:51:50 GMT");
check_authorisation();
@@ -78,7 +80,15 @@
$y=imagesy($im);
# ImageFilledRectangle($im,0,0,$width,$height,$black);
- ImageFilledRectangle($im,0,0,$width,$height,$white);
+ if($use_background==1)
+ {
+ $back=ImageCreateFromString($background);
+ ImageCopy($im,$back,0,0,0,0,imagesx($back),imagesy($back));
+ }
+ else
+ {
+ ImageFilledRectangle($im,0,0,$width,$height,$white);
+ }
if(!isset($HTTP_GET_VARS["border"]))
{