More human friendly server list, external stylesheet
This commit is contained in:
parent
74f2b25752
commit
6796715678
|
@ -34,42 +34,29 @@
|
||||||
}
|
}
|
||||||
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">' . PHP_EOL;
|
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">' . PHP_EOL;
|
||||||
echo '<html>' . PHP_EOL;
|
echo '<html>' . PHP_EOL;
|
||||||
echo '<head>' . PHP_EOL;
|
echo ' <head>' . PHP_EOL;
|
||||||
echo ' <title>' . htmlspecialchars( PRODUCT_NAME ) . ' gameservers</title>' . PHP_EOL;
|
echo ' <title>' . htmlspecialchars( PRODUCT_NAME ) . ' gameservers</title>' . PHP_EOL;
|
||||||
echo ' <style type="text/css">' . PHP_EOL;
|
echo ' <link rel="stylesheet" type="text/css" href="style/screen.css" />' . PHP_EOL;
|
||||||
echo ' body {' . PHP_EOL;
|
echo ' </head>' . PHP_EOL;
|
||||||
echo ' }' . PHP_EOL;
|
echo ' <body>' . PHP_EOL;
|
||||||
echo '' . PHP_EOL;
|
echo ' <h1>' . htmlspecialchars( PRODUCT_NAME ) . ' gameservers</h1>' . PHP_EOL;
|
||||||
echo ' table {' . PHP_EOL;
|
echo ' <table>' . PHP_EOL;
|
||||||
echo ' width: 100%;' . PHP_EOL;
|
echo ' <tr>' . PHP_EOL;
|
||||||
echo ' border: 2px solid black;' . PHP_EOL;
|
echo ' <th title="glestVersion">Version</th>' . PHP_EOL;
|
||||||
echo ' }' . PHP_EOL;
|
echo ' <th title="status">Status</th>' . PHP_EOL;
|
||||||
echo '' . PHP_EOL;
|
echo ' <th title="country">Country</th>' . PHP_EOL;
|
||||||
echo ' th, td { ' . PHP_EOL;
|
echo ' <th title="serverTitle">Title</th>' . PHP_EOL;
|
||||||
echo ' width: 300;' . PHP_EOL;
|
echo ' <th title="tech">Techtree</th>' . PHP_EOL;
|
||||||
echo ' border: 1px solid black;' . PHP_EOL;
|
echo ' <th title="connectedClients">Network players</th>' . PHP_EOL;
|
||||||
echo ' text-align: left;' . PHP_EOL;
|
echo ' <th title="networkSlots">Network slots</th>' . PHP_EOL;
|
||||||
echo ' }' . PHP_EOL;
|
echo ' <th title="activeSlots">Total slots</th>' . PHP_EOL;
|
||||||
echo ' </style>' . PHP_EOL;
|
echo ' <th title="map">Map</th>' . PHP_EOL;
|
||||||
echo '</head>' . PHP_EOL;
|
echo ' <th title="tileset">Tileset</th>' . PHP_EOL;
|
||||||
echo '<body>' . PHP_EOL;
|
echo ' <th title="ip">IPv4 address</th>' . PHP_EOL;
|
||||||
echo ' <table>' . PHP_EOL;
|
echo ' <th title="externalServerPort">Game protocol port</th>' . PHP_EOL;
|
||||||
echo ' <tr>' . PHP_EOL;
|
echo ' <th title="platform">Platform</th>' . PHP_EOL;
|
||||||
echo ' <th title="glestVersion">Version</th>' . PHP_EOL;
|
echo ' <th title="binaryCompileDate">Build date</th>' . PHP_EOL;
|
||||||
echo ' <th title="status">Status</th>' . PHP_EOL;
|
echo ' </tr>' . PHP_EOL;
|
||||||
echo ' <th title="country">Country</th>' . PHP_EOL;
|
|
||||||
echo ' <th title="serverTitle">Title</th>' . PHP_EOL;
|
|
||||||
echo ' <th title="tech">Techtree</th>' . PHP_EOL;
|
|
||||||
echo ' <th title="connectedClients">Network players</th>' . PHP_EOL;
|
|
||||||
echo ' <th title="networkSlots">Network slots</th>' . PHP_EOL;
|
|
||||||
echo ' <th title="activeSlots">Total slots</th>' . PHP_EOL;
|
|
||||||
echo ' <th title="map">Map</th>' . PHP_EOL;
|
|
||||||
echo ' <th title="tileset">Tileset</th>' . PHP_EOL;
|
|
||||||
echo ' <th title="ip">IPv4 address</th>' . PHP_EOL;
|
|
||||||
echo ' <th title="externalServerPort">Game protocol port</th>' . PHP_EOL;
|
|
||||||
echo ' <th title="platform">Platform</th>' . PHP_EOL;
|
|
||||||
echo ' <th title="binaryCompileDate">Build date</th>' . PHP_EOL;
|
|
||||||
echo ' </tr>' . PHP_EOL;
|
|
||||||
|
|
||||||
foreach( $all_servers as $server )
|
foreach( $all_servers as $server )
|
||||||
{
|
{
|
||||||
|
|
41
source/masterserver/style/screen.css
Normal file
41
source/masterserver/style/screen.css
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
/*
|
||||||
|
==============================================================
|
||||||
|
Copyright: (C) 2012 Mark Vejvoda, Titus Tscharntke and Tom Reynolds
|
||||||
|
The Megaglest Team, under GNU GPL v3.0
|
||||||
|
==============================================================
|
||||||
|
*/
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
width: 100%;
|
||||||
|
border: 2px solid black;
|
||||||
|
}
|
||||||
|
|
||||||
|
th, td {
|
||||||
|
border: 1px solid black;
|
||||||
|
padding: 5px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.waiting_for_players {
|
||||||
|
background-color: LightGreen;
|
||||||
|
}
|
||||||
|
|
||||||
|
.game_full_pending_start {
|
||||||
|
background-color: Yellow;
|
||||||
|
}
|
||||||
|
|
||||||
|
.in_progress {
|
||||||
|
background-color: Tomato;
|
||||||
|
}
|
||||||
|
|
||||||
|
.finished {
|
||||||
|
background-color: LightGray;
|
||||||
|
}
|
||||||
|
|
||||||
|
.unknown {
|
||||||
|
background-color: Red;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user