From 3480145a5ba93c3182e3f5e009b8cbe58a1c2f47 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Jun 2012 13:46:24 +0300 Subject: [PATCH] fix some problems with getVilWref function --- Templates/Build/17.tpl | 4 ++-- Templates/goldClub/farmlist_addraid.tpl | 2 +- Templates/goldClub/farmlist_editraid.tpl | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Templates/Build/17.tpl b/Templates/Build/17.tpl index 8a8c873a..f2ddc0d1 100644 --- a/Templates/Build/17.tpl +++ b/Templates/Build/17.tpl @@ -15,7 +15,7 @@ var carry = maxcarry; ?>; getVilWref($_POST['x'],$_POST['y']); $checkexist = $database->checkVilExist($getwref); } @@ -65,7 +65,7 @@ if(isset($_POST['ft'])=='check' && $allres!=0 && $allres <= $maxcarry && ($_POST Coordinates: getVilWref($_POST['x'],$_POST['y']); $getvilname = $database->getVillageField($getwref, "name"); $getvilowner = $database->getVillageField($getwref, "owner"); diff --git a/Templates/goldClub/farmlist_addraid.tpl b/Templates/goldClub/farmlist_addraid.tpl index 28515ea4..33dd2fa9 100644 --- a/Templates/goldClub/farmlist_addraid.tpl +++ b/Templates/goldClub/farmlist_addraid.tpl @@ -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']; diff --git a/Templates/goldClub/farmlist_editraid.tpl b/Templates/goldClub/farmlist_editraid.tpl index baf96f79..82f6c3da 100644 --- a/Templates/goldClub/farmlist_editraid.tpl +++ b/Templates/goldClub/farmlist_editraid.tpl @@ -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'];