more fixes

This commit is contained in:
unknown
2012-06-18 20:38:27 +03:00
parent 527316097b
commit 86dc4c1904
41 changed files with 2003 additions and 1399 deletions
-6
View File
@@ -16,8 +16,6 @@ $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'];
@@ -25,8 +23,6 @@ $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']."";
@@ -34,8 +30,6 @@ $troops = "".$_POST['t1']."+".$_POST['t2']."+".$_POST['t3']."+".$_POST['t4']."+"
$errormsg .= "Enter coordinates.";
}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){