summaryrefslogtreecommitdiff
path: root/pages/wot/12.php
diff options
context:
space:
mode:
Diffstat (limited to 'pages/wot/12.php')
-rw-r--r--pages/wot/12.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/pages/wot/12.php b/pages/wot/12.php
index a0bbf50..1d4df85 100644
--- a/pages/wot/12.php
+++ b/pages/wot/12.php
@@ -65,26 +65,26 @@ document.f.location.focus();
{
$bits = explode(",", $_REQUEST['location']);
- $loc = trim(mysql_escape_string($bits['0']));
- $reg = ""; if(array_key_exists('1',$bits)) $reg=trim(mysql_escape_string($bits['1']));
- $ccname = ""; if(array_key_exists('2',$bits)) $ccname=trim(mysql_escape_string($bits['2']));
+ $loc = trim(mysqli_real_escape_string($_SESSION['mconn'], $bits['0']));
+ $reg = ""; if(array_key_exists('1',$bits)) $reg=trim(mysqli_real_escape_string($_SESSION['mconn'], $bits['1']));
+ $ccname = ""; if(array_key_exists('2',$bits)) $ccname=trim(mysqli_real_escape_string($_SESSION['mconn'], $bits['2']));
$query = "select `locations`.`id` as `locid` from `locations`, `regions`, `countries` where
`locations`.`name` like '$loc%' and `regions`.`name` like '$reg%' and `countries`.`name` like '$ccname%' and
`locations`.`regid`=`regions`.`id` and `locations`.`ccid`=`countries`.`id`
order by `locations`.`name` limit 1";
- $res = mysql_query($query);
- if($reg != "" && $ccname == "" && mysql_num_rows($res) <= 0)
+ $res = mysqli_query($_SESSION['mconn'], $query);
+ if($reg != "" && $ccname == "" && mysqli_num_rows($res) <= 0)
{
$query = "select `locations`.`id` as `locid` from `locations`, `regions`, `countries` where
`locations`.`name` like '$loc%' and `countries`.`name` like '$reg%' and
`locations`.`regid`=`regions`.`id` and `locations`.`ccid`=`countries`.`id`
order by `locations`.`name` limit 1";
- $res = mysql_query($query);
+ $res = mysqli_query($_SESSION['mconn'], $query);
}
- if(mysql_num_rows($res) <= 0)
+ if(mysqli_num_rows($res) <= 0)
die(_("Unable to find suitable location"));
- $row = mysql_fetch_assoc($res);
+ $row = mysqli_fetch_assoc($res);
$_REQUEST['location'] = $row['locid'];
}
@@ -92,7 +92,7 @@ document.f.location.focus();
$locid = intval($_REQUEST['location']);
$query = "select * from `locations` where `id`='$locid'";
- $loc = mysql_fetch_assoc(mysql_query($query));
+ $loc = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
if($maxdist <= 10)
{
$query = "SELECT ROUND(6378.137 * ACOS(0.9999999*((SIN(PI() * $loc[lat] / 180) * SIN(PI() * `locations`.`lat` / 180)) + (COS(PI() * $loc[lat] / 180 ) *
@@ -108,7 +108,7 @@ document.f.location.focus();
`users`.`assurer` = 1 AND `users`.`listme` = 1 HAVING `distance` <= '$maxdist' ORDER BY `distance` LIMIT 50";
//echo $query;
}
- $res = mysql_query($query);
+ $res = mysqli_query($_SESSION['mconn'], $query);
?><table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper" width="700">
<tr>
<td class="title"><?=_("Name")?></td>
@@ -117,7 +117,7 @@ document.f.location.focus();
<td class="title"><?=_("Contact Details")?></td>
<td class="title"><?=_("Email Assurer")?></td>
</tr>
-<? while($row = mysql_fetch_assoc($res))
+<? while($row = mysqli_fetch_assoc($res))
{
$points = maxpoints($row['uid']);
if($points > 35)