diff options
author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-01-10 20:09:02 +0000 |
---|---|---|
committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-01-10 20:09:02 +0000 |
commit | ae0f0e5862cf6c6f616f31ad53ff88b700353655 (patch) | |
tree | 31223f2e4036a67a8d4d0f712d9227b7312358f5 | |
parent | 2db97c42e8af03ebd37a848f31f6d271aebd1ae9 (diff) | |
download | zabbix-ae0f0e5862cf6c6f616f31ad53ff88b700353655.tar.gz zabbix-ae0f0e5862cf6c6f616f31ad53ff88b700353655.tar.xz zabbix-ae0f0e5862cf6c6f616f31ad53ff88b700353655.zip |
- configurable format of map output (png, jpg) (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@1597 97f52cf1-0a1b-0410-bd0e-c28be96e8082
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | frontends/php/include/config.inc.php | 2 | ||||
-rw-r--r-- | frontends/php/include/db.inc.php | 1 | ||||
-rw-r--r-- | frontends/php/include/defines.inc.php | 5 | ||||
-rw-r--r-- | frontends/php/map.php | 7 |
5 files changed, 13 insertions, 3 deletions
@@ -1,5 +1,6 @@ Changes for 1.1alpha5: + - configurable format of map output (png, jpg) (Alexei) - special processing of 'b' and 'bps' (bytes). Take 1000 for Kilos (Alexei) - fix of crash of zabbix_server when processing notification macros (Alexei) - added form for managing images (Alexei) diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php index 873946cd..ea63ce9b 100644 --- a/frontends/php/include/config.inc.php +++ b/frontends/php/include/config.inc.php @@ -24,8 +24,10 @@ include_once "include/html.inc.php"; include_once "include/local_en.inc.php"; +// GLOBALS $USER_DETAILS =""; $ERROR_MSG =""; +// END OF GLOBALS function getmicrotime() { diff --git a/frontends/php/include/db.inc.php b/frontends/php/include/db.inc.php index c145a190..cfb57039 100644 --- a/frontends/php/include/db.inc.php +++ b/frontends/php/include/db.inc.php @@ -28,7 +28,6 @@ $DB_DATABASE ="zabbix"; $DB_USER ="root"; $DB_PASSWORD =""; - // END OF DATABASE CONFIGURATION $USER_DETAILS =""; diff --git a/frontends/php/include/defines.inc.php b/frontends/php/include/defines.inc.php index 4e92eb7d..bc2c4bf2 100644 --- a/frontends/php/include/defines.inc.php +++ b/frontends/php/include/defines.inc.php @@ -19,6 +19,11 @@ **/ ?> <?php +// MISC PARAMETERS + define("MAP_OUTPUT_FORMAT", "DEFAULT"); +# define("MAP_OUTPUT_FORMAT", "JPG"); +// END OF MISC PARAMETERS + define("AUDIT_ACTION_ADD", 0); define("AUDIT_ACTION_UPDATE", 1); define("AUDIT_ACTION_DELETE", 2); diff --git a/frontends/php/map.php b/frontends/php/map.php index 15f2cc86..43ddc016 100644 --- a/frontends/php/map.php +++ b/frontends/php/map.php @@ -36,7 +36,8 @@ $background=DBget_field($result,0,3); // Header( "Content-type: text/html"); - Header( "Content-type: image/png"); + if(MAP_OUTPUT_FORMAT == "JPG") Header( "Content-type: image/jpeg"); + else Header( "Content-type: image/png"); Header( "Expires: Mon, 17 Aug 1998 12:51:50 GMT"); check_authorisation(); @@ -334,7 +335,9 @@ } ImageStringUp($im,0,imagesx($im)-10,imagesy($im)-50, S_ZABBIX_URL, $gray); + + if(MAP_OUTPUT_FORMAT == "JPG") ImageJPEG($im); + else ImageOut($im); #default - ImageOut($im); ImageDestroy($im); ?> |