fix some problems with getVilWref function

This commit is contained in:
unknown
2012-06-15 13:46:24 +03:00
parent d63a84e745
commit 3480145a5b
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -15,7 +15,7 @@ var carry = <?php echo $market->maxcarry; ?>;
</script>
<?php
$allres = $_POST['r1']+$_POST['r2']+$_POST['r3']+$_POST['r4'];
if($_POST['x']!="" && $_POST['y']!=""){
if($_POST['x']!="" && $_POST['y']!="" && is_numeric($_POST['x']) && is_numeric($_POST['y'])){
$getwref = $database->getVilWref($_POST['x'],$_POST['y']);
$checkexist = $database->checkVilExist($getwref);
}
@@ -65,7 +65,7 @@ if(isset($_POST['ft'])=='check' && $allres!=0 && $allres <= $maxcarry && ($_POST
<tbody><tr>
<th>Coordinates:</th>
<?php
if($_POST['x']!="" && $_POST['y']!=""){
if($_POST['x']!="" && $_POST['y']!="" && is_numeric($_POST['x']) && is_numeric($_POST['y'])){
$getwref = $database->getVilWref($_POST['x'],$_POST['y']);
$getvilname = $database->getVillageField($getwref, "name");
$getvilowner = $database->getVillageField($getwref, "owner");
+1 -1
View File
@@ -13,7 +13,7 @@ $WrefY = $WrefCoor['y'];
$type = $database->getVillageType2($Wref);
$oasistype = $type['oasistype'];
$vdata = $database->getVillage($Wref);
}elseif($_POST['x'] && $_POST['y']){
}elseif($_POST['x']!="" && $_POST['y']!="" && is_numeric($_POST['x']) && is_numeric($_POST['y'])){
$Wref = $database->getVilWref($_POST['x'], $_POST['y']);
$WrefX = $_POST['x'];
$WrefY = $_POST['y'];
+1 -1
View File
@@ -16,7 +16,7 @@ $WrefY = $WrefCoor['y'];
$type = $database->getVillageType2($Wref);
$oasistype = $type['oasistype'];
$vdata = $database->getVillage($Wref);
}elseif($_POST['x'] && $_POST['y']){
}elseif($_POST['x']!="" && $_POST['y']!="" && is_numeric($_POST['x']) && is_numeric($_POST['y'])){{
$Wref = $database->getVilWref($_POST['x'], $_POST['y']);
$WrefX = $_POST['x'];
$WrefY = $_POST['y'];