diff --git a/index.php b/index.php index 20a01a1..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
"; @@ -45,6 +34,7 @@ Minecraft Server Status + @@ -61,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 new file mode 100644 index 0000000..88f4662 --- /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;} +.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