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/ |
<?php if(!empty(WEBSITE_SLIDER) && trim(WEBSITE_SLIDER)=="Active"){ ?>
<ul class="slides image-box style9">
<?php
//$sql="SELECT adv.id, adv.em_id, adv.category_id, adv.region, adv.alder, adv.nationality, nat.".$nationality_column.",adv.profile_tile, im.photo FROM advertise as adv INNER JOIN images as im ON im.ad_id = adv.id INNER JOIN nationalities AS nat ON nat.id=adv.nationality WHERE adv.plan_id=3 AND adv.adstatus=1 AND adv.isApproved=1 AND im.is_profile = 1";
$sql="SELECT adv.id, adv.em_id, adv.category_id, adv.region, adv.alder, adv.nationality, adv.profile_tile, im.photo FROM advertise as adv INNER JOIN images as im ON im.ad_id = adv.id WHERE adv.plan_id=3 AND adv.adstatus=1 AND adv.isApproved=1 AND im.is_profile = 1";
$result = mysqli_query($connection,$sql);
while($slidrow=mysqli_fetch_array($result)){
#fetch nationlity seperate start
if(!empty($slidrow[nationality])){
$nationality = "select nat.".$nationality_column." from nationalities AS nat where nat.id='$slidrow[nationality]'";
$result_nationality = mysqli_query($connection,$nationality);
$nationality_data=mysqli_fetch_array($result_nationality);
$slidrow[$nationality_column] = $nationality_data[$nationality_column];
}else{
$slidrow[$nationality_column] = "";
}
#fetch nationlity seperate stop
#profile link code start
$row_page_ads_links =array();
$sql_page_ads_links="select * from page_ads_links where type='Profile' and ad_id='".$slidrow['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='".$slidrow['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='".$slidrow['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='".$slidrow['id']."' LIMIT 1";
}else{
$sql_page_ads_links="select * from page_ads_links where type='Profile' and ad_device='desktop' and ad_id='".$slidrow['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
if($slidrow["category_id"] == '1'){
$category="Escort";
}else if($slidrow["category_id"] == '2'){
$category="Massage Clinics";
}else if($slidrow["category_id"] == '3'){
$category="Escort Agencies";
}else if($slidrow["category_id"] == '4'){
$category="Thai Massage";
}else if($slidrow["category_id"] == '5'){
$category="Events";
}
$image = '310_'.$slidrow['photo'];
if (!file_exists('../thumbnails/'.$image)) {
$src = MAIN_URL.'/user_images/'.$slidrow['photo'];
}else{
$src = MAIN_URL.'/thumbnails/'.$image;
}
?>
<li>
<article class="box">
<figure>
<?php 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" class="yellow"><img src="<?= $src ?>" alt="<?= $slidrow["profile_tile"] ?>" title="<?= $slidrow["profile_tile"] ?>" /></a>
<?php }else{ ?>
<a href="<?php echo SUB_URL; ?>/<?php if($slidrow["category_id"] ==5){?>events<?php }else{ ?>user_detail<?php } ?>/<?php echo $slidrow["id"]."/".friendly_seo_string($slidrow["profile_tile"]);?>" class="yellow"><img src="<?= $src ?>" alt="<?= $slidrow["profile_tile"] ?>" title="<?= $slidrow["profile_tile"] ?>" /></a>
<?php } ?>
</figure>
<div class="details details_slider">
<h3 class="box-title text_ellipsis">
<?php
echo ucwords(mb_strtolower($slidrow["profile_tile"],'UTF-8'));
?>
</h3>
<?php
if($slidrow["category_id"] != '1'){
$slider_line=$category;
}else{
$slider_line=$slidrow["alder"]." years | ".$slidrow[$nationality_column];
}
?>
<label class="box-title">
<?= $slider_line ?>
</label>
</div>
</article>
</li>
<?php
}
?>
</ul>
<?php } ?>