Current Path : /var/www/html/ |
|
Current File : /var/www/html/sportdirectory.php |
<?php include_once("includes/header.php");
include_once("includes/header_menu.php"); $obj_front=new FrontController(); ?>
<?php $pageid = end(explode('.php/',$_SERVER['REQUEST_URI']));
$data = explode('/',$pageid);
$size = count($data);
$datas= $data[$size-1];
$selectSql = mysql_query("SELECT * FROM `sport_club` WHERE `name` LIKE '".$datas."%' and searchable =1");
$num = mysql_num_rows($selectSql);
$counter = ceil($num/3);
$tempcoun = 0;
$html = '';
$htmls = array();
$sggg=0;
$number = 0;
while($datas = mysql_fetch_array($selectSql,MYSQL_ASSOC)){
$tempcoun++;$number++;
$near_fitness_location=$obj_front->get_search_address_sports($datas['search_address']);
$serach_addr=ucwords($near_fitness_location['location']).', '.ucwords($near_fitness_location['city']);
//
$page1="sports-academy.php/".str_replace(' ','-',rtrim($datas['name'])).'/'.str_replace(array(' ',','),array('-',''),rtrim($near_fitness_location['location'].'-'.$near_fitness_location['city'])).'/'.$datas['id'].'/all';
$newpage1=strtolower(str_replace('&','n',$page1));
$url=baseurl.$newpage1;
//
$html.= '<li><p><strong><a href="'.$url.'">'.ucwords($datas['name']).'</a></strong><br/><p><span>'.$serach_addr.'</span></p>
</li>';
if($tempcoun==$counter){
if($sggg<2){
array_push($htmls,$html);
$html = '';
$tempcoun = 0;
$sggg++;
}
}
if($number==$num){
/* if(count($htmls==2)){*/
array_push($htmls,$html);
/*}*/
}
}
//print_r(count($htmls));// die('ff');
//echo '<pre>';
//print_r($htmls); die;
?>
<!-- contact page html -->
<style type="text/css">.sec-link{ color:#3B65A7; text-decoration:none;}
a {display:inline; color:#3b65a7; }
</style>
<div class="kafe_contact">
<div class="kafeconthd">
<h5>Directory</h5>
</div>
<div class="abouttcxt" style="width:900px !important; margin-bottom:10px;">
<div class="directoryhospital" style="width:33%; float:left">
<div class="featur-hospital-heding"><strong>Sports Club</strong></div>
<ul>
<?php if(isset($htmls[0])){echo $htmls[0];}?>
</ul>
</div>
<div class="directoryhospital" style="width:33%; float:left">
<div class="featur-hospital-heding green"><strong>Sports Club</strong></div>
<ul>
<?php if(isset($htmls[1])){echo $htmls[1];}?>
</ul>
</div>
<div class="directoryhospital" style="width:33%; float:left">
<div class="featur-hospital-heding green"><strong>Sports Club</strong></div>
<ul>
<?php if(isset($htmls[2])){echo $htmls[2];}?>
</ul>
</div>
</div>
<!--<div class="abotimg"><img src="images/about.png" width="211" height="553" alt="aboutus " /></div>--->
<div class="clear"></div>
</div>
<!--contact page html end -->
<? include_once("includes/footer.php");
?>
,