mirror of
https://github.com/moparisthebest/Server-Status-Page
synced 2024-11-24 09:52:23 -05:00
Now dynamically draw server name on bottom of status images
This commit is contained in:
parent
61b0856aed
commit
ff388d9e98
BIN
ss_sources/fonts/error.png
Executable file → Normal file
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
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
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 |
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user