Current Path : /var/www/html/
Upload File :
Current File : /var/www/html/sport_profile.php

<?php  include_once("includes/header.php");
       include_once('includes/header_menu.php');?>
<?php $obj_front=new FrontController();
 $profile_id=$_REQUEST['id'];
 $result=$obj_front->get_sport_clubs($profile_id);
 $no_res=count($result);
?>
<script type="text/javascript" language="javascript" >
function fallowedfuncs(service_id,userid,type){ 
    if(userid==0)
	    {
	     raj_redirect();
		}
		else
		 {
		$.ajax({
			   url:"searching_files/front_ajax.php?fallow=fallow&service_id="+service_id+"&userid="+userid+"&service_type="+type,
			   method:"GET",
			   success:function(data)
			    { 
				  window.location = "";
				   }
			   });	
		}
      }
	  // Un follow Service//
function unfollow(service_id,userid,type)
 {
  	  
 if(userid==0)
	    {
	     raj_redirect();
		}
		else
		 {
		if(confirm("Are you sure?")){ 	 
		$.ajax({
			   url:"searching_files/front_ajax.php?unfallow=unfallow&service_id="+service_id+"&userid="+userid+"&service_type="+type,
			   method:"GET",
			   success:function(data)
			    { 
				  window.location = "";
				   }
			   });
		  }
		  
		}
	
	}
// Feeds Section	
 function like_feeds(feedid)
  {
    <?php if($_SESSION['userid']!=''){ ?>
	 if(feedid!='')
	      {
		
		  var userid=<?php echo $_SESSION['userid'];?>;
		  $.ajax({
			    url:"searching_files/front_ajax.php?like_feed=like&feedid="+feedid+"&userid="+userid,
			    method:"GET",
			    success:function(datafl)
			     { 
			      $('#feed_likes_'+feedid).text(datafl);
				  $('#feed_like_btn_'+feedid).hide("fast");
				  $('#feed_unlike_btn_'+feedid).show("fast");
				  
				  }
			   });
		   }
		<? } else {?> 
		raj_redirect();
		<? }?>
	
	
	}
function unlike_feeds(feedid1)
  {
    <?php if($_SESSION['userid']!=''){ ?>
	 if(feedid1!='')
	      {
		
		  var userid=<?php echo $_SESSION['userid'];?>;
		  $.ajax({
			    url:"searching_files/front_ajax.php?unlike_feed=unlike&feedid="+feedid1+"&userid="+userid,
			    method:"GET",
			    success:function(dataful)
			     { 
			      $('#feed_likes_'+feedid1).text(dataful);
				  $('#feed_unlike_btn_'+feedid1).hide("fast");
				  $('#feed_like_btn_'+feedid1).show("fast");
				  
				  
				  }
			   });
		   }
		<? } else {?> 
		raj_redirect();
		<? }?>
	
	
	}	
// Review Section//	
function write_review()
 { 
   	<?php if($_SESSION['userid']!=''){ ?>
	if($('#rating_done').val()!=0)
	   {
				var review_text=$('#review_text').val();
				var s_id=$('#s_id').val();
				var s_type=$('#s_type ').val();
				var userid=<?php echo $_SESSION['userid']; ?>;
				if(review_text!='')
				{ 
			$.ajax({
			   url:"searching_files/front_ajax.php?write_review=write_review&review_text="+review_text+"&s_id="+s_id+"&s_type="+s_type+"&userid="+userid,
			   method:"GET",
			   success:function(data1)
			   { 
			     $('#review_text').val('');
				 if(data1!=0)
				  {
					 data2=data1.split('@@');
					  var div_id = data2[1];
					   var div_content = data2[0];
					  if($("#reviewid_" +div_id).length!= 0) {
                         $("#reviewid_" +div_id).remove();
                        }
						$('#ajax_review').html(div_content);
						}
			      }
			   });
				}
	    }
		else
		{
			alert("Please rate first to write review.");
			return false;
			}
			<? } else {?> 
			raj_redirect();
			<? }?>
	}  
	
function like_review(review_id)
  {
	  
  <?php if($_SESSION['userid']!=''){ ?>
	 if(review_id!='')
	      {
		
		  var userid=<?php echo $_SESSION['userid'];?>;
		  $.ajax({
			    url:"searching_files/front_ajax.php?like_review=like&review_id="+review_id+"&userid="+userid,
			    method:"GET",
			    success:function(datal)
			     { 
			      $('#numb_likes_'+review_id).text(datal);
				  $('#like_btnnn_'+review_id).hide("fast");
				  $('#unlike_btnnn_'+review_id).show("fast");
				  
				  }
			   });
		
		}
		<? } else {?> 
		raj_redirect();
		<? }?>
	
	}
function unlike_review(review_id)
  {
	  
  <?php if($_SESSION['userid']!=''){ ?>
	 if(review_id!='')
	      {
		
		  var userid=<?php echo $_SESSION['userid'];?>;
		  $.ajax({
			    url:"searching_files/front_ajax.php?unlike_review=unlike&review_id="+review_id+"&userid="+userid,
			    method:"GET",
			    success:function(dataul)
			     { 
			      $('#numb_likes_'+review_id).text(dataul);
				   $('#unlike_btnnn_'+review_id).hide("fast");
				    $('#like_btnnn_'+review_id).show("fast");
				   }
			   });
		
		}
		<? } else {?> 
		raj_redirect();
		<? }?>
	
	}	
		
</script>
<!------- Rating Start-------->
<style type="text/css">
   .rating-a .br-widget {
    height: 15px;
}

