fix: all location headers need to have exit after them!

This commit is contained in:
Martin Ambrus
2017-10-22 13:00:54 +02:00
parent 43a2775ebc
commit 7270a69a63
74 changed files with 367 additions and 78 deletions
+9
View File
@@ -109,6 +109,7 @@ class Account {
header("Location: anmelden.php");
exit;
}
else {
if(AUTH_EMAIL){
@@ -119,6 +120,7 @@ class Account {
$mailer->sendActivate($_POST['email'],$_POST['name'],$_POST['pw'],$act);
header("Location: activate.php?id=$uid&q=$act2");
exit;
}
}
else {
@@ -130,6 +132,7 @@ class Account {
$database->updateUserField($uid,"invited",$_POST['invited'],1);
$this->generateBase($_POST['kid'],$uid,$_POST['name']);
header("Location: login.php");
exit;
}
}
}
@@ -148,16 +151,19 @@ class Account {
$database->unreg($dbarray['username']);
$this->generateBase($dbarray['kid'],$uid,$dbarray['username']);
header("Location: activate.php?e=2");
exit;
}
}
else
{
header("Location: activate.php?e=3");
exit;
}
}
else
{
header("Location: activate.php");
exit;
}
}
@@ -170,9 +176,11 @@ class Account {
if(password_verify($_POST['pw'], $dbarray['password'])) {
$database->unreg($dbarray['username']);
header("Location: anmelden.php");
exit;
}
else {
header("Location: activate.php?e=3");
exit;
}
}
@@ -207,6 +215,7 @@ class Account {
$_SESSION['valuearray'] = $_POST;
header("Location: login.php");
exit;
} else {
$userid = $database->getUserArray($_POST['user'], 0);
// Vacation mode by Shadow
+39 -18
View File
@@ -131,7 +131,8 @@
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . addslashes($session->username) . '</a> has invited <a href="spieler.php?uid=' . $UserData['id'] . '">' . addslashes($UserData['username']) . '</a> into the alliance.');
}
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
@@ -147,9 +148,11 @@
$database->insertAlliNotice($invite['alliance'], '<a href="spieler.php?uid=' . $session->uid . '">' . addslashes($session->username) . '</a> has rejected the invitation.');
}
}
header("Location: build.php?id=".$get['id']);
header("Location: build.php?id=".$get['id']);
exit;
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
@@ -167,9 +170,11 @@
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . addslashes($session->username) . '</a> has deleted the invitation for <a href="spieler.php?uid=' . $invitename['id'] . '">' . addslashes($invitename['username']) . '</a>.');
}
}
header("Location: allianz.php?delinvite");
header("Location: allianz.php?delinvite");
exit;
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
@@ -200,10 +205,12 @@
if($accept_error == 1){
$form->addError("ally_accept", "The alliance can contain only ".$max." peoples right now.");
}else{
header("Location: build.php?id=" . $get['id']);
header("Location: build.php?id=" . $get['id']);
exit;
}
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
@@ -230,6 +237,7 @@
$_SESSION['valuearray'] = $post;
header("Location: build.php?id=" . $post['id']);
exit;
} else {
$max = $bid18[$village->resarray['f' . $post['id']]]['attri'];
$aid = $database->createAlliance($post['ally1'], $post['ally2'], $session->uid, $max);
@@ -240,9 +248,11 @@
// log the notice
$database->insertAlliNotice($aid, 'The alliance has been founded by <a href="spieler.php?uid=' . $session->uid . '">' . addslashes($session->username) . '</a>.');
header("Location: build.php?id=" . $post['id']);
exit;
}
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
@@ -277,7 +287,8 @@
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . addslashes($session->username) . '</a> has changed the alliance name.');
}
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
@@ -300,7 +311,8 @@
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . addslashes($session->username) . '</a> has changed the alliance description.');
}
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
@@ -323,7 +335,8 @@
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . addslashes($session->username) . '</a> has changed permissions.');
}
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
/*****************************************
@@ -351,7 +364,8 @@
}
}
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
/*****************************************
@@ -362,10 +376,12 @@
if($session->access != BANNED){
if(isset($post['f_link'])){
$database->setAlliForumdblink($session->alliance, $post['f_link']);
header("Location: allianz.php?s=5");
header("Location: allianz.php?s=5");
exit;
}
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
/*****************************************
@@ -379,9 +395,11 @@
$text = ''.$survey['voted'].','.$session->uid.',';
$database->Vote($post['tid'], $post['vote'], $text);
}
header("Location: allianz.php?s=2&fid2=".$post['fid2']."&pid=".$post['pid']."&tid=".$post['tid']);
header("Location: allianz.php?s=2&fid2=".$post['fid2']."&pid=".$post['pid']."&tid=".$post['tid']);
exit;
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
/*****************************************
@@ -409,9 +427,11 @@
$database->deleteAlliance($session->alliance);
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . addslashes($session->username) . '</a> has quit the alliance.');
header("Location: spieler.php?uid=".$session->uid);
exit;
}
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
@@ -448,7 +468,8 @@
$form->addError("name", "Alliance does not exist");
}
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
+4 -1
View File
@@ -35,7 +35,8 @@ class Automation {
$isThere = mysqli_num_rows($q);
if($isThere > 0)
{
header('Location: winner.php');
header('Location: winner.php');
exit;
}else{
## there is no winner
}
@@ -3100,6 +3101,7 @@ $wallimg = "<img src=\"".GP_LOCATE."img/g/g3".$targettribe."Icon.gif\" height=\"
$_SESSION['errorarray'] = $form->getErrors();
$_SESSION['valuearray'] = $_POST;
header("Location: a2b.php");
exit;
} else {
//change units
@@ -3176,6 +3178,7 @@ $wallimg = "<img src=\"".GP_LOCATE."img/g/g3".$targettribe."Icon.gif\" height=\"
$technology->checkReinf($post['ckey']);
header("Location: build.php?id=39");
exit;
}
}
+21 -6
View File
@@ -47,14 +47,16 @@ class Building {
global $session;
if($session->access==BANNED){
header("Location: banned.php");
exit;
exit;
} else {
if ($this->checkResource($id,$tid)!=4) {
if($tid >= 19) {
header("Location: dorf2.php");
exit;
}
else {
header("Location: dorf1.php");
exit;
}
exit;
}
@@ -85,8 +87,10 @@ class Building {
$database->modifyGold($session->uid,1,0);
if($get['id'] > 18) {
header("Location: dorf2.php");
exit;
} else {
header("Location: dorf1.php");
exit;
}
}
if(isset($get['a']) && $get['c'] == $session->checker && isset($get['id'])) {
@@ -319,9 +323,11 @@ class Building {
}
if($jobs['field'] >= 19) {
header("Location: dorf2.php");
exit;
}
else {
header("Location: dorf1.php");
exit;
}
}
}
@@ -370,13 +376,16 @@ class Building {
$logging->addBuildLog($village->wid,$this->procResType($village->resarray['f'.$id.'t']),($village->resarray['f'.$id]+($loopsame>0?2:1)),0);
if($id >= 19) {
header("Location: dorf2.php");
exit;
}
else {
header("Location: dorf1.php");
exit;
}
}
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
}
@@ -413,9 +422,11 @@ class Building {
if($database->addBuilding($village->wid,$id,$village->resarray['f'.$id.'t'],$loop,$time,0,0,$level['f'.$id] + 1 + count($database->getBuildingByField($village->wid,$id)))) {
$logging->addBuildLog($village->wid,$this->procResType($village->resarray['f'.$id.'t']),($village->resarray['f'.$id]-1),2);
header("Location: dorf2.php");
exit;
}
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
}
@@ -449,9 +460,11 @@ class Building {
$logging->addBuildLog($village->wid,$this->procResType($tid),($village->resarray['f'.$id]+1),1);
$database->modifyResource($village->wid,$uprequire['wood'],$uprequire['clay'],$uprequire['iron'],$uprequire['crop'],0);
header("Location: dorf2.php");
exit;
}
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
}
@@ -819,9 +832,11 @@ class Building {
}
}
}
header("Location: ".$session->referrer);
header("Location: ".$session->referrer);
exit;
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
+30 -15
View File
@@ -50,7 +50,8 @@ class Market
$vref = $village->wid;
$database->getResourcesBack($vref,$type,$amt);
$database->addMarket($village->wid,$get['del'],0,0,0,0,0,0,1);
header("Location: build.php?id=".$get['id']."&t=2");
header("Location: build.php?id=".$get['id']."&t=2");
exit;
}
if(isset($get['t']) && $get['t'] == 1 && isset($get['a']) && $get['a'] == $session->mchecker && !isset($get['del']))
{
@@ -100,7 +101,8 @@ class Market
$availableCrop = $database->getCropAvailable($village->wid);
if($session->access == BANNED)
{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
else if($availableWood >= $post['r1'] AND $availableClay >= $post['r2'] AND $availableIron >= $post['r3'] AND $availableCrop >= $post['r4'])
{
@@ -124,7 +126,8 @@ class Market
}
}
}
header("Location: build.php?id=".$post['id']);
header("Location: build.php?id=".$post['id']);
exit;
}
else
{
@@ -140,17 +143,20 @@ class Market
if($post['rid1'] == $post['rid2'])
{
// Trading res for res of same type (invalid)
header("Location: build.php?id=".$post['id']."&t=2&e2");
header("Location: build.php?id=".$post['id']."&t=2&e2");
exit;
}
elseif($post['m1'] > (2 * $post['m2']))
{
// Trade is for more than 2x (invalid)
header("Location: build.php?id=".$post['id']."&t=2&e2");
header("Location: build.php?id=".$post['id']."&t=2&e2");
exit;
}
elseif($post['m2'] > (2 * $post['m1']))
{
// Trade is for less than 0.5x (invalid)
header("Location: build.php?id=".$post['id']."&t=2&e2");
header("Location: build.php?id=".$post['id']."&t=2&e2");
exit;
}
else
{
@@ -165,7 +171,8 @@ class Market
if($session->access == BANNED)
{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
elseif($availableWood >= $wood AND $availableClay >= $clay AND $availableIron >= $iron AND $availableCrop >= $crop)
@@ -194,18 +201,21 @@ class Market
$database->addMarket($village->wid,$post['rid1'],$post['m1'],$post['rid2'],$post['m2'],$time,$alliance,$reqMerc,0);
}
// Enough merchants
header("Location: build.php?id=".$post['id']."&t=2");
header("Location: build.php?id=".$post['id']."&t=2");
exit;
}
else
{
// Not enough merchants
header("Location: build.php?id=".$post['id']."&t=2&e3");
header("Location: build.php?id=".$post['id']."&t=2&e3");
exit;
}
}
else
{
// not enough resources
header("Location: build.php?id=".$post['id']."&t=2&e1");
header("Location: build.php?id=".$post['id']."&t=2&e1");
exit;
}
}
}
@@ -241,7 +251,8 @@ class Market
$database->setMarketAcc($get['g']);
$database->removeAcceptedOffer($get['g']);
$logging->addMarketLog($village->wid,2,array($infoarray['vref'],$get['g']));
header("Location: build.php?id=".$get['id']);
header("Location: build.php?id=".$get['id']);
exit;
}
private function loadOnsale()
@@ -330,7 +341,8 @@ class Market
//kijken of ze niet meer gs invoeren dan ze hebben
if($session->access == BANNED)
{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
else if (($post['m2'][0]+$post['m2'][1]+$post['m2'][2]+$post['m2'][3])<=(round($village->awood)+round($village->aclay)+round($village->airon)+round($village->acrop)))
{
@@ -339,16 +351,19 @@ class Market
$database->setVillageField($village->wid,"iron",$post['m2'][2]);
$database->setVillageField($village->wid,"crop",$post['m2'][3]);
$database->modifyGold($session->uid,3,0);
header("Location: build.php?id=".$post['id']."&t=3&c");;
header("Location: build.php?id=".$post['id']."&t=3&c");;
exit;
}
else
{
header("Location: build.php?id=".$post['id']."&t=3");
header("Location: build.php?id=".$post['id']."&t=3");
exit;
}
}
else
{
header("Location: build.php?id=".$post['id']."&t=3");
header("Location: build.php?id=".$post['id']."&t=3");
exit;
}
}
}
+10
View File
@@ -45,6 +45,7 @@ class Message {
$this->sendMessage($post['an'],$post['be'],addslashes($post['message']));
}
header("Location: nachrichten.php?t=2");
exit;
break;
case "m3":
case "m4":
@@ -88,6 +89,7 @@ class Message {
if($get['t'] == 5) {
if(!$session->plus){
header("Location: berichte.php");
exit;
} else {
$type = 9;
}
@@ -136,6 +138,7 @@ class Message {
}
$this->reply = $_SESSION['reply'] = $message;
header("Location: nachrichten.php?t=1&id=" . $message['owner']);
exit;
}
}
}
@@ -223,6 +226,7 @@ class Message {
}
}
header("Location: nachrichten.php");
exit;
}
private function archiveMessage($post) {
@@ -233,6 +237,7 @@ class Message {
}
}
header("Location: nachrichten.php");
exit;
}
private function unarchiveMessage($post) {
@@ -243,6 +248,7 @@ class Message {
}
}
header("Location: nachrichten.php");
exit;
}
private function removeNotice($post) {
@@ -253,6 +259,7 @@ class Message {
}
}
header("Location: berichte.php");
exit;
}
private function archiveNotice($post) {
@@ -263,6 +270,7 @@ class Message {
}
}
header("Location: berichte.php");
exit;
}
private function unarchiveNotice($post) {
@@ -273,6 +281,7 @@ class Message {
}
}
header("Location: berichte.php");
exit;
}
private function getReadNotice($id) {
@@ -593,6 +602,7 @@ class Message {
}
}
header("Location: nachrichten.php?t=1");
exit;
}
}
+15
View File
@@ -21,6 +21,7 @@ class Profile {
$this->updateProfile($post);
}else{
header("Location: banned.php");
exit;
}
break;
case "p3":
@@ -28,6 +29,7 @@ class Profile {
$this->updateAccount($post);
}else{
header("Location: banned.php");
exit;
}
break;
case "p4":
@@ -36,6 +38,7 @@ class Profile {
$this->setvactionmode($post);
}else{
header("Location: banned.php");
exit;
}
break;
}
@@ -47,6 +50,7 @@ class Profile {
$this->gpack($post);
}else{
header("Location: banned.php");
exit;
}
break;
}
@@ -62,6 +66,7 @@ class Profile {
$this->removeMeSit($get);
}else{
header("Location: banned.php");
exit;
}
break;
case 3:
@@ -69,6 +74,7 @@ class Profile {
$this->removeSitter($get);
}else{
header("Location: banned.php");
exit;
}
break;
case 4:
@@ -76,6 +82,7 @@ class Profile {
$this->cancelDeleting($get);
}else{
header("Location: banned.php");
exit;
}
break;
}
@@ -94,12 +101,14 @@ class Profile {
$database->setVillageName($database->RemoveXSS($varray[$i]['wref']),$k);
}
header("Location: spieler.php?uid=".$post['uid']);
exit;
}
private function gpack($post) {
global $database, $session;
$database->gpack($database->RemoveXSS($session->uid),$database->RemoveXSS($post['custom_url']));
header("Location: spieler.php?uid=".$session->uid);
exit;
}
/*******************************************************
@@ -123,8 +132,10 @@ class Profile {
$database->UpdateOnline("logout") or die(mysqli_error($database->dblink));
$session->Logout();
header("Location: login.php");
exit;
}else{
header("Location: spieler.php?s=5");
exit;
}
}
@@ -178,6 +189,7 @@ class Profile {
}
$_SESSION['errorarray'] = $form->getErrors();
header("Location: spieler.php?s=3");
exit;
}
private function removeSitter($get) {
@@ -189,12 +201,14 @@ class Profile {
$session->changeChecker();
}
header("Location: spieler.php?s=".$get['s']);
exit;
}
private function cancelDeleting($get) {
global $database,$session;
$database->setDeleting($get['id'],1);
header("Location: spieler.php?s=".$get['s']);
exit;
}
private function removeMeSit($get) {
@@ -204,6 +218,7 @@ class Profile {
$session->changeChecker();
}
header("Location: spieler.php?s=".$get['s']);
exit;
}
};
$profile = new Profile;
+6
View File
@@ -21,6 +21,7 @@ mb_internal_encoding("UTF-8"); // Add for utf8 varriables.
if(file_exists('GameEngine/config.php') || file_exists('../../GameEngine/config.php') || file_exists('../../config.php') || file_exists('../GameEngine/config.php')) {
}else{
header("Location: install/");
exit;
}
$script_name = ($_SERVER['REQUEST_URI'] == 'karte.php') ? 'karte' : $_SERVER['REQUEST_URI'];
@@ -123,8 +124,10 @@ class Session {
if ($dbarray['id'] == 1) {
header("Location: nachrichten.php");
exit;
} else {
header("Location: dorf1.php");
exit;
}
}
@@ -257,13 +260,16 @@ class Session {
if(!$this->logged_in) {
if(!in_array($page, $pagearray) || $page == "logout.php") {
header("Location: login.php");
exit;
}
} else {
if(in_array($page, $pagearray)) {
if ($this->uid == 1) {
header("Location: nachrichten.php");
exit;
} else {
header("Location: dorf1.php");
exit;
}
}
+5
View File
@@ -401,8 +401,10 @@ class Technology {
}
}
header("Location: build.php?id=".$post['id']);
exit;
}else{
header("Location: banned.php");
exit;
}
}
@@ -678,6 +680,7 @@ private function trainUnit($unit,$amt,$great=false) {
}
$session->changeChecker();
header("Location: build.php?id=".$get['id']);
exit;
}
private function upgradeSword($get) {
@@ -696,6 +699,7 @@ private function trainUnit($unit,$amt,$great=false) {
}
$session->changeChecker();
header("Location: build.php?id=".$get['id']);
exit;
}
private function upgradeArmour($get) {
@@ -714,6 +718,7 @@ private function trainUnit($unit,$amt,$great=false) {
}
$session->changeChecker();
header("Location: build.php?id=".$get['id']);
exit;
}
public function getUnitName($i) {
+15
View File
@@ -202,6 +202,7 @@ class Units {
$_SESSION['errorarray'] = $form->getErrors();
$_SESSION['valuearray'] = $_POST;
header("Location: a2b.php");
exit;
}else{
// We must return an array with $ post, which contains all the data more
// another variable that will define the flag is raised and is being sent and the type of shipping
@@ -218,6 +219,7 @@ class Units {
$_SESSION['errorarray'] = $form->getErrors();
$_SESSION['valuearray'] = $_POST;
header("Location: a2b.php");
exit;
}else{
$villageName = $database->getOasisField($id,"name");
@@ -364,6 +366,7 @@ class Units {
$_SESSION['errorarray'] = $form->getErrors();
$_SESSION['valuearray'] = $_POST;
header("Location: a2b.php");
exit;
} else {
if($session->access != BANNED){
@@ -523,11 +526,14 @@ if($session->access != BANNED){
$_SESSION['errorarray'] = $form->getErrors();
$_SESSION['valuearray'] = $_POST;
header("Location: a2b.php");
exit;
}
header("Location: build.php?id=39");
exit;
}else{
header("Location: banned.php");
exit;
}
}}
@@ -578,6 +584,7 @@ if($session->access != BANNED){
$_SESSION['errorarray'] = $form->getErrors();
$_SESSION['valuearray'] = $_POST;
header("Location: a2b.php");
exit;
} else {
//change units
@@ -654,6 +661,7 @@ if($session->access != BANNED){
$technology->checkReinf($post['ckey']);
header("Location: build.php?id=39");
exit;
}
} else {
@@ -662,10 +670,12 @@ if($session->access != BANNED){
$_SESSION['errorarray'] = $form->getErrors();
$_SESSION['valuearray'] = $_POST;
header("Location: a2b.php");
exit;
}
}
}else{
header("Location: banned.php");
exit;
}
}
@@ -684,20 +694,25 @@ header("Location: banned.php");
$database->modifyUnit($village->wid,array($unit),array(3),array(0));
$database->addMovement(5,$village->wid,$post['s'],0,time(),time()+$post['timestamp']);
header("Location: build.php?id=39");
exit;
if($form->returnErrors() > 0) {
$_SESSION['errorarray'] = $form->getErrors();
$_SESSION['valuearray'] = $_POST;
header("Location: a2b.php");
exit;
}
} else {
header("Location: build.php?id=39");
exit;
}
}else{
header("Location: dorf1.php");
exit;
}
}else{
header("Location: banned.php");
exit;
}
}
+1
View File
@@ -293,6 +293,7 @@ class Village {
if($page == "build.php" && $session->uid != $this->infoarray['owner']) {
unset($_SESSION['wid']);
header("Location: dorf1.php");
exit;
}
}
+1
View File
@@ -187,5 +187,6 @@ function showCheckList() {
<p class="btn"><input type="image" id="fbtn_ok" value="ok" name="s1" class="dynamic_img" src="img/x.gif" alt="OK" /></p></form>
<?php }else{
header("Location: banned.php");
exit;
}
?>
+1
View File
@@ -88,5 +88,6 @@ foreach($posts as $pos) {
<span style="color: #DD0000"><b>Warning:</b> you can't use the values <b>[message]</b> or <b>[/message]</b> in your post because it can cause problem with bbcode system.</span>
<?php }else{
header("Location: banned.php");
exit;
}
?>
+1
View File
@@ -255,5 +255,6 @@ if($closed1 != 0){
</p>
<?php }else{
header("Location: banned.php");
exit;
}
?>
+1
View File
@@ -47,5 +47,6 @@ $show_cat = $database->ForumCat($session->alliance);
<p class="btn"><input type="image" id="fbtn_ok" value="ok" name="s1" class="dynamic_img" src="img/x.gif" alt="OK" /></form></p>
<?php }else{
header("Location: banned.php");
exit;
}
?>
+1
View File
@@ -108,5 +108,6 @@ echo '<tr>
</p>
<?php }else{
header("Location: banned.php");
exit;
}
?>
+1
View File
@@ -139,5 +139,6 @@ Option 8: <input class="text" type="text" name="option_8" maxlength="100" style=
<span style="color: #DD0000"><b>Warning:</b> you can't use the values <b>[message]</b> or <b>[/message]</b> in your post because it can cause problem with bbcode system.</span>
<?php }else{
header("Location: banned.php");
exit;
}
?>
+1
View File
@@ -173,5 +173,6 @@ echo '<div class="clear dotted"></div><div class="text">'.$bbcode_post.'</div></
echo '</div>';
}else{
header("Location: banned.php");
exit;
}
?>
+1
View File
@@ -72,5 +72,6 @@ foreach($topics as $arr) {
<span style="color: #DD0000"><b>Warning:</b> you can't use the values <b>[message]</b> or <b>[/message]</b> in your post because it can cause problem with bbcode system.</span>
<?php }else{
header("Location: banned.php");
exit;
}
?>
+1
View File
@@ -111,5 +111,6 @@ foreach($forum_data as $cats) {
</table><p class="btn"><input type="image" value="ok" name="s1" id="fbtn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></form></p>
<?php }else{
header("Location: banned.php");
exit;
}
?>
+1
View File
@@ -83,5 +83,6 @@ foreach($topics as $top) {
<span style="color: #DD0000"><b>Warning:</b> you can't use the values <b>[message]</b> or <b>[/message]</b> in your post because it can cause problem with bbcode system.</span>
<?php }else{
header("Location: banned.php");
exit;
}
?>
+1
View File
@@ -47,5 +47,6 @@ if($session->access!=BANNED){
<?php
}else{
header("Location: banned.php");
exit;
}
?>
+2 -1
View File
@@ -11,7 +11,8 @@ $allianceinfo = $database->getAlliance($aid);
$memberlist = $database->getAllMember($aid);
$totalpop = 0;
if($allianceinfo['tag']==""){
header("Location: allianz.php");
header("Location: allianz.php");
exit;
}
foreach($memberlist as $member) {
$totalpop += $database->getVSumField($member['id'],"pop");
+6 -2
View File
@@ -4,8 +4,10 @@ if($_REQUEST["cancel"] == "1") {
if($session->access != BANNED){
$database->delDemolition($village->wid);
header("Location: build.php?gid=15&ty=$ty&cancel=0&demolish=0");
exit;
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
@@ -16,9 +18,11 @@ if($session->access != BANNED){
$database->addDemolition($village->wid,$type);
$session->changeChecker();
header("Location: build.php?gid=15&ty=$type&cancel=0&demolish=0");
exit;
}
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
+1
View File
@@ -266,5 +266,6 @@ function testSum() {
<?php
}else{
header("Location: build.php?id=".$_GET['id']."");
exit;
}
?>
+1
View File
@@ -70,5 +70,6 @@ echo "".TRADE_ROUTE_TO." <a href=karte.php?d=".$route['wid']."&c=".$generator->g
<?php
}}else{
header("Location: build.php?id=".$_GET['id']."");
exit;
}
?>
+22 -11
View File
@@ -45,7 +45,8 @@ if (isset($_POST['name'])) {
if($session->access != BANNED){
echo "<a href=\"build.php?id=".$id."&add=off\">(<b>+</b>)</a>";
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}else {
echo "<span class=\"none\">(+)</span>";
@@ -64,7 +65,8 @@ if (isset($_POST['name'])) {
if($session->access != BANNED){
echo "<a href=\"build.php?id=".$id."&add=deff\">(<b>+</b>)</a>";
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}else {
echo "<span class=\"none\">(+)</span>";
@@ -83,7 +85,8 @@ if (isset($_POST['name'])) {
if($session->access != BANNED){
echo "<a href=\"build.php?id=".$id."&add=obonus\">(<b>+</b>)</a>";
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}else {
@@ -103,7 +106,8 @@ if (isset($_POST['name'])) {
if($session->access != BANNED){
echo "<a href=\"build.php?id=".$id."&add=dbonus\">(<b>+</b>)</a>";
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}else {
@@ -123,7 +127,8 @@ if (isset($_POST['name'])) {
if($session->access != BANNED){
echo "<a href=\"build.php?id=".$id."&add=reg\">(<b>+</b>)</a>";
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}else {
@@ -176,7 +181,8 @@ if (isset($_POST['name'])) {
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "hero SET `attackbonus` = '0' WHERE `uid` = '" . $database->escape($session->uid) . "'");
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "hero SET `defencebonus` = '0' WHERE `uid` = '" . $database->escape($session->uid) . "'");
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "hero SET `regeneration` = '0' WHERE `uid` = '" . $database->escape($session->uid) . "'");
header("Location: build.php?id=".$id."");
header("Location: build.php?id=".$id."");
exit;
}
}
}
@@ -184,35 +190,40 @@ if (isset($_POST['name'])) {
if($hero_info['points'] > 0) {
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "hero SET `attack` = `attack` + 1 WHERE `uid` = '" . $database->escape($session->uid) . "'");
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "hero SET `points` = `points` - 1 WHERE `uid` = '" . $database->escape($session->uid) . "'");
header("Location: build.php?id=".$id."");
header("Location: build.php?id=".$id."");
exit;
}
}
if($_GET['add'] == "deff" && $hero_info['defence'] < 100) {
if($hero_info['points'] > 0) {
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "hero SET `defence` = `defence` + 1 WHERE `uid` = '" . $database->escape($session->uid) . "'");
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "hero SET `points` = `points` - 1 WHERE `uid` = '" . $database->escape($session->uid) . "'");
header("Location: build.php?id=".$id."");
header("Location: build.php?id=".$id."");
exit;
}
}
if($_GET['add'] == "obonus" && $hero_info['attackbonus'] < 100) {
if($hero_info['points'] > 0) {
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "hero SET `attackbonus` = `attackbonus` + 1 WHERE `uid` = '" . $database->escape($session->uid) . "'");
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "hero SET `points` = `points` - 1 WHERE `uid` = '" . $database->escape($session->uid) . "'");
header("Location: build.php?id=".$id."");
header("Location: build.php?id=".$id."");
exit;
}
}
if($_GET['add'] == "dbonus" && $hero_info['defencebonus'] < 100) {
if($hero_info['points'] > 0) {
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "hero SET `defencebonus` = `defencebonus` + 1 WHERE `uid` = '" . $database->escape($session->uid) . "'");
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "hero SET `points` = `points` - 1 WHERE `uid` = '" . $database->escape($session->uid) . "'");
header("Location: build.php?id=".$id."");
header("Location: build.php?id=".$id."");
exit;
}
}
if($_GET['add'] == "reg" && $hero_info['regeneration'] < 100) {
if($hero_info['points'] > 0) {
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "hero SET `regeneration` = `regeneration` + 1 WHERE `uid` = '" . $database->escape($session->uid) . "'");
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "hero SET `points` = `points` - 1 WHERE `uid` = '" . $database->escape($session->uid) . "'");
header("Location: build.php?id=".$id."");
header("Location: build.php?id=".$id."");
exit;
}
}
}
+2
View File
@@ -7,8 +7,10 @@ if($_GET['gid']==37 && isset($_GET['del'])){
if($session->access != BANNED){
$database->removeOases($_GET['del']);
header("Location: build.php?id=".$id."&land");
exit;
}else{
header("Location: banned.php");
exit;
}
}
?>
+3 -1
View File
@@ -177,8 +177,10 @@
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "vdata SET `iron` = `iron` - ".(int) $iron ." WHERE `wref` = '" . (int) $village->wid . "'");
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "vdata SET `crop` = `crop` - ".(int) $crop." WHERE `wref` = '" . (int) $village->wid . "'");
header("Location: build.php?id=".$id."");
exit;
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
if($hero_info['inrevive'] == 0 && $hero_info['intraining'] == 0) {
+45 -15
View File
@@ -543,8 +543,10 @@ $output.="<tr>
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "vdata SET `crop` = `crop` - ".(int) $u1['crop']." WHERE `wref` = '" . (int) $village->wid . "'");
}
header("Location: build.php?id=".$id."");
exit;
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
if($_GET['train'] == 2){
@@ -559,8 +561,10 @@ $output.="<tr>
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "vdata SET `crop` = `crop` - ".(int) $u2['crop']." WHERE `wref` = '" . (int) $village->wid . "'");
}
header("Location: build.php?id=".$id."");
exit;
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
if($_GET['train'] == 3){
@@ -573,8 +577,10 @@ $output.="<tr>
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "vdata SET `iron` = `iron` - ".(int) $u3['iron']." WHERE `wref` = '" . (int) $village->wid . "'");
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "vdata SET `crop` = `crop` - ".(int) $u3['crop']." WHERE `wref` = '" . (int) $village->wid . "'");
header("Location: build.php?id=".$id."");
exit;
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
if($_GET['train'] == 5){
@@ -589,8 +595,10 @@ $output.="<tr>
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "vdata SET `crop` = `crop` - ".(int) $u5['crop']." WHERE `wref` = '" . (int) $village->wid . "'");
}
header("Location: build.php?id=".$id."");
exit;
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
if($_GET['train'] == 6){
@@ -605,8 +613,10 @@ $output.="<tr>
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "vdata SET `crop` = `crop` - ".(int) $u6['crop']." WHERE `wref` = '" . (int) $village->wid . "'");
}
header("Location: build.php?id=".$id."");
exit;
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
}
@@ -623,8 +633,10 @@ $output.="<tr>
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "vdata SET `crop` = `crop` - ".(int) $u11['crop']." WHERE `wref` = '" . (int) $village->wid . "'");
}
header("Location: build.php?id=".$id."");
exit;
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
if($_GET['train'] == 12){
@@ -639,8 +651,10 @@ $output.="<tr>
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "vdata SET `crop` = `crop` - ".(int) $u12['crop']." WHERE `wref` = '" . (int) $village->wid . "'");
}
header("Location: build.php?id=".$id."");
exit;
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
if($_GET['train'] == 13){
@@ -655,8 +669,10 @@ $output.="<tr>
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "vdata SET `crop` = `crop` - ".(int) $u13['crop']." WHERE `wref` = '" . (int) $village->wid . "'");
}
header("Location: build.php?id=".$id."");
exit;
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
if($_GET['train'] == 15){
@@ -671,8 +687,10 @@ $output.="<tr>
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "vdata SET `crop` = `crop` - ".(int) $u15['crop']." WHERE `wref` = '" . (int) $village->wid . "'");
}
header("Location: build.php?id=".$id."");
exit;
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
if($_GET['train'] == 16){
@@ -687,8 +705,10 @@ $output.="<tr>
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "vdata SET `crop` = `crop` - ".(int) $u16['crop']." WHERE `wref` = '" . (int) $village->wid . "'");
}
header("Location: build.php?id=".$id."");
exit;
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
}
@@ -705,8 +725,10 @@ $output.="<tr>
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "vdata SET `crop` = `crop` - ".(int) $u21['crop']." WHERE `wref` = '" . (int) $village->wid . "'");
}
header("Location: build.php?id=".$id."");
exit;
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
if($_GET['train'] == 22){
@@ -721,8 +743,10 @@ $output.="<tr>
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "vdata SET `crop` = `crop` - ".(int) $u22['crop']." WHERE `wref` = '" . (int) $village->wid . "'");
}
header("Location: build.php?id=".$id."");
exit;
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
if($_GET['train'] == 24){
@@ -737,8 +761,10 @@ $output.="<tr>
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "vdata SET `crop` = `crop` - ".(int) $u24['crop']." WHERE `wref` = '" . (int) $village->wid . "'");
}
header("Location: build.php?id=".$id."");
exit;
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
if($_GET['train'] == 25){
@@ -753,8 +779,10 @@ $output.="<tr>
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "vdata SET `crop` = `crop` - ".(int) $u25['crop']." WHERE `wref` = '" . (int) $village->wid . "'");
}
header("Location: build.php?id=".$id."");
exit;
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
if($_GET['train'] == 26){
@@ -769,8 +797,10 @@ $output.="<tr>
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "vdata SET `crop` = `crop` - ".(int) $u26['crop']." WHERE `wref` = '" . (int) $village->wid . "'");
}
header("Location: build.php?id=".$id."");
exit;
}else{
header("Location: banned.php");
header("Location: banned.php");
exit;
}
}
}
+1
View File
@@ -61,5 +61,6 @@ $building->loadBuilding();
<?php }else{
$the_link = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
header('Location: '. $the_link);
exit;
} ?>
+2
View File
@@ -23,7 +23,9 @@ if($session->access != BANNED && $session->gold >= 5){
}
}
header("Location: plus.php?id=3");
exit;
} else {
header("Location: banned.php");
exit;
}
?>
+2
View File
@@ -23,7 +23,9 @@ if($session->access != BANNED && $session->gold >= 5){
}
}
header("Location: plus.php?id=3");
exit;
} else {
header("Location: banned.php");
exit;
}
?>
+2
View File
@@ -23,7 +23,9 @@ if($session->access != BANNED && $session->gold >= 5){
}
}
header("Location: plus.php?id=3");
exit;
} else {
header("Location: banned.php");
exit;
}
?>
+2
View File
@@ -27,7 +27,9 @@ echo "failed";
}
header("Location: plus.php?id=3");
exit;
}else{
header("Location: banned.php");
exit;
}
?>
+2
View File
@@ -5,8 +5,10 @@ if($session->gold >= 100 && $session->sit == 0 && $session->goldclub == 0) {
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users set goldclub = 1, gold = gold - 100 where `id`='".$session->uid."'");
}
header("Location: plus.php?id=3");
exit;
}else{
header("Location: banned.php");
exit;
}
?>
+2
View File
@@ -2,7 +2,9 @@
if($session->access!=BANNED){
$building->finishAll();
header("Location: plus.php?id=3");
exit;
}else{
header("Location: banned.php");
exit;
}
?>
+2
View File
@@ -23,7 +23,9 @@ if($session->access != BANNED && $session->gold >= 10){
}
}
header("Location: plus.php?id=3");
exit;
} else {
header("Location: banned.php");
exit;
}
?>
+2
View File
@@ -23,7 +23,9 @@ if($session->access != BANNED && $session->gold >= 5){
}
}
header("Location: plus.php?id=3");
exit;
} else {
header("Location: banned.php");
exit;
}
?>
+1
View File
@@ -102,5 +102,6 @@ $database->updateUserField($session->uid,gpack,$_POST["custom_url"],1);
<?php
}else{
header("Location: ".$_SERVER['PHP_SELF']."?uid=".$session->uid);
exit;
}
?>
+2 -1
View File
@@ -1,2 +1,3 @@
<?php
header("Location: dorf1.php");
header("Location: dorf1.php");
exit;
+2
View File
@@ -2,6 +2,7 @@
if(isset($_GET['del']) && is_numeric($_GET['del'])){
$database->removeLinks($_GET['del'],$session->uid);
header("Location: spieler.php?s=2");
exit;
}
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
@@ -55,6 +56,7 @@ if($_POST) {
$query = mysqli_query($GLOBALS['link'],'INSERT INTO `' . TB_PREFIX . 'links` (`userid`, `name`, `url`, `pos`) VALUES (' . $userid . ', \'' . $link['linkname'] . '\', \'' . $link['linkziel'] . '\', ' . $link['nr'] . ')');
}else{
header("Location: banned.php");
exit;
}
} elseif(trim($link['nr']) != '' AND trim($link['linkname']) != '' AND trim($link['linkziel']) != '' AND trim($link['id']) != '') {
// Update link
+2 -1
View File
@@ -47,6 +47,7 @@ if (WW == True)
}
else
{
header("Location: statistiken.php");
header("Location: statistiken.php");
exit;
}
?>
+1
View File
@@ -98,4 +98,5 @@
}
}
header("Location: build.php?id=39&t=99");
exit;
?>
+1
View File
@@ -6,6 +6,7 @@ if(isset($_GET['t'])==99 && isset($_POST['action'])=='addList' && $_POST['did']!
$database->createFarmList($_POST['did'], $session->uid, $_POST['name']);
}else if(isset($_GET['t'])==99 && isset($_POST['action'])=='addList'){
header("Location: build.php?gid=16&t=99&action=addList");
exit;
}
$sql = mysqli_query($GLOBALS['link'],"SELECT * FROM ".TB_PREFIX."farmlist WHERE owner = ".(int) $session->uid." ORDER BY wref = $village->wid DESC");
+2
View File
@@ -62,6 +62,7 @@ $vdata = $database->getVillage($Wref);
$database->addSlotFarm($_POST['lid'], $Wref, $WrefX, $WrefY, $distance, $_POST['t1'], $_POST['t2'], $_POST['t3'], $_POST['t4'], $_POST['t5'], $_POST['t6'], $_POST['t7'], $_POST['t8'], $_POST['t9'], $_POST['t10']);
header("Location: build.php?id=39&t=99");
exit;
}
}
?>
@@ -159,5 +160,6 @@ $vill[$towref] = 1;
<?php
}else{
header("Location: build.php?id=39&t=99");
exit;
}
?>
+2
View File
@@ -64,6 +64,7 @@ $troops = "".$_POST['t1']."+".$_POST['t2']."+".$_POST['t3']."+".$_POST['t4']."+"
$database->editSlotFarm($_GET['eid'], $_POST['lid'], $Wref, $WrefX, $WrefY, $distance, $_POST['t1'], $_POST['t2'], $_POST['t3'], $_POST['t4'], $_POST['t5'], $_POST['t6'], $_POST['t7'], $_POST['t8'], $_POST['t9'], $_POST['t10']);
header("Location: build.php?id=39&t=99");
exit;
}
}
if($FLData['owner'] == $session->uid){
@@ -166,5 +167,6 @@ $vill[$towref] = 1;
<?php
}else{
header("Location: build.php?id=39&t=99");
exit;
}
?>
+8 -1
View File
@@ -16,18 +16,23 @@ if(isset($_GET['newdid'])) {
$_SESSION['wid'] = $_GET['newdid'];
if(isset($_GET['w'])) {
header("Location: ".$_SERVER['PHP_SELF']."?w=".$_GET['w']);
exit;
}
else if(isset($_GET['r'])) {
header("Location: ".$_SERVER['PHP_SELF']."?r=".$_GET['r']);
exit;
}
else if(isset($_GET['o'])) {
header("Location: ".$_SERVER['PHP_SELF']."?o=".$_GET['o']);
exit;
}
else if(isset($_GET['z'])) {
header("Location: ".$_SERVER['PHP_SELF']."?z=".$_GET['z']);
exit;
}
else if($_GET['id']!=0){
header("Location: ".$_SERVER['PHP_SELF']);
exit;
}
}
else {
@@ -219,7 +224,9 @@ if(isset($_GET['o'])) {
$database->modifyUnit($prisoner['wref'],array("99o"),array($troops),array(0));
$database->deletePrisoners($prisoner['id']);
}
header("Location: build.php?id=39");} else {
header("Location: build.php?id=39");
exit;
} else {
if(isset($process['0'])) {
$coor = $database->getCoor($process['0']);
include ("Templates/a2b/attack.tpl");
+1
View File
@@ -17,6 +17,7 @@ $start = $generator->pageLoadTimeStart();
if(isset($_GET['newdid'])) {
$_SESSION['wid'] = $_GET['newdid'];
header("Location: ".$_SERVER['PHP_SELF']);
exit;
}
else {
$building->procBuild($_GET);
+1
View File
@@ -16,4 +16,5 @@
## ##
#################################################################################
header("Location: terms.php");
exit;
?>
+10
View File
@@ -9,10 +9,13 @@ 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;
}else if(isset($_GET['aid'])){
header("Location: ".$_SERVER['PHP_SELF']."?aid=".preg_replace("/[^a-zA-Z0-9_-]/","",$_GET['aid']));
exit;
}else{
header("Location: ".$_SERVER['PHP_SELF']);
exit;
}
}
if(isset($_GET['s'])){
@@ -26,6 +29,7 @@ if(isset($_GET['fid'])){
if($forum_type['forum_name'] != "" && $forum_type['forum_area'] == 0){
if($forum_type['alliance'] != $session->alliance){
header("Location: ".$_SERVER['PHP_SELF']);
exit;
}
}
}else if(isset($_GET['fid2'])){
@@ -37,17 +41,21 @@ if(isset($_GET['fid'])){
if($forum_type['forum_area'] == 0){
if($forum_type['alliance'] != $session->alliance){
header("Location: ".$_SERVER['PHP_SELF']);
exit;
}
}else if($forum_type['forum_area'] == 2){
if($forum_type['alliance'] != $session->alliance){
header("Location: ".$_SERVER['PHP_SELF']);
exit;
}
}else if($forum_type['forum_area'] == 3){
if($forum_type['alliance'] != $session->alliance){
header("Location: ".$_SERVER['PHP_SELF']);
exit;
}
}else{
header("Location: ".$_SERVER['PHP_SELF']);
exit;
}
}
}
@@ -220,6 +228,7 @@ $invite_permission = $database->getAlliancePermission($session->uid, "opt4", 0);
// Options
}else{
header("Location: ".$_SERVER['PHP_SELF']);
exit;
}}else if(isset($_GET['delinvite']) && $invite_permission == 1){
include ("Templates/Alliance/invite.tpl");
} elseif(isset($_POST['o'])) {
@@ -367,5 +376,6 @@ include("Templates/links.tpl");
<?php
}else{
header("Location: spieler.php?uid=".$session->uid);
exit;
}
?>
+1 -1
View File
@@ -93,4 +93,4 @@ echo round(($generator->pageLoadTimeEnd()-$start)*1000);
</html>
<?php
}
else{header("Location: dorf1.php");}?>
else{header("Location: dorf1.php");exit;}?>
+4
View File
@@ -18,12 +18,16 @@ if(isset($_GET['newdid'])) {
$_SESSION['wid'] = $_GET['newdid'];
if(isset($_GET['t'])) {
header("Location: ".$_SERVER['PHP_SELF']."?t=".$_GET['t']);
exit;
}else if(isset($_GET['vill']) && isset($_GET['id'])) {
header("Location: ".$_SERVER['PHP_SELF']."?id=".$_GET['id']."&vill=".$_GET['vill']."");
exit;
}else if($_GET['id']!=0) {
header("Location: ".$_SERVER['PHP_SELF']."?id=".$_GET['id']);
exit;
}else{
header("Location: ".$_SERVER['PHP_SELF']);
exit;
}
}
?>
+24
View File
@@ -16,9 +16,11 @@ include_once("GameEngine/Units.php");
if(isset($_GET['newdid'])) {
$_SESSION['wid'] = $_GET['newdid'];
header("Location: ".$_SERVER['PHP_SELF'].(isset($_GET['id'])?'?id='.$_GET['id']:(isset($_GET['gid'])?'?gid='.$_GET['gid']:'')));
exit;
}
if($_GET['id'] == 99 && $village->natar == 0){
header("Location: dorf2.php");
exit;
}
$pagestart = $generator->pageLoadTimeStart();
@@ -78,15 +80,18 @@ if($session->goldclub == 1 && count($session->villages) > 1){
if($totalres > 0){
$database->createTradeRoute($session->uid,$_POST['tvillage'],$village->wid,$_POST['r1'],$_POST['r2'],$_POST['r3'],$_POST['r4'],$_POST['start'],$_POST['deliveries'],$reqMerc,$timestamp);
header("Location: build.php?gid=17&t=4");
exit;
$route = 1;
}else{
header("Location: build.php?gid=17&t=4&create");
exit;
$route = 1;
}
}
}else{
$route = 0;
header("Location: banned.php");
exit;
}
}
if(isset($_GET['action']) && $_GET['action'] == 'extendRoute') {
@@ -98,20 +103,24 @@ if($session->goldclub == 1 && count($session->villages) > 1){
$newgold = $session->gold-2;
$database->updateUserField($session->uid,'gold',$newgold,1);
header("Location: build.php?gid=17&t=4");
exit;
$route = 1;
unset($routeid);
}else{
header("Location: build.php?gid=17&t=4");
exit;
$route = 1;
unset($routeid);
}
}else{
header("Location: build.php?gid=17&t=4");
exit;
$route = 1;
}
}else{
$route = 0;
header("Location: banned.php");
exit;
}
}
if(isset($_POST['action']) && $_POST['action'] == 'editRoute') {
@@ -138,11 +147,13 @@ if($session->goldclub == 1 && count($session->villages) > 1){
$database->editTradeRoute($_POST['routeid'],"timestamp",$timestamp,0);
}
header("Location: build.php?gid=17&t=4");
exit;
$route = 1;
unset($routeid);
}else{
$route = 0;
header("Location: banned.php");
exit;
}
}
if(isset($_GET['action']) && $_GET['action'] == 'delRoute') {
@@ -151,16 +162,19 @@ if($session->goldclub == 1 && count($session->villages) > 1){
if($traderoute == $session->uid){
$database->deleteTradeRoute($_GET['routeid']);
header("Location: build.php?gid=17&t=4");
exit;
$route = 1;
unset($routeid);
}else{
header("Location: build.php?gid=17&t=4");
exit;
$route = 1;
unset($routeid);
}
}else{
$route = 0;
header("Location: banned.php");
exit;
}
}
}
@@ -187,15 +201,18 @@ if($session->goldclub == 1){
if($_GET['action'] == 'deleteList') {
$database->delFarmList($_GET['lid'], $session->uid);
header("Location: build.php?id=39&t=99");
exit;
}elseif($_GET['action'] == 'deleteSlot') {
$database->delSlotFarm($_GET['eid']);
header("Location: build.php?id=39&t=99");
exit;
}
if($_POST['action'] == 'startRaid'){
if($session->access != BANNED){
include ("Templates/a2b/startRaid.tpl");
}else{
header("Location: banned.php");
exit;
}
}
@@ -212,11 +229,13 @@ if($session->goldclub == 1){
$database->setVillageEvasion($_GET['evasion']);
}
header("Location: build.php?id=39&t=99");
exit;
}
if(isset($_POST['maxevasion']) && is_numeric($_POST['maxevasion'])) {
$database->updateUserField($session->uid, "maxevasion", $_POST['maxevasion'], 1);
header("Location: build.php?id=39&t=99");
exit;
}
}
}else{
@@ -228,6 +247,7 @@ if($session->access != BANNED){
$units->Settlers($_POST);
}else{
header("Location: banned.php");
exit;
}
}
if($_GET['mode']=='troops' && $_GET['cancel']==1){
@@ -257,8 +277,10 @@ $resultc=$database->query($qc) or die(mysqli_error($database->dblink));
}
}
header("Location: ".$_SERVER['PHP_SELF']."?id=".$_GET['id']);
exit;
}else{
header("Location: banned.php");
exit;
}
}
if(isset($_GET['id'])){
@@ -349,11 +371,13 @@ if(isset($_GET['id']) or isset($_GET['gid']) or $route == 1 or isset($_GET['rout
if($session->gold >= 2) {
$building->finishAll();
header("Location: build.php?gid=".$_GET['id']."&ty=".$_GET['ty']);
exit;
}
}
}
}else{
header("Location: ".$_SERVER['PHP_SELF']."?id=39");
exit;
}
?>
+3 -1
View File
@@ -12,6 +12,7 @@ include("GameEngine/Village.php");
if(isset($_GET['newdid'])){
$_SESSION['wid'] = $_GET['newdid'];
header("Location: ".$_SERVER['PHP_SELF']);
exit;
}
if($village->resarray['f'.$_GET['id'].'t'] == 24 and $village->currentcel == 0){
if(!empty($_GET['type']) && $_GET['type'] == 1){
@@ -37,4 +38,5 @@ if($village->resarray['f'.$_GET['id'].'t'] == 24 and $village->currentcel == 0){
}
}
}
header("Location: build.php?id=".$_GET['id']);
header("Location: build.php?id=".$_GET['id']);
exit;
+4
View File
@@ -12,14 +12,18 @@
if($session->goldclub == 0) {
header("Location: plus.php?id=3");
exit;
}
if($_POST['type'] == 15) {
header("Location: ".$_SERVER['PHP_SELF']."?s=1&x=" . preg_replace("/[^a-zA-Z0-9_-]/","",$_POST['x']) . '&y=' . preg_replace("/[^a-zA-Z0-9_-]/","",$_POST['y']));
exit;
} elseif($_POST['type'] == 9) {
header("Location: ".$_SERVER['PHP_SELF']."?s=2&x=" . preg_replace("/[^a-zA-Z0-9_-]/","",$_POST['x']) . '&y=' . preg_replace("/[^a-zA-Z0-9_-]/","",$_POST['y']));
exit;
} elseif($_POST['type'] == 'both') {
header("Location: ".$_SERVER['PHP_SELF']."?s=3&x=" . preg_replace("/[^a-zA-Z0-9_-]/","",$_POST['x']) . '&y=' . preg_replace("/[^a-zA-Z0-9_-]/","",$_POST['y']));
exit;
}
?>
+1
View File
@@ -18,6 +18,7 @@ if(isset($_GET['newdid'])) {
$_SESSION['wid'] = $_GET['newdid'];
$database->query("UPDATE ".TB_PREFIX."users SET village_select=".$database->escape((int) $_GET['newdid'])." WHERE id=".$session->uid);
header("Location: ".$_SERVER['PHP_SELF']);
exit;
} else {
$building->procBuild($_GET);
}
+1
View File
@@ -15,6 +15,7 @@ if(isset($_GET['newdid'])) {
$_SESSION['wid'] = $_GET['newdid'];
$database->query("UPDATE ".TB_PREFIX."users SET village_select=".$database->escape((int) $_GET['newdid'])." WHERE id=".$session->uid);
header("Location: ".$_SERVER['PHP_SELF']);
exit;
}else{
$building->procBuild($_GET);
}
+2
View File
@@ -18,8 +18,10 @@ if(isset($_GET['newdid'])) {
$database->query("UPDATE ".TB_PREFIX."users SET village_select=".$database->escape((int) $_GET['newdid'])." WHERE id=".$session->uid);
if(isset($_GET['s'])){
header("Location: ".$_SERVER['PHP_SELF']."?s=".$_GET['s']);
exit;
}else{
header("Location: ".$_SERVER['PHP_SELF']);
exit;
}
}
?>
+4
View File
@@ -17,12 +17,15 @@ if(isset($_GET['newdid'])) {
$_SESSION['wid'] = $_GET['newdid'];
if(isset($_GET['d']) && isset($_GET['c'])){
header("Location: ".$_SERVER['PHP_SELF']."?d=".preg_replace("/[^a-zA-Z0-9_-]/","",$_GET['d'])."&c=".preg_replace("/[^a-zA-Z0-9_-]/","",$_GET['c']));
exit;
}
else if(isset($_GET['d'])){
header("Location: ".$_SERVER['PHP_SELF']."?d=".preg_replace("/[^a-zA-Z0-9_-]/","",$_GET['d']));
exit;
}
else{
header("Location: ".$_SERVER['PHP_SELF']);
exit;
}
} else {
$building->procBuild($_GET);
@@ -76,6 +79,7 @@ if(isset($_GET['d']) && isset($_GET['c'])) {
}
else {
header("Location: dorf1.php");
exit;
}
}
else {
+1 -1
View File
@@ -36,4 +36,4 @@ if($session->plus){
</html>
<?php
}
else{header("Location: karte.php");}?>
else{header("Location: karte.php");exit;}?>
+1
View File
@@ -16,6 +16,7 @@ include("GameEngine/Account.php");
if(isset($_GET['del_cookie'])) {
setcookie("COOKUSR","",time()-3600*24,"/");
header("Location: login.php");
exit;
}
if(!isset($_COOKIE['COOKUSR'])) {
$_COOKIE['COOKUSR'] = "";
+4 -1
View File
@@ -71,7 +71,10 @@ if (isset($_GET['send']) && isset($_GET['from']))
}
}
mysqli_query($GLOBALS['link'],$sql);
if (($users_count - $_GET['from']) > $max_per_pass) echo header("Location: massmessage.php?send=true&from=",$_GET['from'] + $max_per_pass); else $done = true;
if (($users_count - $_GET['from']) > $max_per_pass) {
header("Location: massmessage.php?send=true&from=",$_GET['from'] + $max_per_pass);
exit;
} else $done = true;
}
?>
+5
View File
@@ -21,10 +21,13 @@ if(isset($_GET['newdid'])) {
$_SESSION['wid'] = $_GET['newdid'];
if(isset($_GET['t'])) {
header("Location: ".$_SERVER['PHP_SELF']."?t=".$_GET['t']);
exit;
}else if($_GET['id']!=0) {
header("Location: ".$_SERVER['PHP_SELF']."?id=".$_GET['id']);
exit;
}else{
header("Location: ".$_SERVER['PHP_SELF']);
exit;
}
}
if(isset($_GET['delfriend']) && is_numeric($_GET['delfriend'])){
@@ -44,6 +47,7 @@ $database->deleteFriend($session->uid,"friend".$_GET['delfriend']);
$database->deleteFriend($session->uid,"friend".$_GET['delfriend']."wait");
$database->checkFriends($session->uid);
header("Location: ".$_SERVER['PHP_SELF']."?t=1");
exit;
}
if(isset($_GET['confirm']) && is_numeric($_GET['confirm'])){
$myid = $database->getUserArray($session->uid, 1);
@@ -59,6 +63,7 @@ $added = 1;
$database->addFriend($session->uid,"friend".$_GET['confirm'],$wait['id']);
$database->addFriend($session->uid,"friend".$_GET['confirm']."wait",0);
header("Location: ".$_SERVER['PHP_SELF']."?t=1");
exit;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+1
View File
@@ -159,5 +159,6 @@ if(T4_COMING==true){
<?php
}else{
header("Location: ../index.php");
exit;
}
?>
+1 -1
View File
@@ -110,4 +110,4 @@ echo round(($generator->pageLoadTimeEnd()-$start)*1000);
</html>
<?php
}
else{header("Location: banned.php");}?>
else{header("Location: banned.php");exit;}?>
+1
View File
@@ -16,6 +16,7 @@ $start = $generator->pageLoadTimeStart();
if(isset($_GET['newdid'])) {
$_SESSION['wid'] = $_GET['newdid'];
header("Location: ".$_SERVER['PHP_SELF']);
exit;
}
else {
$building->procBuild($_GET);
+1
View File
@@ -5,6 +5,7 @@ $start = $generator->pageLoadTimeStart();
if(isset($_GET['newdid'])) {
$_SESSION['wid'] = $_GET['newdid'];
header("Location: ".$_SERVER['PHP_SELF']);
exit;
}
else {
$building->procBuild($_GET);
+1
View File
@@ -16,6 +16,7 @@ $start = $generator->pageLoadTimeStart();
if(isset($_GET['newdid'])) {
$_SESSION['wid'] = $_GET['newdid'];
header("Location: ".$_SERVER['PHP_SELF']);
exit;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+4
View File
@@ -18,10 +18,13 @@ 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;
}else if(isset($_GET['uid'])){
header("Location: ".$_SERVER['PHP_SELF']."?uid=".preg_replace("/[^a-zA-Z0-9_-]/","",$_GET['uid']));
exit;
}else{
header("Location: ".$_SERVER['PHP_SELF']);
exit;
}
}
else {
@@ -152,6 +155,7 @@ else if (isset($_GET['s'])) {
}
if($_GET['s'] > 5 or $session->sit == 1) {
header("Location: ".$_SERVER['PHP_SELF']."?uid=".preg_replace("/[^a-zA-Z0-9_-]/","",$session->uid));
exit;
}
}
?>
+1
View File
@@ -21,6 +21,7 @@ $ranking->procRank($_POST);
if(isset($_GET['newdid'])) {
$_SESSION['wid'] = $_GET['newdid'];
header("Location: ".$_SERVER['PHP_SELF']."?id=".$_GET['id']);
exit;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+1
View File
@@ -15,6 +15,7 @@ $start = $generator->pageLoadTimeStart();
if(isset($_GET['newdid'])) {
$_SESSION['wid'] = $_GET['newdid'];
header("Location: ".$_SERVER['PHP_SELF']);
exit;
}
else {
$building->procBuild($_GET);
+1
View File
@@ -17,6 +17,7 @@ $start = $generator->pageLoadTimeStart();
if(isset($_GET['newdid'])) {
$_SESSION['wid'] = $_GET['newdid'];
header("Location: ".$_SERVER['PHP_SELF']);
exit;
}
else {
$building->procBuild($_GET);
+2
View File
@@ -31,6 +31,7 @@ $start = $generator->pageLoadTimeStart();
if(isset($_GET['newdid'])) {
$_SESSION['wid'] = $_GET['newdid'];
header("Location: ".$_SERVER['PHP_SELF']);
exit;
}
else {
$building->procBuild($_GET);
@@ -262,5 +263,6 @@ $q = "
<?php
}else{
header("Location: dorf1.php");
exit;
}
?>