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/en/services_html/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/u107206879/domains/annoncelights.dk/public_html/en/services_html/load_more_city.php
<?php
	include "../db_connection.php";
	include_once "../functions.php";
	require_once "../Mobile_Detect.php";
	$detect = new Mobile_Detect;
	
	if(isset($_POST['data']) && !empty($_POST['data']) && isset($_POST['start'])){
		$postdata = json_decode($_POST['data'],true);
		if(isset($postdata) && !empty($postdata)){		
			$city_start = $_POST['start'];
			$city_num_record = 12;
			$where = " WHERE adv.adstatus=1 AND adv.isApproved=1 ";
			$order = " ORDER BY count DESC, place LIMIT $city_start,$city_num_record ";
			if(isset($postdata['categories']) && !empty($postdata['categories'])){
				$where .= (!empty($where) ? ' AND ' : '') . "adv.category_id='".$postdata['categories']."'";
			}
			$union_qry = "SELECT DISTINCT adv.ward as place, count(adv.ward) as count, im.photo FROM advertise as adv LEFT JOIN images as im ON im.ad_id = adv.id $where AND adv.ward!='' AND im.is_profile=1 GROUP BY adv.ward UNION SELECT DISTINCT adv.district as place, count(adv.district) as count, im.photo FROM advertise as adv LEFT JOIN images as im ON im.ad_id = adv.id $where AND adv.district!='' AND im.is_profile=1 GROUP BY adv.district UNION SELECT DISTINCT adv.sub_country as place, count(adv.sub_country) as count, im.photo FROM advertise as adv LEFT JOIN images as im ON im.ad_id = adv.id $where AND adv.sub_country!='' AND im.is_profile=1 GROUP BY adv.sub_country $order";
			$city_sql = mysqli_query($connection,$union_qry);
			$city_row = mysqli_num_rows($city_sql);
			$counter=1;
        	if($city_row > 0){
        		while($city=mysqli_fetch_assoc($city_sql)){
        			$counter++;
				if($city['photo']!=''){
		    			$image = '178_'.$city['photo'];
						if (!file_exists('../../thumbnails/'.$image)) {
							$city_img =  MAIN_URL.'/user_images/'.$city['photo'];
						}else{
							$city_img = MAIN_URL.'/thumbnails/'.$image;
						}
						$city_alt = $city['photo'];			
					}else{
						$city_img = MAIN_URL.'/src/images/270x160.png';
						$city_alt = 'image';
					}
            ?>
					<div class="col-sms-4 col-xs-6 col-sm-3 col-md-2 city_div">
                        <article class="box">
                            <figure class="animated" data-animation-type="fadeInDown" data-animation-duration="2">
                                <a href="<?php echo SUB_URL.'/'.$postdata['category'].'/'.friendly_seo_string($city['place']) ?>" target="_blank">
                                	<img src="<?= $city_img ?>" alt="<?= $get_category.' '.$region['region'] ?>" title="<?= $get_category.' '.$region['region'] ?>" width="270" height="140" class="img_region"/>
                                </a>
                            </figure>
                            <div class="details">
                                <h4 class="box-title"><?= $city['place'] ?><small> (<?= $city['count'] ?>)</small></h4>
                            </div>
                        </article>
                    </div>
		<?php
				}
				if($counter==1){
					return 0;
				}
			}else{
				return 0;
			}
		}
	}
?>

Al-HUWAITI Shell