diff options
author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-04-12 14:24:05 +0000 |
---|---|---|
committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-04-12 14:24:05 +0000 |
commit | 7bcea294d44454612408a1d767b6542c3a318c4b (patch) | |
tree | 7519895ff34bb9ea61cbf9ec8dbd0d53e95f9e14 /frontends/php/vtext.php | |
parent | 4a63d35d87dd4e72db91d32f258f9100ae529ce6 (diff) | |
download | zabbix-7bcea294d44454612408a1d767b6542c3a318c4b.tar.gz zabbix-7bcea294d44454612408a1d767b6542c3a318c4b.tar.xz zabbix-7bcea294d44454612408a1d767b6542c3a318c4b.zip |
- added vertical text for OVERVIEW (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@2733 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/vtext.php')
-rw-r--r-- | frontends/php/vtext.php | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/frontends/php/vtext.php b/frontends/php/vtext.php new file mode 100644 index 00000000..5ce61bc2 --- /dev/null +++ b/frontends/php/vtext.php @@ -0,0 +1,49 @@ +<?php +/* +** ZABBIX +** Copyright (C) 2000-2005 SIA Zabbix +** +** This program is free software; you can redistribute it and/or modify +** it under the terms of the GNU General Public License as published by +** the Free Software Foundation; either version 2 of the License, or +** (at your option) any later version. +** +** This program is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with this program; if not, write to the Free Software +** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +**/ +?> +<?php + include "include/config.inc.php"; + +# PARAMETERS: + +# itemid +# type + + $text = get_request("text","");; + $font = get_request("font",3); + + $width = ImageFontWidth($font) * strlen($text); + $height = ImageFontHeight($font); + +// Header( "Content-type: text/html"); + Header( "Content-type: image/png"); + Header( "Expires: Mon, 17 Aug 1998 12:51:50 GMT"); + + $im = imagecreate($height,$width); + + $backgroud_color = ImageColorAllocate($im,255,255,255); + $text_color = ImageColorAllocate($im,0,0,0); + + ImageStringUp($im,$font,0,$width-1,$text,$text_color); + imagecolortransparent($im,$backgroud_color); + + ImageOut($im); + ImageDestroy($im); +?> |