mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-09-02 00:27:12 +00:00
fix some problems with getVilWref function
This commit is contained in:
@@ -15,7 +15,7 @@ var carry = <?php echo $market->maxcarry; ?>;
|
|||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
$allres = $_POST['r1']+$_POST['r2']+$_POST['r3']+$_POST['r4'];
|
$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']);
|
$getwref = $database->getVilWref($_POST['x'],$_POST['y']);
|
||||||
$checkexist = $database->checkVilExist($getwref);
|
$checkexist = $database->checkVilExist($getwref);
|
||||||
}
|
}
|
||||||
@@ -65,7 +65,7 @@ if(isset($_POST['ft'])=='check' && $allres!=0 && $allres <= $maxcarry && ($_POST
|
|||||||
<tbody><tr>
|
<tbody><tr>
|
||||||
<th>Coordinates:</th>
|
<th>Coordinates:</th>
|
||||||
<?php
|
<?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']);
|
$getwref = $database->getVilWref($_POST['x'],$_POST['y']);
|
||||||
$getvilname = $database->getVillageField($getwref, "name");
|
$getvilname = $database->getVillageField($getwref, "name");
|
||||||
$getvilowner = $database->getVillageField($getwref, "owner");
|
$getvilowner = $database->getVillageField($getwref, "owner");
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ $WrefY = $WrefCoor['y'];
|
|||||||
$type = $database->getVillageType2($Wref);
|
$type = $database->getVillageType2($Wref);
|
||||||
$oasistype = $type['oasistype'];
|
$oasistype = $type['oasistype'];
|
||||||
$vdata = $database->getVillage($Wref);
|
$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']);
|
$Wref = $database->getVilWref($_POST['x'], $_POST['y']);
|
||||||
$WrefX = $_POST['x'];
|
$WrefX = $_POST['x'];
|
||||||
$WrefY = $_POST['y'];
|
$WrefY = $_POST['y'];
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ $WrefY = $WrefCoor['y'];
|
|||||||
$type = $database->getVillageType2($Wref);
|
$type = $database->getVillageType2($Wref);
|
||||||
$oasistype = $type['oasistype'];
|
$oasistype = $type['oasistype'];
|
||||||
$vdata = $database->getVillage($Wref);
|
$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']);
|
$Wref = $database->getVilWref($_POST['x'], $_POST['y']);
|
||||||
$WrefX = $_POST['x'];
|
$WrefX = $_POST['x'];
|
||||||
$WrefY = $_POST['y'];
|
$WrefY = $_POST['y'];
|
||||||
|
|||||||
Reference in New Issue
Block a user