* Add preliminary server side support for linking to gameservers on the web
* Fix typo on masterserver HTML output refresh header * Better style for masterserver HTML output
This commit is contained in:
parent
f23a216087
commit
ca2ded738f
|
@ -15,6 +15,19 @@
|
|||
// allow for filtering by gameserver version
|
||||
define( 'FILTER_VERSION', $_GET['version'] );
|
||||
|
||||
define( 'MGG_HOST', $_GET['mgg_host'] );
|
||||
define( 'MGG_PORT', $_GET['mgg_port'] );
|
||||
|
||||
if ( MGG_HOST != '' ) {
|
||||
$body = MGG_HOST . ':' . MGG_PORT;
|
||||
header( 'Content-Type: application/x-megaglest-gameserver; charset=utf-8' );
|
||||
header( 'Content-Disposition: attachment; filename="megaglest_gameserver.mgg' );
|
||||
header( 'Content-Length: ' . strlen( $body ));
|
||||
header( 'Accept-Ranges: bytes' );
|
||||
echo $body;
|
||||
exit;
|
||||
}
|
||||
|
||||
// consider replacing this by a cron job
|
||||
cleanupServerList();
|
||||
|
||||
|
@ -34,7 +47,7 @@
|
|||
header( 'Content-Type: text/html; charset=utf-8' );
|
||||
if ( REFRESH_INTERVAL != 0 ) {
|
||||
if ( REFRESH_INTERVAL <= 10 ) {
|
||||
header( 'Refresh: 10:' );
|
||||
header( 'Refresh: 10' );
|
||||
} else {
|
||||
header( 'Refresh: ' . REFRESH_INTERVAL );
|
||||
}
|
||||
|
|
|
@ -9,6 +9,10 @@ body {
|
|||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border: 2px solid black;
|
||||
|
@ -17,7 +21,12 @@ table {
|
|||
th, td {
|
||||
border: 1px solid black;
|
||||
padding: 5px;
|
||||
text-align: left;
|
||||
text-align: center;
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: LightGray;
|
||||
}
|
||||
|
||||
.waiting_for_players {
|
||||
|
@ -33,7 +42,7 @@ th, td {
|
|||
}
|
||||
|
||||
.finished {
|
||||
background-color: LightGray;
|
||||
background-color: Gray;
|
||||
}
|
||||
|
||||
.unknown {
|
||||
|
|
Loading…
Reference in New Issue