GIF89a;
| Direktori : /home/serb/www/includes/ |
| Current File : /home/serb/www/includes/right_search.php |
<div style="margin-bottom:10px;">
<? include "includes/bannar_right.php";?>
</div>
<div>
<p style="margin-left:5px; padding-top:5px; padding-bottom:5px; width:185px;"> <img src="images/category_divider.png" /></p>
</div>
<div class="zip_escort">
<?
if(! ($_GET['search']))
{
$sql_fmescort="SELECT * FROM post_ad WHERE city_id='".$_GET['city_id']."' AND ad_catagory='1' And status='a' ORDER BY id DESC LIMIT 0,9";
$res_fmescortl=execute_query($sql_fmescort);
$num_fmescort=mysql_num_rows($res_fmescortl);
while($row_fmescort=mysql_fetch_array($res_fmescortl)){
?>
<div class="escort_div3">
<div style="float:left; width:90px; margin:0 0 10px 5px;">
<a href="escort-service-dtls.php?postid=<?=$row_fmescort['id']?>&city_id=<?= $_GET['city_id']?>&catid=<?=$row_fmescort['ad_catagory']?>">
<img src="avtar/<?=$row_fmescort['picture'] ?>" style="width:80px; height:70px; border-radius: 5px; border:1px solid #999999;"/></a>
</div>
<div style="float:left; width:90px;">
<p>Female Escort</p>
<p><? echo $row_fmescort['incall'].''.$row_fmescort['outcall']?></p>
<p><? if($row_fmescort['ethnicity']!='0'){ echo $row_fmescort['ethnicity'];}?></p>
</div>
<br class="spacer"/>
</div>
<? } } else
{
function getLnt($zip){
$url = "http://maps.googleapis.com/maps/api/geocode/json?address=
".urlencode($zip)."&sensor=false";
$result_string = file_get_contents($url);
$result = json_decode($result_string, true);
$result1[]=$result['results'][0];
$result2[]=$result1[0]['geometry'];
$result3[]=$result2[0]['location'];
return $result3[0];
}
if(($_GET['loc_dist'])&&($_GET['zipCode'])&&($_GET['search_type']=='Escorts'))
{
$val = getLnt($_GET['zipCode']);
$lat=$val['lat'];
$long=$val['lng'];
}
$count=0;
$sql_lstmsgpl="SELECT * FROM post_ad WHERE city_id='".$_GET['city_id']."' AND ad_catagory='1' And status='a' ORDER BY id";
$res_lstmsgpl=execute_query($sql_lstmsgpl);
$number=mysql_num_rows($res_lstmsgpl);
while($row_lstmsgpl=mysql_fetch_array($res_lstmsgpl))
{
$address=$row_lstmsgpl['ad_name'].','.$row_lstmsgpl['address'];
//echo zip_code_from_address($add);
//$address = '201 S. Division St., Ann Arbor, MI 48104'; // Google HQ
$prepAddr = str_replace(' ','+',$address);
$geocode=file_get_contents('http://maps.google.com/maps/api/geocode/json?address='.$prepAddr.'&sensor=false');
$output= json_decode($geocode);
$club_lat = $output->results[0]->geometry->location->lat;
$club_lang = $output->results[0]->geometry->location->lng;
$dis=distance($lat, $long, $club_lat, $club_lang, "M");
if($dis<=$_GET['loc_dist'])
{ ?>
<div class="escort_div3">
<div style="float:left; width:90px; margin:0 0 10px 5px;">
<a href="escort-service-dtls.php?postid=<?=$row_lstmsgpl['id']?>&city_id=<?= $_GET['city_id']?>&catid=<?=$row_lstmsgpl['ad_catagory']?>">
<img src="avtar/<?=$row_lstmsgpl['picture'] ?>" style="width:80px; height:70px; border-radius: 5px; border:1px solid #999999;"/></a>
</div>
<div style="float:left; width:90px;">
<p>Female Escort</p>
<p><? echo $row_lstmsgpl['incall'].''.$row_lstmsgpl['outcall']?></p>
<p><? if($row_lstmsgpl['ethnicity']!='0'){ echo $row_lstmsgpl['ethnicity'];}?></p>
</div>
<br class="spacer"/>
</div>
<? }
}
}?>
</div>