.rating-a .br-widget a {
    display: block;
    width: 15px;
    padding: 2px 0 2px 0;
    height: 15px;
    float: left;
    background-color: #e3e3e3;
    margin: 1px;
    text-align: center;
}

.rating-a .br-widget a.br-active,
.rating-a .br-widget a.br-selected {
    background-color: #009900;
}

.rating-a .br-widget .br-current-rating {
    font-size: 15px;
    line-height: 2;
    float: left;
    padding: 0 15px 0 15px;
    color: #646464;
}
/**** Added By Raj*****/ 
.rating-a span{
	background:none !important;
 } 
.rating-a .br-widget a.br-active1,
.rating-a .br-widget a.br-selected1 {
    background-color: #FF0000;

}
   
   </style>
   <link rel="stylesheet" href="searching_files/jquery-ui.min.css" type="text/css" /> 
  <script type="text/javascript" src="searching_files/jquery-ui.min.js"></script>
 <!-------- Google Api start------------>
 <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places"></script>
<script>
function initialize() {
	
  var mapOptions = {
    center: new google.maps.LatLng(28.635308000000000000, 77.224960000000010000),
    display:0
  };
  var map = new google.maps.Map(document.getElementById('map-canvas'),
    mapOptions);

  var input = /** @type {HTMLInputElement} */(
      document.getElementById('pac-input'));

  var types ='geocode'; // document.getElementById('type-selector');
  map.controls[google.maps.ControlPosition.TOP_LEFT].push(input);
  map.controls[google.maps.ControlPosition.TOP_LEFT].push(types);

  var autocomplete = new google.maps.places.Autocomplete(input);
  autocomplete.bindTo('bounds', map);

  var infowindow = new google.maps.InfoWindow();
var marker = new google.maps.Marker({
    map: map
  });

  google.maps.event.addListener(autocomplete, 'place_changed', function() {
    infowindow.close();
    marker.setVisible(false);
    var place = autocomplete.getPlace();
    if (!place.geometry) {
      return;
    }
   
    var address = '';
    if (place.address_components) {
      address = [
        (place.address_components[0] && place.address_components[0].short_name || ''),
        (place.address_components[1] && place.address_components[1].short_name || ''),
        (place.address_components[2] && place.address_components[2].short_name || '')
      ].join(' ');
    }
   
    //infowindow.setContent('<div><strong>' + place.name + '</strong><br>' + address); 
  //  infowindow.open(map, marker);
	// var defined By Raj
	var latitude_value=place.geometry.location.lat();	
	var longtitude_value=place.geometry.location.lng();	
	if(place.address_components[0]=='[object Object]'){	
	var placenames=(place.address_components[0].long_name); //short_name
	 }
	 else
	  {
		  var placenames='';
		 } 
 if(place.address_components[1]=='[object Object]'){	 
	var districtname=(place.address_components[1].long_name);
	 }
	 else
	  {
		  var districtname='';
		 } 
 if(place.address_components[2]=='[object Object]'){	
	var statename=(place.address_components[2].long_name);
	 }
	 else
	  {
		 var statename='';
	  } 
	var fulladdr=address;
	$('#place1').val(place.name);
	$('#placefull').val(address);
	$('#place2').val(districtname);
	$('#place3').val(statename);
	$('#latitude').val(latitude_value);
	$('#longitude').val(longtitude_value);
	//submit_search();
 });

  // Sets a listener on a radio button to change the filter type on Places
  // Autocomplete.
 }
google.maps.event.addDomListener(window, 'load', initialize);
</script>
    <!-------End------->  
     <script type="text/javascript">
$(function() { 
 $("#segmentid").autocomplete({ 
		source: "searching_files/search_all_facilities.php",
		minLength: 0
	});
});
function submit_search()
  {
    $('#search_services').submit();
  	  }
</script>
<script src="searching_files/jquery.barrating.js"></script>
<script type="text/javascript">
        $(function () {
                     $('#example-a').barrating();
                      });
    </script>
  <link rel="stylesheet" href="css/prettyPhoto.css" type="text/css" media="screen" title="prettyPhoto main stylesheet" charset="utf-8" />
		<script src="js/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script>
        <script type="text/javascript" >
        $(document).ready(function(e) { 
           <!---  Gallery jqury-------------->
			$(".gallery:first a[rel^='prettyPhoto']").prettyPhoto({animationSpeed:'slow',theme:'light_square',slideshow:2000, autoplay_slideshow: false});
			$(".gallery:gt(0) a[rel^='prettyPhoto']").prettyPhoto({animationSpeed:'fast',slideshow:10000});
				$("#custom_content a[rel^='prettyPhoto']:first").prettyPhoto({
				custom_markup: '<div id="map_canvas" style="width:260px; height:265px"></div>',
				changepicturecallback: function(){ initialize(); }
			   });

			$("#custom_content a[rel^='prettyPhoto']:last").prettyPhoto({
				custom_markup: '<div id="bsap_1237859" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6" style="height:260px"></div><div id="bsap_1251710" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6"></div>',
				changepicturecallback: function(){ _bsap.exec(); }
			});
			<!-------------End  --->
        });
        </script>    
 <!---- Rating Ends here --->
