From 510a371b877b96407d0be132c03b4667cfeed62d Mon Sep 17 00:00:00 2001 From: Fizzgig Date: Sat, 16 Aug 2025 07:44:57 -0400 Subject: [PATCH 1/2] test branch --- New Text Document.txt | 0 index.php | 1 + styles.css | 41 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 New Text Document.txt create mode 100644 styles.css diff --git a/New Text Document.txt b/New Text Document.txt new file mode 100644 index 0000000..e69de29 diff --git a/index.php b/index.php index 20a01a1..43dbd72 100644 --- a/index.php +++ b/index.php @@ -45,6 +45,7 @@ Minecraft Server Status + diff --git a/styles.css b/styles.css new file mode 100644 index 0000000..ceacb0c --- /dev/null +++ b/styles.css @@ -0,0 +1,41 @@ +h1{color:#EFEF88;} +h2{color:#EFEF88;} +a:link{color:#8888EF;} +a:visited{color:#8888EF;} +a:hover{color:#8888EF;} +a:active{color:#8888EF;} +body {background-color:#222; color:#CCC; margin:0;} +.banner{display:block;height: 100px;} +.banner img { + float: left; + width: 100px; + height: 100px; +} + +.banner h1 { + position: relative; + top: 18px; + left: 10px; +} +.banner h2 { + position: relative; + top: 2px; + left: 10px; +} +.banner h3 { + color:#EFEF88; + position: relative; + top: 2px; + left: 10px; +} +.banner a:link{text-decoration: none;position: relative;} +.banner a:visited{text-decoration: none;position: relative;} +.banner a:hover{text-decoration: none;position: relative;} +.banner a:active{text-decoration: none;position: relative;} +.notice{display: block;} +.notice{background-color: #EFEF88;color: #000000;} +.warning{display: block} +.warning{background-color: #efaf88;color: #000000;} +input{background-color: #555555; color: #CCC;} +textarea{background-color: #555555; color: #CCC;} +select{background-color: #555555; color: #CCC;} \ No newline at end of file From 35544d4e752092c430df9285fe7d10f5f8f55089 Mon Sep 17 00:00:00 2001 From: Fizzgig Date: Sat, 16 Aug 2025 09:03:01 -0400 Subject: [PATCH 2/2] new server class --- New Text Document.txt | 0 index.php | 45 ++++++++++++++++--------------------------- minecraft_status.php | 10 ++++++++++ styles.css | 2 +- 4 files changed, 28 insertions(+), 29 deletions(-) delete mode 100644 New Text Document.txt diff --git a/New Text Document.txt b/New Text Document.txt deleted file mode 100644 index e69de29..0000000 diff --git a/index.php b/index.php index 43dbd72..d78a0d8 100644 --- a/index.php +++ b/index.php @@ -1,34 +1,23 @@ Server ".$s."

".$GLOBALS['S_HOST'][$s].":".$GLOBALS['S_PORT'][$s]."

":"

".$GLOBALS['S_HOST'][$s].":".$GLOBALS['S_PORT'][$s]."

"; - if($GLOBALS['CHK_SERVER'][$s]){$info = $status->getServerInfo($GLOBALS['S_HOST'][$s], $GLOBALS['S_PORT'][$s]);} + echo "

".$GLOBALS['ServerList'][$s]->NAME."

".$GLOBALS['ServerList'][$s]->HOST.":".$GLOBALS['ServerList'][$s]->PORT."

"; + if($GLOBALS['ServerList'][$s]->PING){$info = $status->getServerInfo($GLOBALS['ServerList'][$s]->HOST, $GLOBALS['ServerList'][$s]->PORT);} if($info == false){echo "OFFLINE
";} else{ echo "ONLINE
"; @@ -62,8 +51,8 @@ -

Wonderbit

-

Blockgame Server

+ +

diff --git a/minecraft_status.php b/minecraft_status.php index 62fffae..ca893b0 100644 --- a/minecraft_status.php +++ b/minecraft_status.php @@ -1,5 +1,15 @@ NAME = $NAME; $this->HOST = $HOST; $this->PORT = $PORT; $this->PING = ping($HOST, $PORT, 0.5); + } + + function ping($host, $port, $timeout){return fSockOpen($host, $port, $errno, $errstr, $timeout);} + } class ServerStatus { private $status = array(); diff --git a/styles.css b/styles.css index ceacb0c..88f4662 100644 --- a/styles.css +++ b/styles.css @@ -5,7 +5,7 @@ a:visited{color:#8888EF;} a:hover{color:#8888EF;} a:active{color:#8888EF;} body {background-color:#222; color:#CCC; margin:0;} -.banner{display:block;height: 100px;} +.banner{display:block;} .banner img { float: left; width: 100px;