Now dynamically draw server name on bottom of status images

This commit is contained in:
Travis Burtrum 2012-12-27 00:58:00 -05:00
parent 61b0856aed
commit ff388d9e98
4 changed files with 5 additions and 1 deletions

BIN
ss_sources/fonts/error.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 26 KiB

BIN
ss_sources/fonts/offline.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 22 KiB

BIN
ss_sources/fonts/online.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -65,7 +65,8 @@ function echoImage($online = -1, $text = 'Error!', $size_req = '') {
if ($online == 1)
$file = $g_source_dir . '/fonts/online.png';
elseif ($online == 0)
$file = $g_source_dir . '/fonts/offline.png'; else
$file = $g_source_dir . '/fonts/offline.png';
else
$file = $g_source_dir . '/fonts/error.png';
$im = imagecreatefrompng($file);
@ -77,6 +78,9 @@ function echoImage($online = -1, $text = 'Error!', $size_req = '') {
// size 12, y 35 can be used with <= 27 chars
centerTtfString($im, $text, 11, 34);
// draw SERVER_NAME at bottom
centerTtfString($im, $_SERVER['SERVER_NAME'], 9, 82, $g_source_dir . '/fonts/arial_bold.ttf');
if ($size_req != '') {
$x_pos = strpos($size_req, 'x');