General fixes

+Added the possibility to start a maintenance (no user will be banned)
This commit is contained in:
iopietro
2018-06-01 17:57:44 +02:00
parent 4abb5c1354
commit 15cae4fde9
7 changed files with 185 additions and 175 deletions
+13
View File
@@ -173,6 +173,7 @@ class Session {
}
if($user && ($admin || isset($_SESSION['sessid']))) {
$this->maintenance();
$this->isWinner();
// check if this is not a support user, for who only messages and statistics are available
@@ -193,6 +194,18 @@ class Session {
else return false;
}
/**
* Called when the server is under maintenance
*
*/
function maintenance(){
if($_SESSION['ok'] == 2 && basename($_SERVER['PHP_SELF']) != 'maintenance.php'){
header('Location: maintenance.php');
exit;
}
}
/**
* Called when there's a player who built a WW to level 100
*