more fix for farmlist

This commit is contained in:
unknown
2012-06-15 15:21:20 +03:00
parent 3480145a5b
commit 18713293e5
2 changed files with 17 additions and 5 deletions
+8 -2
View File
@@ -13,6 +13,8 @@ $WrefY = $WrefCoor['y'];
$type = $database->getVillageType2($Wref);
$oasistype = $type['oasistype'];
$vdata = $database->getVillage($Wref);
$villageOwner = $database->getVillageField($Wref,'owner');
$userAccess = $database->getUserField($villageOwner,'access',0);
}elseif($_POST['x']!="" && $_POST['y']!="" && is_numeric($_POST['x']) && is_numeric($_POST['y'])){
$Wref = $database->getVilWref($_POST['x'], $_POST['y']);
$WrefX = $_POST['x'];
@@ -20,11 +22,15 @@ $WrefY = $_POST['y'];
$type = $database->getVillageType2($Wref);
$oasistype = $type['oasistype'];
$vdata = $database->getVillage($Wref);
$villageOwner = $database->getVillageField($Wref,'owner');
$userAccess = $database->getUserField($villageOwner,'access',0);
}
if(!$_POST['x'] && !$_POST['y'] && $_POST['target_id'] == ""){
if($_POST['x']=="" && $_POST['y']=="" && $_POST['target_id'] == ""){
$errormsg .= "Enter coordinates.";
}elseif((!$_POST['x'] || !$_POST['y']) && $_POST['target_id'] == ""){
}elseif(($_POST['x']=="" || $_POST['y']=="") && $_POST['target_id'] == ""){
$errormsg .= "Enter the correct coordinates.";
}elseif($userAccess == '9'){
$errormsg .= "Player is Admin. You can't attack him.";
}elseif($oasistype == 0 && $vdata == 0){
$errormsg .= "There is no village on those coordinates.";
}elseif($troops == 0){
+9 -3
View File
@@ -16,6 +16,8 @@ $WrefY = $WrefCoor['y'];
$type = $database->getVillageType2($Wref);
$oasistype = $type['oasistype'];
$vdata = $database->getVillage($Wref);
$villageOwner = $database->getVillageField($Wref,'owner');
$userAccess = $database->getUserField($villageOwner,'access',0);
}elseif($_POST['x']!="" && $_POST['y']!="" && is_numeric($_POST['x']) && is_numeric($_POST['y'])){{
$Wref = $database->getVilWref($_POST['x'], $_POST['y']);
$WrefX = $_POST['x'];
@@ -23,13 +25,17 @@ $WrefY = $_POST['y'];
$type = $database->getVillageType2($Wref);
$oasistype = $type['oasistype'];
$vdata = $database->getVillage($Wref);
$villageOwner = $database->getVillageField($Wref,'owner');
$userAccess = $database->getUserField($villageOwner,'access',0);
}
$troops = "".$_POST['t1']."+".$_POST['t2']."+".$_POST['t3']."+".$_POST['t4']."+".$_POST['t5']."+".$_POST['t6']."+".$_POST['t7']."+".$_POST['t8']."+".$_POST['t9']."+".$_POST['t10']."";
if(!$_POST['x'] && !$_POST['y'] && $_POST['target_id'] == ""){
if($_POST['x']=="" && $_POST['y']=="" && $_POST['target_id'] == ""){
$errormsg .= "Enter coordinates.";
}elseif((!$_POST['x'] || !$_POST['y']) && $_POST['target_id'] == ""){
}elseif(($_POST['x']=="" || $_POST['y']=="") && $_POST['target_id'] == ""){
$errormsg .= "Enter the correct coordinates.";
}elseif($userAccess == '9'){
$errormsg .= "Player is Admin. You can't attack him.";
}elseif($oasistype == 0 && $vdata == 0){
$errormsg .= "There is no village on those coordinates.";
}elseif($troops == 0){
@@ -66,7 +72,7 @@ $troops = "".$_POST['t1']."+".$_POST['t2']."+".$_POST['t3']."+".$_POST['t4']."+"
header("Location: build.php?id=39&t=99");
}
}
}
if($FLData['owner'] == $session->uid){
?>