<!-- header html -->
<?php if($no_res>0){
	$profile_id=$result['id'];
	if($_SESSION['userid']!='')
	 {
		$userid = $_SESSION['userid'];
		}
		else
		{
		$userid = 0;
		}
	
	$stype ='Sport Club';
	?>
<section class="kafe_middlesection">
<br/>
<form name="search_services" id="search_services" action="newsearchresult.php" method="get" >
  <input type="hidden" name="search_submit" id="search_submit" value="Ok" />
      <input type="hidden" name="place1" id="place1" value="<?=$_REQUEST['place1']?>" /> 
      <input type="hidden" name="place2" id="place2" value="<?=$_REQUEST['place2']?>" />
      <input type="hidden" name="place3" id="place3" value="<?=$_REQUEST['place3']?>" />
      <input type="hidden" name="placefull" id="placefull" value="<?=$_REQUEST['placefull']?>" />
      <input type="hidden" name="latitude" id="latitude" value="<?=$_REQUEST['latitude']?>" /> 
      <input type="hidden" name="longitude" id="longitude" value="<?=$_REQUEST['longitude']?>" /> 
<div class="newpannel_serchh">
            <div style="padding:1px 5px 0px 28px; float:left">Search facilities around location:</div>
            <div style="padding-right:5px; float:left">
           <input type="text" placeholder="Enter a location" name="location_tags" class="controls" style="width:220px; height:19px;" id="pac-input" autocomplete="off">
           <div id="map-canvas" style="position: relative; background-color: rgb(229, 227, 223); overflow: hidden;"><div style="position: absolute; left: 0px; top: 0px; overflow: hidden; width: 100%; height: 100%; z-index: 0;" class="gm-style"><div style="position: absolute; left: 0px; top: 0px; overflow: hidden; width: 100%; height: 100%; z-index: 0;"><div style="position: absolute; left: 0px; top: 0px; z-index: 1; width: 100%; cursor: url(&quot;https://maps.gstatic.com/mapfiles/openhand_8_8.cur&quot;), default;"><div style="position: absolute; left: 0px; top: 0px; width: 100%; z-index: 200;"><div style="position: absolute; left: 0px; top: 0px; z-index: 101; width: 100%;"></div></div><div style="position: absolute; left: 0px; top: 0px; width: 100%; z-index: 201;"><div style="position: absolute; left: 0px; top: 0px; z-index: 102; width: 100%;"></div><div style="position: absolute; left: 0px; top: 0px; z-index: 103; width: 100%;"><div style="position: absolute; left: 0px; top: 0px; z-index: -1;"><div style="position: absolute; left: 0px; top: 0px; z-index: 1;"></div></div></div></div><div style="position: absolute; left: 0px; top: 0px; width: 100%; z-index: 202;"><div style="position: absolute; left: 0px; top: 0px; z-index: 104; width: 100%;"></div><div style="position: absolute; left: 0px; top: 0px; z-index: 105; width: 100%;"></div><div style="position: absolute; left: 0px; top: 0px; z-index: 106; width: 100%;"></div></div><div style="position: absolute; left: 0px; top: 0px; z-index: 100; width: 100%;"><div style="position: absolute; left: 0px; top: 0px; z-index: 0;"><div style="position: absolute; left: 0px; top: 0px; z-index: 1;"></div></div></div><div style="position: absolute; z-index: 0;"><div style="overflow: hidden;"></div></div></div></div></div></div>
                 
       </div>
            
              <div style="padding:1px 5px 0px 63px; float:left">In the segment:</div>
               <div style="padding-right:5px; float:left"><input type="text" placeholder="ex. Gym, Spa, Cricket" id="segmentid" style="width:220px; height:19px;" name="segmentid" value="" /></div>
            
             <div style="padding:0px 0px 0px 26px; margin-top:-3px; float:left"><a href="javascript:void(0);"  onclick="return submit_search();" class="btn btn-yellow">Search</a></div>
            </div>
 </form>
  <aside class="kafe_prof_left">
       <hgroup>
          <h2><?=$result['name']?></h2>
          <?php 
	   $type=$stype;
	   $srvices=$obj_front->get_sport_facilities($result['id'],$type);
	  
	   // Avrage Rating //
		   $total_rating=$result['userrating'];
           $total_vote=$result['totalvote'];
           if($total_vote!=0){
                 $avg_rate=number_format($total_rating/$total_vote,1);
                  }
             else
                {
	              $avg_rate=0;
                }
      $new_rating=round($avg_rate,1);
	 $newratss=explode('.',$new_rating);
	 $new_rating_fullstar=$newratss[0];
	 $new_rating_halfstar=$newratss[1];
	 
	  if(is_numeric($new_rating_halfstar))
	  {
	       $blank_star=($new_rating_fullstar+1);
	  }
	  else
	  {
		  $blank_star=$new_rating_fullstar; 
		  }
		// End Avg Rate///
		// User Rating Start //
		
		if($_SESSION['userid']!='')
		{
		 $userid=$userid;
		 $user_rate=$obj_front->get_ratings($result['id'],$type,$userid);
		 }
		
		if(count($user_rate)>0)
		 {
			$user_ratings=$user_rate[0]['rating'];
			}
			else
			{
				$user_ratings=0;
			}
		if($result['sprofileimg']!=''){
		   $profile_img=baseurl.'admin/'.$result['sprofileimg'];	
		 }
		else
		  {
		     $profile_img=baseurl.'images/kafe1.jpg';	
			}
		
		//print_r($result['sprofileimg']);
		 // Get Fallowing Status //
		 $follow_status=$obj_front->get_follow_status($profile_id,$type,$userid); 
		 // print_r($follow_status);
		 // Get Fallowers // 
		$followers = $obj_front->service_fallowers($profile_id,$type);
		$no_of_fallowers=count($followers);
		// Get Reviews //
		$reviews=$obj_front->service_review($profile_id,$type);
		$no_reviews=count($reviews);
		// Gallery Images//
		$gallery_images=array();
		if($result['gallary_img']!='')
		{
		  $gallery_images=explode('#',$result['gallary_img']);
		}
		//print_r($gallery_images); die('hello');
		// Tarrifs //
		$tarrif_images=array();
		if($result['tariff_img']!='')
		{
		 $tarrif_images=explode('#',$result['tariff_img']);
		 }
	 // Feedss
	  $feeds=@$obj_front->service_feeds($profile_id,$type);
	  $no_feeds=count($feeds);
	 $search_location=$obj_front->get_search_address_sports($result['location']);
	 ?>
          <div class="kafe_ratingsect">
            <div class="staralltop">
            
            <? echo $new_rating_star;   for($ij=1;$ij<=$new_rating_fullstar;$ij++){?><img width="19" height="18" alt="statt" src="images/st.png">
            <? } if(is_numeric($new_rating_halfstar)){?>
           <img width="19" height="18" alt="statt" src="images/st3.png">
            <? }?>
			
			<? for($jk=5;$jk>$blank_star;$jk--){ ?>
            <img width="19" height="18" alt="statt" src="images/st2.png">
            <? }?>
            <!--<img width="19" height="18" alt="statt" src="images/st3.png">
            <img width="19" height="18" alt="statt" src="images/st.png">
            <img width="19" height="18" alt="statt" src="images/st2.png">-->
            <div class="clear"></div>
            </div>              
            <div class="kaferati2"><?=$new_rating?> (<?=$total_vote?> <img src="images/li3.png" width="20" height="20" class="startkk" /> users ratings)</div> </div>          
     </hgroup>
     <aside class="kafe_fitdetail">
     
           <div class="kafe_fifntnessimg">
            
            <img src="<?=$profile_img?>" width="175" height="179"  alt="action" title="your action"/> </div>           
         <span class="kafearrokey"></span>
         <div class="kafe_actins">
           
           <h3>Your actions</h3>
              <div class="kafe_actins_folling">
               <?php if($follow_status==1){ ?> <a href="javascript:void(0)" onclick="return unfollow(<?php print($profile_id);?>,<?php print(trim($userid));?>,'<?php print(trim($stype));?>');" >Un-Follow</a> <?php } else { ?><a href="javascript:void(0);" onclick="return fallowedfuncs(<?php print($profile_id);?>,<?php print(trim($userid));?>,'<?php print(trim($stype));?>');" >Follow</a> <? } ?>
              </div>
           
         <div class="kaferatingsho">
         <div class="rt">your rating</div>
         <div class="ratall">
       
          <?php if($user_ratings>=.5){ ?><div class="rat1 rt1"> <a href=""></a></div><? }?>
          <?php if($user_ratings>=1){ ?><div class="rat1 rt2"><a href=""></a></div><? }?>
          <?php if($user_ratings>=1.5){ ?><div class="rat1 rt3"><a href=""></a></div><? }?>
         <?php if($user_ratings>=2){ ?> <div class="rat1 rt4"><a href=""></a></div><? }?>
          <?php if($user_ratings>=2.5){ ?><div class="rat1 rt5"><a href=""></a></div><? }?>
          <?php if($user_ratings>=3){ ?><div class="rat1 rt6"><a href=""></a></div><? }?>
         <?php if($user_ratings>=3.5){ ?> <div class="rat1 rt7"><a href=""></a></div><? }?>
        <?php if($user_ratings>=4){ ?>  <div class="rat1 rt8"><a href=""></a></div><? }?>
         <?php if($user_ratings>=4.5){ ?> <div class="rat1 rt9"><a href=""></a></div><? }?>
          <?php if($user_ratings>=5){ ?><div class="rat1 rt10 rat1lasr"><a href=""></a><? }?>
         </div>
         <div class="clear"></div>
         </div>
         </div> 
         
         </div>      
   
     </aside>
     
      <div class="kafe_alldetail">
      <div class="kafe_detailinner">
           
        <!--  <div class="kafe_lft1">     </div>-->
           <ul class="kafe_fintnessadd profileuser">
           		<li>
                	<div class="kafe_aadd">
                    <div class="kafe_timeicon"></div>
                    Timings
                    </div>              
                     <div class="kafe_aadd" style="width:auto;">                   
                     <?=$result['timings']?>
                                        </div>
                </li>
                <li>                	
                    <div class="kafe_aadd">
                    <div class="kafe_faci"></div>
                    Facilities
                    </div>
                    
                    <div class="faciliall">                    
                       <?php   $hi=1;
				foreach($srvices as $facility){
					 if($facility['icon_small']!='')
				     {
					   $segimg=baseurl.'admin/segment_pics/'.$facility['icon_small'];
					   }
					   else
					     {
						   $segimg=baseurl.'images/h'.$hi.'.png';
						   $hi++;
						  }
					?>
                      <div class="kafe_aaddrit">
                             <div class="pricon"> <img src="<?=$segimg?>" width="17" height="18" /></div>
                          <?=ucwords($facility['name'])?>  
                       </div> 
                       <? }?>
                                               
                      <div class="clear"></div>                
                    </div>
                    
                </li> 
                 <li>                	
                    <div class="kafe_aadd">
                    <div class="kafe_faci"></div>
                    Phone
                    </div>                    
                    <div class="faciliall">                    
                      <div class="kafe_aaddrit">                          
                       <?=$result['phone']?><? if($result['phone']!='' and $result['mobile']!=''){echo ' / ';}?> <?=$result['mobile']?>
                       </div>
                      <div class="clear"></div>                
                    </div>                    
                </li>
                <li>                	
                    <div class="kafe_aadd">
                        <div class="kafe_website"></div>
                        Website/Email
                      </div>                   
                    <div class="faciliall">                    
                      <div class="kafe_aaddrit">                          
                       <span style="float:left;"><?php if($result['website']!=''){?> <a href="http://<?=$result['website']?>"  target="_blank" > <?=$result['website']?> </a><? } ?> </span><? if($result['website']!='' and $result['email']!=''){?><span style="float:left">/</span><? }?><span style="float:left;"><? if($result['email']!=''){?><a href="mailto:<?=$result['email']?>" ><?=$result['email']?></a><? }?>
             
                       </div>
                      <div class="clear"></div>                
                    </div>                    
                </li>
                  
                 <li>                	
                    <div class="kafe_aadd">
                        <div class="kafe_webadd"></div>
                        Address
                      </div>                  
                    <div class="faciliall"> 
                    <div class="kafe_aaddrit"><?=$result['address']?> </div>
                      <div class="clear"></div>                
                    </div>                    
                </li>
                     
                
                          
                           
           </ul>
                     
        <div class="clear"></div>
        </div>
       <div class="kafe_addbtm">
      	<div class="kafe_userviewbtn">
        	<span class="kafe_userlf"><dd></dd><?=$no_reviews?> User Reviews</span>
            
            <span style="clear:both;" class="kafe_userlf"><span class="dd2"></span><?=$no_of_fallowers?> Followers</span>
           
        <div class="clear"></div>
        </div>
        
        <div class="kafe_userviewbtn userit">
        	
            <span class="kafe_userlf"><span class="dd3"></span>Capacity – <?=$result['floor_capacity']?> people</span>
             <span class="kafe_userlf"><span class="dd1"></span>365Hops Discount  Available</span>
        <div class="clear"></div>
        </div>
        <div class="clear"></div> 
      </div>
      
      </div>
     <div class="clear"></div>
     <div class="kafe_gene kafe_genephoto gallerypadd" id="j-slider">  
         <span>Photo Gallery</span>
         <div id="vlightbox2_new">
         <ul class="gallery clearfix kafe_photogalley">
          <?php if(count($gallery_images)>0){ 
		  foreach($gallery_images as $gal_img){
		
		  ?>
           <li>
               <div class="kafephoto">
               <a class="vlightbox1" href="admin/<?=$gal_img?>" rel="prettyPhoto[gallery1]" >
               <img src="admin/<?=$gal_img?>" width="136" height="101" title="<?=$result['name']?>" />
               </a>
               </div>
            </li>
            <? }}else{?>
           <li>
               <div class="kafephoto">
                <a class="vlightbox1" href="images/photogallery2.png"  rel="prettyPhoto[gallery1]" >
               <img src="images/photogallery2.png" width="136" height="101" title="<?=$result['name']?>"  />
               </a>
               </div>
            </li>
             <? }?>
                 
         </ul>
         </div>
        
      </div>
      
      <div class="kafe_gene">
      		<div class="span"><i></i>Sports Facilites</div>
             <div class="clear"></div>
            <ul class="kafe_sportsfaci">
             <?php $srevicessportclubs=$obj_front->get_sport_facilities_byid($result['id'],$type);
			  if(count($srevicessportclubs)>0){
			foreach($srevicessportclubs as $sport_facility){
				 ?>
              <li>
                <div class="kafe_picslef"><?=ucwords($sport_facility['name'])?></div>
                <div class="kafe_pics"><?=$sport_facility['capacity']?> <?=$sport_facility['facility_text']?></div>
              </li>
              <? }}?>
                </ul>
            <div class="clear"></div>
      </div>
    <div class="kafe_gene" style="border-bottom:1px solid #CFCFCF; margin-bottom:20px; padding-bottom:10px; ">  
         <strong>General Information</strong>
         <p><?=$result['other_info']?></p>      
      </div> 
      
        
      
      
      <aside class="kafe_folltab">
       
        <div class="tabbed-menu">
<div class="kafe_tabhd">
        <ul class="tabs kafe_folltab">
        <li id="page1" class="selected kefetbiocn">
        <i></i>
        Tariff List
        </li>
        <li id="page2">
        <span class="i1"></span>
        Feeds
        </li>
        <li id="page3">
        	<span class="i2"></span>
            Followers
        </li>
        </ul>
 <span class="kafetab_foll"> <?php if($follow_status==1){ ?> <a href="javascript:void(0)" onclick="return unfollow(<?php print($profile_id);?>,<?php print(trim($userid));?>,'<?php print(trim($stype));?>');" >Un-Follow</a> <?php } else { ?><a href="javascript:void(0);" onclick="return fallowedfuncs(<?php print($profile_id);?>,<?php print(trim($userid));?>,'<?php print(trim($stype));?>');" >Follow</a> <? } ?></span>
</div>

<div class="content">
<div class="page kafe_tab-detail tarifbg" id="page1" style="display:block;  height:168px;">
 <div id="vlightbox3">
 <ul class="gallery clearfix tariffulpop">
   <?php if(count($tarrif_images)>0){ 
    foreach($tarrif_images as $tarrif)
   ?>
    <li>
     <div class="lightinn">    
      <a class="vlightbox1_new" href="admin/<?=$tarrif?>" rel="prettyPhoto[gallery1]" >
      <img src="admin/<?=$tarrif?>" width="146" height="142" />
      </a>
      </div>           
    </li>
      <? }else{?>          
   <li>
     <div class="lightinn">    
      <a class="vlightbox1_new" href="images/2.jpg"  rel="prettyPhoto[gallery1]">
      <img src="images/tarriff.jpg" width="146" height="142" />
      </a>
      </div>           
    </li><? }?>
    
 
    
 </ul>
       
 </div>      
<div class="clear"></div>     
</div>
<div class="page kafe_tab-detail" id="page2" style="display:none">
  <?php if($no_feeds>0) {
	   foreach($feeds as $feed){
	    $timeagos=$obj_front->ago($feed['time']);
		$feed_likers=$obj_front->service_feeds_likes($feed['id']);
		$no_feed_likers=count($feed_likers);
	    // User Feed Like Status 
	   $like_st=$obj_front->service_feed_like_status($userid,$feed['id']);
	   if($like_st==0){
		   $str_like_feed_btn_styl='style="display:block;"';
		   $str_unlike_feed_btn_styl='style="display:none;"';
		   }
		   else
		   {
			$str_like_feed_btn_styl='style="display:none;"';
		    $str_unlike_feed_btn_styl='style="display:block;"';
			}
		// No Comments 
		$no_feed_comments=$obj_front->feed_no_comments($feed['id']);	
		// 
		$limits="LIMIT 0 , 2";
		$feed_comments=$obj_front->feed_comments($feedid,$limits);
	    
	   ?>
     <div class="kafe_padd">
  <img src="images/tabimg.png" width="81" height="81" alt="tB IMF" title="taraff " />
<div class="kafe_tab-detailtxt">
        <h1>Aliquam tincidunt mauris eu risus.</h1>
        <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
     </div>
     
     <div class="clear"></div>
     <div class="kafe_likesection">
       <div class="kafe_likelink">
       		<a href=""><span class="kafe_likeicon"></span><b>240 </b>people likes </a>
            <a href=""><span class="kafe_peop_icon"></span><b>352</b> peoples Comment </a>
            <a href=""><span class="kafe_houricon"></span>(12 hours ago)</a>
       </div>
     <span class="kafetab_like"><a href="">Like</a> </span>
     <span class="kafetab_comm"><a href="">Comment</a> </span>
   <div class="clear"></div>
    </div>
    
     </div>
     
     <div class="kafe_commentall kafe_padd kafe_commenpadd">
       <img src="images/deepak.png" width="39" height="39" alt="deepk" />
       <div class="kafe_commenrit">
        <b>Deepak nagar </b>
        <p>Donec quis dui at dolor tempor interdum.</p>
        <span>(2 minuts ago ) </span>
        <a href="">4 Like </a>
       </div>
       <div class="clear"></div> 
       </div>
       
       <div class="kafe_commentall kafe_padd kafe_commenritbg">
       <img src="images/deepak.png" width="39" height="39" alt="deepk" />
       <div class="kafe_commenrit">
        <b>Deepak nagar </b>
        <p>Donec quis dui at dolor tempor interdum.</p>
        <span>(2 minuts ago ) </span>
        <a href="">4 Like </a>
       </div>
       <div class="clear"></div> 
       </div>
        
       <div class="kafe_commentall kafe_padd kafe_borderbotm">
       <img  alt="deepk" src="images/kafe_comment.png">
       <div class="kafe_commenritarea">
        <b>Deepak nagar </b>
          <textarea name="" cols="" rows="0" placeholder="Post Your comment here.."></textarea>
       </div>
       <div class="clear"></div> 
       </div>
<div class="clear"></div>  
<? } }else{ echo '<p>No record found...</p>';}?>   
</div>

<div class="page kafe_tab-detail" id="page3" style="display:none">
  <div class="kafe_padd">
      <ul class="kafe_followerslist">
          <?php if($no_of_fallowers>0){ $falo_ul=1;
		  foreach($followers as $follower){
		    $user_fallow=$obj_social->userinfo($follower['user_id']);	  
		if($falo_ul%3==1){
			
			$ul_insert='</ul><ul class="kafe_followerslist">';
			}
			else
			{
			  $ul_insert='';
			 }
		 echo $ul_insert;
		 ?>
          <li>
            <img src="social/ProfileThumb/<?=$user_fallow['user_img']?>" width="39" height="39" />
             <div class="kafe_folldetai">
               <b><?=ucwords($user_fallow['user_fullname'])?></b>
               <p><?=ucwords($user_fallow['user_city'])?></p> 
             </div>  
          </li>
          <? $falo_ul++; } }?> 
                          
      </ul>
     
      <div class="clear"></div>
     </div>
          
<div class="clear"></div>     
</div>

</div>

</div>
      
  
  
  
  </aside> 
     
     <div class="kafe_gene">
  		 <div class="kafe_review">
           	<strong class="ratihd">Write a review</strong>
            <div class="ratingdiv" style="width:297px;" >              
              <div class="rt"  >your rating</div>
             <div class="input select rating-a" style="padding-left:5px;">
        <input type="hidden" id="profilid" value="<?=$profile_id?>" />
         <input type="hidden" id="profiltype" value="Gym" />
         <input type="hidden" id="ruserid" value="<?=$userid?>" />
          <!--  <label for="example-a">Basic example:</label>-->
            <select id="example-a" name="rating">
             <option value=""></option>
             <option value=".5" <?php if($user_ratings==.5){ echo 'selected';}?> >.5</option>
               <option value="1" <?php if($user_ratings==1){ echo 'selected';}?> >1</option>
                <option value="1.5" <?php if($user_ratings==1.5){ echo 'selected';}?> >1.5</option>
                <option value="2" <?php if($user_ratings==2){ echo 'selected';}?> >2</option>
                 <option value="2.5" <?php if($user_ratings==2.5){ echo 'selected';}?> >2.5</option>
                 <option value="3" <?php if($user_ratings==3){ echo 'selected';}?> >3</option>
                 <option value="3.5" <?php if($user_ratings==3.5){ echo 'selected';}?> >3.5</option>
                 <option value="4" <?php if($user_ratings==4){ echo 'selected';}?> >4</option>
                  <option value="4.5" <?php if($user_ratings==4.5){ echo 'selected';}?> >4.5</option>
                  <option value="5" <?php if($user_ratings==5){ echo 'selected';}?> >5</option>
                   </select>
        <input type="hidden" name="rating_done" id="rating_done" value="<?=$user_ratings?>" />
        </div>   
            </div>          
          <div class="clear"></div>
         </div>  
  <form action="" method="post">
  <input type="hidden" name="s_id" id="s_id" value="<?=$profile_id?>" />
    <input type="hidden" name="s_type" id="s_type" value="<?=$type?>" />
  <textarea name="review_text" id="review_text" cols="" rows="7" placeholder="Enter your review here...."></textarea>
  <div class="kafe_com_subtn">
  <a href="">
  <div class="fb_chek"><input name="facebook_checkbox" type="checkbox" value="1" /></div>
  <img src="images/fb_post.png" width="166" height="35" alt="facebook post" title="post your comment" /></a>
  <a  href="javascript:void(0)" onclick="return write_review();" class="kafe_postreview" >Post Review</a> 
  </div>
  </form>
  
  <div class="clear"></div>
  </div>
    
    <div class="kafe_userreviews">
      
       <h5>Users Reviews for <?=$result['name']?></h5>
        <?php if($no_reviews>0){
		  foreach($reviews as $review){
			  $reviewer=$obj_social->userinfo($review['userid']);
			  $reviewer_img='social/ProfileThumb/'.$reviewer['user_img'];
			  $reviewer_link='social/index.php?f='.$reviewer['user_fullname'].'&m='.base64_encode($reviewer['user_id'].$reviewer['user_fullname']);
			  // User Fallowing 
			 $user_follow_list=$obj_social->service_fallowed_by_user($review['userid'],'');
			 $no_user_follow_list=count($user_follow_list);
			 // Created Events
			 $events=$obj_social->user_created_events($review['userid']);
			 $no_events=count($events);
			 // Total Reviews
			 
			 $user_review=$obj_social->total_user_review($review['userid']);
			 $no_user_review=count($user_review);
			 // Ratings
			 //
			$ratingssss=$obj_front->get_ratings($review['profileid'],$review['profiletype'],$review['userid']);
			if($ratingssss[0]['rating']!='')
			 {
			  	$rate=$ratingssss[0]['rating'];
				}
				else
				{
			   $rate=0;
			}
		 $interval_past=$obj_front->ago($review['time']);
		 // Likers
		 $likers=$obj_front->service_review_likes($review['id']);
		 $no_likers=count($likers);	
		 // user like status 
		 $like_staus=$obj_front->review_like_status($userid,$review['id']);
		 	if($like_staus==0)
			 {
				$like_btn_d='style="display:block;"';
				$unlike_btn_d='style="display:none;"';
				}
				else
				{
				$like_btn_d='style="display:none;"';
				$unlike_btn_d='style="display:block;"';
			 }	
			 ?> 
       <div class="kafe_reviewbox" id="reviewid_<?=$review['id']?>">
          <div class="kafe_reviewrat ratingfonts votepos"><?=$rate?></div>
	    <a href="<?=$reviewer_link?>" ><img src="<?=$reviewer_img;?>" width="64" height="70" alt="rock" /></a>
       <div class="kafe_reviewboxrit">
           <strong><?=ucwords($reviewer['user_fullname'])?></strong> <br />
          <span> <?=$no_user_review?> reviews<br />
           <?php if($no_user_follow_list>0){?>Follows <?=$no_user_follow_list?> gyms & sports<? }?><?php if($no_events>0){?> |  Posted <?=$no_events?> events<? }?></span>
           
       </div>
       <div class="clear"></div>
       <p><?=$review['review']?></p>
       <div class="kafe_reviewlike">
           <span class="kafe_relikeleft" <?=$like_btn_d?> id="like_btnnn_<?=$review['id']?>" >Found this review userful
           <div class="kafe_likeresicon"><a href="javascript:void(0);"  onClick="return like_review('<?=$review['id']?>');" >Like</a></div>           
          </span>
          
          <span class="kafe_relikeleft" style="width:58px;" <?=$unlike_btn_d?>  id="unlike_btnnn_<?=$review['id']?>" >
           <div class="kafe_likeresicon kafe_likeresiconunlike"><a href="javascript:void(0);"  onClick="return unlike_review('<?=$review['id']?>');" >Unlike</a></div>           
          </span>
          
          <div class="kafe_relikerit" style="width: 150px"><?=$interval_past?> <a href="javascript:void(0);"> <span id="numb_likes_<?=$review['id']?>"><?=$no_likers?></span> likes</a> </div>
          
      <div class="clear"></div>
       </div>
        <div class="clear"></div>
       </div>  
       
       <? }} else{ echo '<div class="kafe_reviewbox">No record found...</div>';}?>        
       </div> 
      
      
     
     <div class="clear"></div>
      </aside>
    
     
  
     
  <aside class="kafe_address_ritde">
     	<div class="kafe_ritop">Nearby Sport <br />clubs</div> 
       <?php 
		     $nearby_clubs=$obj_front->nearby_sportclubs($result['search_address'],$result['id'],$type,4);  // Search Location, id, servicetype, limit
	         $no_nearby_clubs=count($nearby_clubs); 
			
		  if($no_nearby_clubs>0){
		   foreach($nearby_clubs as $near_fitness){
		   // 
		   
		   // Avrage Rating //
		   $total_rating1=$near_fitness['userrating'];
           $total_vote1=$near_fitness['totalvote'];
           if($total_vote1!=0){
                 $avg_rate1=number_format($total_rating1/$total_vote1,1);
                  }
             else
                {
	              $avg_rate1=0;
                }
     $new_rating1=round($avg_rate1,1);
	 $newratss1=explode('.',$new_rating1);
	 $new_rating_fullstar1=$newratss1[0];
	 $new_rating_halfstar1=$newratss1[1];
	 
	  if(is_numeric($new_rating_halfstar1))
	  {
	       $blank_star1=($new_rating_fullstar1+1);
	  }
	  else
	  {
		  $blank_star1=$new_rating_fullstar1; 
		  }
	 // profile iMg
	 
	// Location //
	 $near_fitness_location=$obj_front->get_search_address_sports($near_fitness['search_address']); 
	 
	  if($result['sprofileimg']!=''){
		  $profile_img1=baseurl.'admin/'.$result['sprofileimg'];	
		}
		else
		  {
		     $profile_img1=baseurl.'images/kafe1.jpg';	
			} 
	  $type1='Sport Club';
	 $followers1 = $obj_front->service_fallowers($near_fitness['id'],$type1);
		$no_of_fallowers1=count($followers1);
		// Get Reviews //
		$reviews1=$obj_front->service_review($near_fitness['id'],$type1);
		$no_reviews1=count($reviews1);
	    $url="sport_profile.php?id=".$near_fitness['id'];
	    // Services//
	    $srvices1= $srvices=$obj_front->get_sport_facilities($near_fitness['id'],$type1);
		if(count($srvices1)>0){
		$near_fitness_srvices11='';	
			foreach($srvices1 as $service11)
			    {
				$near_fitness_srvices11.=$service11['name'].',';
				}
			$near_fitness_srvices=substr($near_fitness_srvices11,0,-1);
			}
			else
			{
				$near_fitness_srvices='';
				}
	 ?>
       <div class="kafe_clubdta">
        	<div class="kafe_clubdtainn">
            <a href="<?=$url?>" ><img src="<?=$profile_img1?>" width="54" height="46" alt="clube" title="clube title" /></a>
            <div class="kafe_ritclutxt"><a href="<?=$url?>" ><b><?=$near_fitness['name']?></b></a> <br /><?=$near_fitness_srvices ?>
              <? for($ij1=1;$ij1<=$new_rating_fullstar1;$ij1++){?>
              <img src="images/st.png" width="14" height="13" alt="statt" />
            <? } if(is_numeric($new_rating_halfstar1)){?>
           <img src="images/st3.png" width="14" height="13" alt="statt" />
            <? }?>
			
			<? for($jk1=5;$jk1>$blank_star1;$jk1--){ ?>
           <img src="images/st2.png" width="14" height="13" alt="statt" />
            <? }?>
              <span class="kafepoin"><?=$new_rating1?></span>
              </div>
            <div class="kafe_clu_btm"><span><?=$near_fitness['address']?></span>
            <b><?=$near_fitness_location['location']?>, <?=$near_fitness_location['city']?></b></div>
            </div>
            <ul class="kafe_clube_ul">
            	<li><img src="images/li3.png" width="20" height="20" alt="followers" /><a href=""><?=$no_of_fallowers1?> Followers</a></li>
                <li><img src="images/li2.png" width="20" height="19" alt="user" /><a href=""><?=$no_reviews1?> User Reviews</a></li>
                <li><img src="images/li4.png" width="21" height="14" alt="foll" /><a href="">Capacity – <?=$near_fitness['floor_capacity']?> people</a></li>
                <li><img src="images/li1.png" width="18" height="22" alt="discount" /><a href="">365Hops Discount  Available</a></li>
            </ul>
       <div class="clear"></div>
       </div>
       <? }}?>
       <!--<div class="kafe_clubdta">
        	<div class="kafe_clubdtainn">
           <img src="images/club1.jpg" width="54" height="46" alt="clube" title="clube title" />
            <div class="kafe_ritclutxt"><b>Cultivator Gym and Spa</b> <br />Gym, spa, yoga, aerobics
               <img src="images/st.png" width="14" height="13" alt="statt" />
               <img src="images/st3.png" width="14" height="13" alt="statt" />
               <img src="images/st.png" width="14" height="13" alt="statt" />
                <img src="images/st.png" width="14" height="13" alt="statt" />
               <img src="images/st2.png" width="14" height="13" alt="statt" />
              <span class="kafepoin">4.3</span>
              </div>
            <div class="kafe_clu_btm"><span>C-35, behind Canara bank,<br /> main market</span>
            <b>Malviya Nagar, New Delhi</b></div>
            </div>
            <ul class="kafe_clube_ul">
            	<li><img src="images/li3.png" width="20" height="20" alt="followers" /><a href="">13 Followers</a></li>
                <li><img src="images/li2.png" width="20" height="19" alt="user" /><a href="">13 User Reviews</a></li>
                <li><img src="images/li4.png" width="21" height="14" alt="foll" /><a href="">Capacity – 50 people</a></li>
                <li><img src="images/li1.png" width="18" height="22" alt="discount" /><a href="">HealthKafe Discount  Available</a></li>
            </ul>
       <div class="clear"></div>
       </div>-->
       
     
     <div class="clear"></div>    
     </aside>
     
     

<div class="clear"></div>
</section>

<? }?>
<!-- middle sections end html -->
<?php include_once('includes/footer.php');?>

,