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
+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;
}
?>