mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-17 00:31:02 +00:00
fix: undefined indexes
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
$ty=(isset($_GET['ty']))? $_GET['ty']:"";
|
$ty=(isset($_GET['ty']))? $_GET['ty']:"";
|
||||||
if($_REQUEST["cancel"] == "1") {
|
if(isset($_REQUEST["cancel"]) && $_REQUEST["cancel"] == "1") {
|
||||||
if($session->access != BANNED){
|
if($session->access != BANNED){
|
||||||
$database->delDemolition($village->wid);
|
$database->delDemolition($village->wid);
|
||||||
header("Location: build.php?gid=15&ty=$ty&cancel=0&demolish=0");
|
header("Location: build.php?gid=15&ty=$ty&cancel=0&demolish=0");
|
||||||
|
|||||||
@@ -269,7 +269,7 @@ if($armoury == 0 && ($mainbuilding <= 2 || $academy == 0)) {
|
|||||||
if($cropland <= 4) {
|
if($cropland <= 4) {
|
||||||
include("soon/grainmill.tpl");
|
include("soon/grainmill.tpl");
|
||||||
}
|
}
|
||||||
if($marketplace == 0 && ($mainbuilding <= 2 || $granary <= 0 || $warehouse <= 0)) {
|
if(isset($marketplace) && $marketplace == 0 && ($mainbuilding <= 2 || $granary <= 0 || $warehouse <= 0)) {
|
||||||
include("soon/marketplace.tpl");
|
include("soon/marketplace.tpl");
|
||||||
}
|
}
|
||||||
if($residence == 0 && $mainbuilding <= 4) {
|
if($residence == 0 && $mainbuilding <= 4) {
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ if(isset($_GET['newdid'])) {
|
|||||||
header("Location: ".$_SERVER['PHP_SELF'].(isset($_GET['id'])?'?id='.$_GET['id']:(isset($_GET['gid'])?'?gid='.$_GET['gid']:'')));
|
header("Location: ".$_SERVER['PHP_SELF'].(isset($_GET['id'])?'?id='.$_GET['id']:(isset($_GET['gid'])?'?gid='.$_GET['gid']:'')));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
if($_GET['id'] == 99 && $village->natar == 0){
|
if(isset($_GET['id']) && $_GET['id'] == 99 && $village->natar == 0){
|
||||||
header("Location: dorf2.php");
|
header("Location: dorf2.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@@ -185,33 +185,33 @@ if($session->goldclub == 1 && count($session->villages) > 1){
|
|||||||
if($session->goldclub == 1){
|
if($session->goldclub == 1){
|
||||||
if(isset($_GET['t'])==99) {
|
if(isset($_GET['t'])==99) {
|
||||||
|
|
||||||
if($_GET['action'] == 'addList') {
|
if(isset($_GET['action']) && $_GET['action'] == 'addList') {
|
||||||
$create = 1;
|
$create = 1;
|
||||||
}else if($_GET['action'] == 'addraid') {
|
}else if(isset($_GET['action']) && $_GET['action'] == 'addraid') {
|
||||||
$create = 2;
|
$create = 2;
|
||||||
}else if($_GET['action'] == 'showSlot' && $_GET['eid']) {
|
}else if(isset($_GET['action']) && $_GET['action'] == 'showSlot' && $_GET['eid']) {
|
||||||
$create = 3;
|
$create = 3;
|
||||||
}else{
|
}else{
|
||||||
$create = 0;
|
$create = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($_GET['slid']) {
|
if(isset($_GET['slid']) && $_GET['slid']) {
|
||||||
$FLData = $database->getFLData($_GET['slid']);
|
$FLData = $database->getFLData($_GET['slid']);
|
||||||
if($FLData['owner'] == $session->uid){
|
if($FLData['owner'] == $session->uid){
|
||||||
$checked[$_GET['slid']] = 1;
|
$checked[$_GET['slid']] = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($_GET['action'] == 'deleteList') {
|
if(isset($_GET['action']) && $_GET['action'] == 'deleteList') {
|
||||||
$database->delFarmList($_GET['lid'], $session->uid);
|
$database->delFarmList($_GET['lid'], $session->uid);
|
||||||
header("Location: build.php?id=39&t=99");
|
header("Location: build.php?id=39&t=99");
|
||||||
exit;
|
exit;
|
||||||
}elseif($_GET['action'] == 'deleteSlot') {
|
}elseif(isset($_GET['action']) && $_GET['action'] == 'deleteSlot') {
|
||||||
$database->delSlotFarm($_GET['eid']);
|
$database->delSlotFarm($_GET['eid']);
|
||||||
header("Location: build.php?id=39&t=99");
|
header("Location: build.php?id=39&t=99");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
if($_POST['action'] == 'startRaid'){
|
if(isset($_POST['action']) && $_POST['action'] == 'startRaid'){
|
||||||
if($session->access != BANNED){
|
if($session->access != BANNED){
|
||||||
include ("Templates/a2b/startRaid.tpl");
|
include ("Templates/a2b/startRaid.tpl");
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
Reference in New Issue
Block a user