website_games/index.php
Brendan Golden 98aaf7333e initial commit
Signed-off-by: Brendan Golden <git@brendan.ie>
2023-10-01 02:36:07 +01:00

69 lines
3 KiB
PHP

<!DOCTYPE html>
<html>
<head>
<title>Skynet Games Server</title>
<link rel="stylesheet" type="text/css" href="css/main.css" />
</head>
<body>
<div id="container">
<img src="img/header.jpg"/>
<div id="info">
<h3>Welcome to the UL CompSoc Minecraft server</h3>
<p>To play on the server, you must:
<ol>
<li><p>Own a copy of <a href="http://www.minecraft.net/">Minecraft</a></p></li>
<li><p>Be a member of the UL Computer Society<br/>
<span class="hint">Learn how to join the society <a href="https://ulwolves.ie/society/compsoc">here</a></span></p></li>
<li><p>Get your Minecraft username added to our server's whitelist<br/>
<span class="hint">Email <a href="mailto:minecraft@skynet.ie?subject=Add to MC Whitelist">minecraft@skynet.ie</a></span></p></li>
</ol>
<p>Once that's done, connect to "<em>games.skynet.ie</em>" from the multiplayer section of Minecraft. Enjoy!</p>
<p>You can view a live map of our world at <a href="http://games.skynet.ie/map/index.html">games.skynet.ie/map/</a></p>
<!--<p>Some networks block the minecraft port (25565), but you can get around this by connecting to port 21 instead "<em>games.skynet.ie:21</em>"</p>-->
<p>If you are interested in adding more games to this server contact <a href="mailto:compsoc@skynet.ie">compsoc@skynet.ie</a> and we will see what we can do, we are trialing this server with just Minecraft at the moment</p>
<br/><h3>Minecraft Server Status:</h3>
<?php
$maintence = file_get_contents("maintence.txt");
if($maintence!=1){
require_once('query.php');
$server = new Query('localhost', 25555);
if ($server->connect()){
$info = $server->get_info();
echo "<h4 style='text-align:center;'><img src='./img/success.png' height='20'/> Server is Online <img src='./img/success.png' height='20'/></h4>";
//print_r($info);
$players = $info['players'];
//print_r($players);
if(count($players)>0){
echo "<p>Members Online Now: ";
for($x=0; $x<count($players); $x++){
if($x==(count($players)-1)){
echo "<a href='https://namemc.com/profile/" . $players[$x] . "' target='_blank'>" . $players[$x] . "</a>";
}
else{
echo "<a href='https://namemc.com/profile/" . $players[$x] . "' target='_blank'>" . $players[$x] . "</a>, ";
}
}
echo "</p>";
}
else{
echo "<p>There are currently no members online</p>";
}
}
else{
echo "<h4 style='text-align:center;'><img src='./img/error.png' height='20'/> Server is Offline <img src='./img/error.png' height='20'/></h4>";
}
}
else{
echo "<h4 style='text-align:center;'><img src='./img/warning.png' height='20'/> Server is Undergoing Maintence <img src='./img/warning.png' height='20'/></h4>";
}
?>
</div>
<!--<p class="map">New! <a href="map/">View real-time map</a></p>-->
<p style="text-align:center"><a style="border:none!important" href="http://skynet.ie"><img width="200px" src="img/CompSoc_Logo_PNG.png" /></a></p>
</div>
</body>
</html>