General fixes

+Moved "isWinner()" method from Automation.php to Session.php, it's now
triggered when activating plus function or entering in
plus1.php/build.php
+General clean-up and better indentation
+The tournament square bonus is now displayed correctly
This commit is contained in:
iopietro
2018-05-22 00:33:09 +02:00
parent e1b0dcf46e
commit f0b9f32826
18 changed files with 239 additions and 267 deletions
+9 -14
View File
@@ -19,26 +19,21 @@ AccessLogger::logRequest();
$profile->procProfile($_POST);
$profile->procSpecial($_GET);
if(isset($_GET['newdid'])) {
if(isset($_GET['newdid'])){
$_SESSION['wid'] = $_GET['newdid'];
if(isset($_GET['s'])){
header("Location: ".$_SERVER['PHP_SELF']."?s=".preg_replace("/[^a-zA-Z0-9_-]/","",$_GET['s']));
exit;
header("Location: ".$_SERVER['PHP_SELF']."?s=".preg_replace("/[^a-zA-Z0-9_-]/", "", $_GET['s']));
exit();
}else if(isset($_GET['uid'])){
header("Location: ".$_SERVER['PHP_SELF']."?uid=".preg_replace("/[^a-zA-Z0-9_-]/","",$_GET['uid']));
exit;
header("Location: ".$_SERVER['PHP_SELF']."?uid=".preg_replace("/[^a-zA-Z0-9_-]/", "", $_GET['uid']));
exit();
}else{
header("Location: ".$_SERVER['PHP_SELF']);
exit;
}
}
else {
$building->procBuild($_GET);
header("Location: ".$_SERVER['PHP_SELF']);
exit();
}
}
else $building->procBuild($_GET);
if(isset($_GET['s'])){
$automation->isWinner();
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>