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/annoncelights.dk/public_html/services_html/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/u107206879/domains/annoncelights.dk/public_html/services_html/load_data.php
<?php include "../db_connection.php";
if(isset($_POST['start'])){
		$_SESSION['p'] = $_POST['start']/4;
		$_SESSION['page'] = $_POST['page'];
	}
	include_once "../functions.php";
	require_once "../Mobile_Detect.php";
	$detect = new Mobile_Detect;
	
	#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
	if(isset($_POST['data']) && !empty($_POST['data']) && isset($_POST['start'])){
		$postdata = json_decode($_POST['data'],true);
		if(isset($postdata) && !empty($postdata)){
			$page = $_POST['page'];
			$start = $_POST['start'];
			if($page == 'search'){
				$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 LIMIT $start,$num_record ";
			
			if($page == 'search'){
				if(isset($postdata['categories']) && !empty($postdata['categories']) && ($postdata['categories']==2 || $postdata['categories']==4)){
					if(isset($postdata['omrade1']) && !empty($postdata['omrade1'])) {
						$where .= (!empty($where) ? ' AND ' : '') . "(region = '".$postdata['omrade1']."' OR ward = '".$postdata['omrade1']."' OR district = '".$postdata['omrade1']."' OR sub_country = '".$postdata['omrade1']."')";
					}
					if(empty($postdata['radius'])){
						if(isset($postdata['postal_code']) && !empty($postdata['postal_code'])) {
							$where .= (!empty($where) ? ' AND ' : '') . "post_code LIKE '%".$postdata['postal_code']."%'";
						}
					}
				}
				
				if(isset($postdata['categories']) && !empty($postdata['categories']) && ($postdata['categories']==1 || $postdata['categories']=="all")){
					
					if(isset($postdata['omrade1']) && !empty($postdata['omrade1'])) {
						$where .= (!empty($where) ? ' AND ' : '') . "(region = '".$postdata['omrade1']."' OR ward = '".$postdata['omrade1']."' OR district = '".$postdata['omrade1']."' OR sub_country = '".$postdata['omrade1']."')";
					}
					
					if($postdata['categories']==1){
						if(empty($postdata['radius'])){
							if(isset($postdata['postal_code']) && !empty($postdata['postal_code'])) {
								$where .= (!empty($where) ? ' AND ' : '') . "(incall LIKE '%".$postdata['postal_code']."%' OR outcall LIKE '%".$postdata['postal_code']."%')";
							}
						}
					}elseif($postdata['categories']=="all"){
						if(isset($postdata['postal_code']) && !empty($postdata['postal_code'])) {
							$where .= (!empty($where) ? ' AND ' : '') . "(post_code LIKE '%".$postdata['postal_code']."%' OR incall LIKE '%".$postdata['postal_code']."%' OR outcall LIKE '%".$postdata['postal_code']."%')";
						}
					}
					
					if(isset($postdata['kon']) && !empty($postdata['kon'])) {
						$where .= (!empty($where) ? ' AND ' : '') . "kon = '".$postdata['kon']."'";
					}
					if(isset($postdata['nationality_id']) && !empty($postdata['nationality_id'])) {
						$where .= (!empty($where) ? ' AND ' : '') . "nationality = '".$postdata['nationality_id']."'";
					}
					
					if(isset($postdata['age1']) && !empty($postdata['age1']) && isset($postdata['age2']) && !empty($postdata['age2']) ){
						$where .= (!empty($where) ? ' AND ' : '') . "alder BETWEEN ".$postdata['age1']." AND ".$postdata['age2'];
					}elseif(isset($postdata['age1']) && !empty($postdata['age1'])) {
						$where .= (!empty($where) ? ' AND ' : '') . "alder >= ".$postdata['age1'];
					}elseif(isset($postdata['age2']) && !empty($postdata['age2'])) {
						$where .= (!empty($where) ? ' AND ' : '') . "alder <= ".$postdata['age2'];
					}
					
					if(isset($postdata['weight1']) && !empty($postdata['weight1']) && isset($postdata['weight2']) && !empty($postdata['weight2']) ){
						$where .= (!empty($where) ? ' AND ' : '') . "weight BETWEEN ".$postdata['weight1']." AND ".$postdata['weight2'];
					}elseif(isset($postdata['weight1']) && !empty($postdata['weight1'])) {
						$where .= (!empty($where) ? ' AND ' : '') . "weight >= ".$postdata['weight1'];
					}elseif(isset($postdata['weight2']) && !empty($postdata['weight2'])) {
						$where .= (!empty($where) ? ' AND ' : '') . "weight <= ".$postdata['weight2'];
					}
					
					if(isset($postdata['height1']) && !empty($postdata['height1']) && isset($postdata['height2']) && !empty($postdata['height2']) ){
						$where .= (!empty($where) ? ' AND ' : '') . "height BETWEEN ".$postdata['height1']." AND ".$postdata['height2'];
					}elseif(isset($postdata['height1']) && !empty($postdata['height1'])) {
						$where .= (!empty($where) ? ' AND ' : '') . "height >= ".$postdata['height1'];
					}elseif(isset($postdata['height2']) && !empty($postdata['height2'])) {
						$where .= (!empty($where) ? ' AND ' : '') . "height <= ".$postdata['height2'];
					}
					
					if(isset($postdata['bryst1']) && !empty($postdata['bryst1']) && isset($postdata['bryst2']) && !empty($postdata['bryst2']) ){
						$where .= (!empty($where) ? ' AND ' : '') . "bryst BETWEEN ".$postdata['bryst1']." AND ".$postdata['bryst2'];
					}elseif(isset($postdata['bryst1']) && !empty($postdata['bryst1'])) {
						$where .= (!empty($where) ? ' AND ' : '') . "bryst >= ".$postdata['bryst1'];
					}elseif(isset($postdata['bryst2']) && !empty($postdata['bryst2'])) {
						$where .= (!empty($where) ? ' AND ' : '') . "bryst <= ".$postdata['bryst2'];
					}
				}
				
				if(isset($_POST['get_search']) && !empty($_POST['get_search'])) {
					$get_search = $_POST['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 = '".$_POST['get_search']."' OR outcall = '".$_POST['get_search']."' OR region = '".$_POST['get_search']."' OR ward = '".$_POST['get_search']."' OR district = '".$_POST['get_search']."' OR sub_country = '".$_POST['get_search']."' OR kon = '".$_POST['get_search']."' OR nationality = '".$_POST['get_search']."' OR telephone_no = '".$_POST['get_search']."' OR profile_tile LIKE '%".$_POST['get_search']."%' OR profile_beskrivelse LIKE '%".$_POST['get_search']."%' ".$extend.")";
				}
				
				if(!isset($postdata['categories']) || $postdata['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($postdata['categories']) && !empty($postdata['categories'])? $postdata['categories']:1) : ' WHERE '.$where_1.' AND category_id='.(isset($postdata['categories']) && !empty($postdata['categories'])? $postdata['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($postdata['categories']) && !empty($postdata['categories'])){
					if(isset($postdata['omrade1']) && !empty($postdata['omrade1'])) {
						$where .= (!empty($where) ? ' AND ' : '') . " ward = '".mysqli_real_escape_string($connection,$postdata['omrade1'])."' OR district = '".mysqli_real_escape_string($connection,$postdata['omrade1'])."' OR sub_country = '".mysqli_real_escape_string($connection,$postdata['omrade1'])."' OR region = '".mysqli_real_escape_string($connection,$postdata['omrade1'])."'";
					}elseif(isset($postdata['nationality_id']) && !empty($postdata['nationality_id'])){
						$where .= (!empty($where) ? ' AND ' : '') . " nationality = '".mysqli_real_escape_string($connection,$postdata['nationality_id'])."'";
					}elseif(isset($postdata['adservice_id']) && !empty($postdata['adservice_id'])){
						$join .= ' INNER JOIN ads_adservices AS ad_serv ON advertise.id = ad_serv.ad_id ';
						$where .= (!empty($where) ? ' AND ' : '') . " ad_serv.adservice_id = ".$postdata['adservice_id'];
					}
				}
				
				$query="SELECT count(*) as num FROM ". $table . $join .(!empty($where) ? ' WHERE ( '. $where .' ) AND '.$where_1.' AND category_id='.(isset($postdata['categories']) && !empty($postdata['categories'])? $postdata['categories']:1) : ' WHERE '.$where_1.' AND category_id='.(isset($postdata['categories']) && !empty($postdata['categories'])? $postdata['categories']:1));
			}
			
			$total_records = mysqli_fetch_array(mysqli_query($connection,$query));
			$total_records = $total_records['num'];
			
			if($start == 0){
		?>
				<input type="hidden" name='total_records' id="total_records" value="<?= $total_records ?>" />
		<?php
			}
			
			if(!isset($postdata['categories']) || $postdata['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($postdata['categories']) && !empty($postdata['categories'])? $postdata['categories']:1) : ' WHERE '.$where_1.' AND category_id='.(isset($postdata['categories']) && !empty($postdata['categories'])? $postdata['categories']:1)). $order ;
			}
			
			if($page == 'search'){
				//Query For Radius Only
				if(isset($postdata['radius']) && !empty($postdata['radius'])){
					if(!isset($postdata['categories']) || $postdata['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($postdata['categories']) && !empty($postdata['categories'])? $postdata['categories']:1) : ' WHERE '.$where_1.' AND category_id='.(isset($postdata['categories']) && !empty($postdata['categories'])? $postdata['categories']:1)). $order;
					}
				}
			}
			
			$result = $connection->query($q);
			$counter=1;
			$class=$second_class='';
			
			if ($result->num_rows > 0) {
				if($page == 'search'){
					$zip1 = $postdata['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;
				while($row = $result->fetch_assoc()) {
					$distance='';
					if(isset($postdata['radius']) && !empty($postdata['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{
						$postdata['radius']=0;
						$distance=0;
						$row_radius=0;
					}
					
					if($distance<=$postdata['radius'] && $row_radius>=$distance){
						//echo $distance." <= ".$postdata['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);
						$main_img=$multi_user_img='';
						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="checklg" class="item col-sms-4 col-xs-6 col-sm-3 col-md-3 itdiv <?php echo $class.' '.$second_class; 
				if(!empty($_POST['listgrid'])){ ?>
				<?php if($_POST['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'] ?>"  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="Massageklinikker";
									$match_area=$row['post_code'];
								}else if($row["category_id"] == '3'){
									$catgry="Escortbureauer";
								}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"]." år | ".$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">Alder:</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="Kvinde";
											}else if($row["kon"] == '2'){
												$kongen="Mand";
											}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">Køn:</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">Højde:</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">Nationalitet:</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">Bryst:</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">Vægt:</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">Område:</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">Dato :</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">Sted :</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">Tid :</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">Registrering :</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">Område :</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);								
								?>
								<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>									 
							</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){
					return 0;
				}
            }else {
                return 0;
            }
		}
	}else{
        return 0;
    }
?>
<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>

Al-HUWAITI Shell