mirror of
https://github.com/moparisthebest/Server-Status-Page
synced 2024-11-25 02:12:20 -05:00
Draw header on status images dynamically as well
This commit is contained in:
parent
0c52831c6f
commit
2701787db8
@ -26,7 +26,7 @@ if (!defined('SS_PAGE'))
|
|||||||
//error_reporting(E_ALL);
|
//error_reporting(E_ALL);
|
||||||
|
|
||||||
# you need to set these regardless
|
# you need to set these regardless
|
||||||
global $g_source_dir, $g_sql_host, $g_sql_user, $g_sql_pass, $g_sql_db, $g_versions, $g_default_port, $g_theme, $g_img_dir, $g_admin_contact, $g_checker_ip;
|
global $g_source_dir, $g_sql_host, $g_sql_user, $g_sql_pass, $g_sql_db, $g_versions, $g_default_port, $g_theme, $g_img_dir, $g_admin_contact, $g_checker_ip, $g_picture_banner;
|
||||||
# path to ss_sources
|
# path to ss_sources
|
||||||
$g_source_dir = './ss_sources';
|
$g_source_dir = './ss_sources';
|
||||||
$g_img_dir = './images';
|
$g_img_dir = './images';
|
||||||
@ -41,6 +41,7 @@ $g_default_port = 43594;
|
|||||||
$g_admin_contact = '<a href="/smf/index.php?action=profile;u=youruid">yourname</a>';
|
$g_admin_contact = '<a href="/smf/index.php?action=profile;u=youruid">yourname</a>';
|
||||||
# IP address the ServerChecker application connects from
|
# IP address the ServerChecker application connects from
|
||||||
$g_checker_ip = '69.39.224.55';
|
$g_checker_ip = '69.39.224.55';
|
||||||
|
$g_picture_banner = 'Server Status';
|
||||||
|
|
||||||
define('SS_PAGE', 1);
|
define('SS_PAGE', 1);
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 23 KiB |
Binary file not shown.
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 19 KiB |
Binary file not shown.
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 19 KiB |
@ -60,7 +60,7 @@ function centerTtfString($image, $string, $font_size, $y, $font = null) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function echoImage($online = -1, $text = 'Error!', $size_req = '') {
|
function echoImage($online = -1, $text = 'Error!', $size_req = '') {
|
||||||
global $g_source_dir;
|
global $g_source_dir, $g_picture_banner;
|
||||||
|
|
||||||
if ($online == 1)
|
if ($online == 1)
|
||||||
$file = $g_source_dir . '/fonts/online.png';
|
$file = $g_source_dir . '/fonts/online.png';
|
||||||
@ -74,12 +74,15 @@ function echoImage($online = -1, $text = 'Error!', $size_req = '') {
|
|||||||
// imagealphablending($im, true); // setting alpha blending on
|
// imagealphablending($im, true); // setting alpha blending on
|
||||||
// imagesavealpha($im, true); // save alphablending setting (important)
|
// imagesavealpha($im, true); // save alphablending setting (important)
|
||||||
|
|
||||||
|
// Draw name up top
|
||||||
|
centerTtfString($im, $g_picture_banner, 12, 16);
|
||||||
|
|
||||||
// centerImageString($im, $text, 5, 20);
|
// centerImageString($im, $text, 5, 20);
|
||||||
// size 12, y 35 can be used with <= 27 chars
|
// size 12, y 35 can be used with <= 27 chars
|
||||||
centerTtfString($im, $text, 11, 34);
|
centerTtfString($im, $text, 11, 34);
|
||||||
|
|
||||||
// draw SERVER_NAME at bottom
|
// draw SERVER_NAME at bottom
|
||||||
centerTtfString($im, $_SERVER['SERVER_NAME'], 9, 82, $g_source_dir . '/fonts/arial_bold.ttf');
|
centerTtfString($im, $_SERVER['SERVER_NAME'], 9, 82);
|
||||||
|
|
||||||
if ($size_req != '') {
|
if ($size_req != '') {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user