<?php define('access',"False");
require_once ("include/connect.php"); require_once ("include/tarihfonksiyonu.php"); require_once ("include/zamanfonksiyonu.php");
$getseo 		= htmlspecialchars($_GET['seo'], ENT_QUOTES, 'utf-8');
$ilanCek 	= $conn->prepare("select * from uyeler where seo=?");
$ilanCek->execute(array($getseo));
$ilanYazdir = $ilanCek->fetch();
$EscID  	= $ilanYazdir["id"];

if(!$EscID){
Header("Location:".$SiteBilgi['siteurl']."404.php"); exit();
}
if($ilanYazdir["seo"] != $_GET["seo"]){
Header("Location:".$SiteBilgi['siteurl']."404.php"); exit();
}

$ResimSorgusu  	= $conn->prepare("select * from resimler where uye_id = ? order by id asc limit 1");
$ResimSorgusu->execute(array($EscID));
$ResimCek = $ResimSorgusu->fetch(); 
$Resimm	 	= $ResimCek['resim'];
?>
<?php
$hit  = $ilanYazdir['hit'];
$ekle = $hit+1;
$guncelle = $conn->prepare("Update uyeler set hit=? Where id=? ");
$guncelle->execute(array($ekle,$EscID));
/*<------ Günlük Sayaç ------->*/
date_default_timezone_set('Europe/Istanbul');
$Bugun = date("d-m-Y");
$GunlukSorgula = $conn->prepare("select * from gunluk where id = ? ");
$GunlukSorgula->execute(array($EscID));
$Karsilastir = $GunlukSorgula->rowcount();
if($Karsilastir < 1){
$girdi = $conn->prepare("insert into gunluk (id,hit,tarih) values (?,?,?)");
$girdi->execute(array($EscID,'1',$Bugun));
}elseif($Karsilastir > 0){
$row_gunluk  = $GunlukSorgula->fetch();
$Gun		= $row_gunluk['tarih'];
if($Gun == $Bugun){	
$Gunluk		= $row_gunluk['hit'];
$Arttir		= $Gunluk+1;
$guncel = $conn->prepare("update gunluk set hit = ? where id = ? ");
$guncel->execute(array($Arttir,$EscID));
}elseif($Gun != $Bugun){
$kaydet = $conn->prepare("update gunluk set hit = ? , tarih = ? where id = ? ");
$kaydet->execute(array('1',$Bugun,$EscID));
}
}
$GunlukHitSor = $conn->prepare("select * from gunluk where id = ?");
$GunlukHitSor->execute(array($EscID));
$GunlukHit    = $GunlukHitSor->fetch();
?>
<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="utf-8">
<base href="<?php echo $SiteBilgi['siteurl']; ?>" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1"> 
<title><?php echo $ilanYazdir['isim']; ?> | <?php echo $SiteBilgi["logoyazi"]; ?></title>
<meta name="keywords" content="<?php echo $ilanYazdir["anahtar"]; ?>" />
<meta name="description" content="<?php $metin = mb_substr($ilanYazdir['aciklama'],0,190).''; echo strip_tags($metin); ?>">
<link rel="amphtml" href="<?php echo $SiteBilgi['ampurl'].$ilanYazdir["seo"]; ?>" />
<link rel="canonical" href="<?php echo $SiteBilgi["siteurl"].$ilanYazdir["seo"]; ?>" />
<?php echo $SiteBilgi["head"]; ?>
<link rel="icon" href="img/favicon.png">
<link rel="stylesheet" href="css/bootstrap.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/site.php">
<script src="js/jquery-1.10.2.js"></script>
<script src="js/anasayfa.js"></script>
<link  href="vendor/fotorama/fotorama.css" rel="stylesheet">
<script src="vendor/fotorama/fotorama.js"></script>
<link rel="stylesheet" href="vendor/font-awesome/css/font-awesome.css">
<link rel="stylesheet" href="vendor/colorbox/colorbox.css" />
<script src="vendor/colorbox/jquery.colorbox.js"></script>
<script>
$(document).ready(function(){
//Examples of how to assign the Colorbox event to elements
$(".iframe").colorbox({iframe:true, width:"80%", height:"60%"});
$(".callbacks").colorbox({
onOpen:function(){ alert('onOpen: colorbox is about to open'); },
onLoad:function(){ alert('onLoad: colorbox has started to load the targeted content'); },
onComplete:function(){ alert('onComplete: colorbox has displayed the loaded content'); },
onCleanup:function(){ alert('onCleanup: colorbox has begun the close process'); },
onClosed:function(){ alert('onClosed: colorbox has completely closed'); }
});
//Example of preserving a JavaScript event for inline calls.
$("#click").click(function(){ 
$('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
return false;
});
});
</script>
<script type="application/ld+json">{
"@context": "http://schema.org",
"@type": "NewsArticle",
"headline": "<?php echo $ilanYazdir['isim']; ?> - <?php echo $SiteBilgi["logoyazi"]; ?>",
"author": "Gerçek Escort Bayan İlanları",
"datePublished":"<?php echo $ilanYazdir['tarih']; ?>T15:30:15+00:00",
"dateModified":"<?php echo date('Y-m-d'); ?>T<?php echo date('H:i:s'); ?>+00:00",
"dateline": "Istanbul, TR",
"mainEntityOfPage": "true",
"articleSection": "Internet",
"articleBody": "<?php echo $ilanYazdir['isim']; ?> - <?php echo $SiteBilgi["logoyazi"]; ?>",
"image": {
"@type": "imageObject",
"url": "<?php echo $SiteBilgi["siteurl"]; ?>ModelResim/<?php echo $Resimm; ?>",
"height": "400",
"width": "300"
},
"publisher": {
"@type": "Organization",
"name": "Gerçek Escort Bayan İlanları",
"logo": {
"@type": "imageObject",
"url": "<?php echo $SiteBilgi["siteurl"]; ?>ModelResim/<?php echo $Resimm; ?>"
}
}
}</script>
</head>
<body id="top">
<?php include('include/ustmenu.php'); ?>
<div class="Header_Alani">
<h1><?php echo $ilanYazdir['isim']; ?></h1>
</div>
<div class="container">
<?php if($ilanYazdir["durum"]!="Yayında"){ ?>
<div class="col-md-8">
<div class="panel panel-default"><div class="panel-body">
<div class="alert alert-warning text-center"><strong><span class="glyphicon glyphicon-lock"></span><br/><br/><?php echo $ilanYazdir['isim']; ?> profiline ait bilgiler gizlenmiştir.</strong><br/> İlanın süresi dolmuş veya yayından kaldırılmış olabilir.</div>
<hr>
<div class="blink center">	
<a href="./" class="btn btn-md btn-default small">VİTRİN İLANLARINA DÖNMEK İÇİN TIKLAYIN</a>
</div>
</div></div>
<?php 
$sorustur = $conn->prepare("select * from blog where durum = ? and kategori = ? order by rand() limit 8");
$sorustur->execute(array('Aktif', $ilanYazdir['kategori']));
while($Makale = $sorustur->fetch()){
$kategoriSorgula = $conn->prepare("select * from kategori where id = ?");
$kategoriSorgula->execute(array($Makale['kategori']));
$kateqoriCek = $kategoriSorgula->fetch();	
?>			
<div class="panel panel-default panel-stili">
<div class="panel-body">
<div class="media">
<a class="pull-left" href="escort/<?php echo $Makale['seo']; ?>">
<div class="cerceve"><img src="BlogResim/<?php echo $Makale['resim']; ?>" alt="<?php echo $Makale['isim']; ?>" class="resim"></div>
</a>
<div class="panel-body">
<h4 class="media-heading"><a href="escort/<?php echo $Makale['seo']; ?>"><?php echo $Makale['baslik']; ?></a></h4>
<p class="detay"><?php $metin = mb_substr($Makale['aciklama'],0,900).'... '; echo strip_tags($metin); ?> <a href="escort/<?php echo $Makale['seo']; ?>"> okumaya devam et</a></p><hr/>
<ul class="list-inline list-unstyled">
<small><i class="glyphicon glyphicon-calendar"></i>  <?php echo turkcetarih('j F Y',$Makale['yil'].'-'.$Makale['tarih']); ?></small>
<li>|</li>
<small><i class="glyphicon glyphicon-th-list"></i> <a href="kategori/<?php echo $kateqoriCek['seo']; ?>"><?php echo $kateqoriCek['baslik']; ?></a></small>
<li>|</li>
<small><i class="glyphicon glyphicon-eye-open"></i> <?php echo $Makale['hit']; ?></small>
</ul>
</div>
</div>
</div>
</div>
<?php } ?>
</div>
<?php }else{ ?>
<div class="col-md-8">	
<div class="panel panel-danger">
<div class="panel-body" style="background:#222222;">
<?php
$ResimSorgu  	= $conn->prepare("select * from resimler where uye_id = ? order by id asc");
$ResimSorgu->execute(array($EscID));
$count = $ResimSorgu->rowcount();
if ($count > 0){ 
?>
<div class="fotorama" data-fit="cover" data-allowfullscreen="true" data-width="100%" data-maxwidth="100%" data-ratio="16/9" data-allowfullscreen="true" data-keyboard="true" data-nav="thumbs" data-loop="true" data-autoplay="true" data-transition="dissolve" data-hash="true" data-arrows="always">
<?php while($UyeResimCek = $ResimSorgu->fetch()){ 
$id 		= $UyeResimCek['id'];
$resim	 	= $UyeResimCek['resim']; ?>
<img src="ModelResim/<?php echo $resim; ?>" alt="<?php echo $ilanYazdir['isim']; ?>" data-caption="" data-fit="contain" width=" " height=" ">
<?php } ?>	 
</div>
<?php }else{ ?>
<div class="fotorama" data-fit="cover" data-allowfullscreen="native" data-width="100%" data-maxwidth="100%" data-ratio="16/9" data-allowfullscreen="true" data-nav="thumbs" data-loop="true" data-autoplay="true">
<img src="img/resimyok.png" alt="<?php echo $ilanYazdir['isim']; ?>" data-caption="" data-fit="contain" width=" " height=" ">
</div>
<?php } ?>
</div>					
</div>
<!-- PROFİL RESİM SON -->
<!-- BİLGİ BAŞ -->	
<div class="panel panel-default panel-stili">
<div class="panel-heading">
<h3 class="panel-title text-center">BİLGİLERİ</h3>
</div>
<div class="panel-body">
<p><?php echo $ilanYazdir['aciklama']; ?></p>
<h3 class="text-center blink2"><?php echo $ilanYazdir['telefon']; ?></h3>	
<hr>
<div class="text-center">

<?php if($ilanYazdir['iletisim'] == 0){ ?>
<a href="https://api.whatsapp.com/send?phone=<?php echo $ilanYazdir['whatsapp']; ?>&amp;text=Merhaba numaranızı <?php echo htmlspecialchars($_SERVER["HTTP_HOST"], ENT_QUOTES, 'utf-8'); ?> sitesinden aldım" data-pageref-id="<?php echo $EscID; ?>" onClick="onClick(this)"><img class="" width="230" height=" " src="img/whatsapp-buton.png" alt="<?php echo $ilanYazdir['isim']; ?> whatsapp sohbet"></a>
<a rel="nofollow" href="tel://<?php echo $ilanYazdir['telefon']; ?>" data-pageref-id="<?php echo $EscID; ?>" onClick="onClick(this)"><img class="" width="230" height=" " src="img/ara-buton.png" alt="<?php echo $ilanYazdir['isim']; ?> whatsapp sohbet"></a>
<?php }elseif($ilanYazdir['iletisim'] == 1){ ?>
<a rel="nofollow" href="tel://<?php echo $ilanYazdir['telefon']; ?>" data-pageref-id="<?php echo $EscID; ?>" onClick="onClick(this)"><img class="" width="230" height=" " src="img/ara-buton.png" alt="<?php echo $ilanYazdir['isim']; ?> whatsapp sohbet"></a>
<?php }elseif($ilanYazdir['iletisim'] == 2){ ?>
<a href="https://api.whatsapp.com/send?phone=<?php echo $ilanYazdir['whatsapp']; ?>&amp;text=Merhaba numaranızı <?php echo htmlspecialchars($_SERVER["HTTP_HOST"], ENT_QUOTES, 'utf-8'); ?> sitesinden aldım" data-pageref-id="<?php echo $EscID; ?>" onClick="onClick(this)"><img class="" width="230" height=" " src="img/whatsapp-buton.png" alt="<?php echo $ilanYazdir['isim']; ?> whatsapp sohbet"></a>
<?php } ?>

</div>
<hr>
<div class="container-fluid">
<div class="row">
<div class="col-md-12 text-center">
<div class="da-share-html da-fb da-tw da-vk da-ok da-pi"></div>
</div>
</div>
</div>
<hr>
<div class="col-md-12" style="text-align:center;">	
<a href="./" class="btn btn-md btn-danger"><strong class=" blink">TÜM VİTRİN İLANLARINA<br> DÖNMEK İÇİN TIKLAYIN</strong></a>
</div>
</div>
<div class="item-content-block tags">
<span class="btn btn-xs btn-danger">ETİKETLER</span>  
<?php $TagSql = $conn->prepare("SELECT DISTINCT seo id,baslik,seo,konu FROM uyeetiketler WHERE konu = ?");  
$TagSql->execute(array($ilanYazdir['id']));
while ( $Etiket = $TagSql->fetch() ){
echo '<a class="button" href="escort-etiket/'.$Etiket['seo'].'" data-toggle="tooltip" title="'.$Etiket['baslik'].'"/>'.$Etiket['baslik'].'</a> '; 
} ?>
</div>
<div class="panel-footer">
<center>
<small><i class="glyphicon glyphicon-calendar"></i> <strong>İlan Tarihi : <?php echo turkcetarih('j F Y',$ilanYazdir['tarih']); ?></strong> <small>(<?php echo XzamanOnce($ilanYazdir['tarih']); ?>)</small></small>
<br>
<small><i class="glyphicon glyphicon-stats"></i> <strong>Bugün <?php echo $GunlukHit['hit']; ?> - Toplam <?php echo $ilanYazdir['hit']; ?> ziyaretçi</strong></small>
</center>
</div>
</div>
<!-- BİLGİ SON -->
<div class="clear:both;"></div>
</div>
<?php } ?>
<div class="clear:both;"></div>
<div class="col-md-4">	
<div class="panel panel-default panel-stili">
<div class="panel-heading">
<h3 class="panel-title"><center>Yakın Konum</center></h3>
</div>
<div class="panel-body">
<iframe src="https://www.google.com/maps/embed/v1/place?key=<?php echo $SiteBilgi['mapsapi']; ?>&q=<?php echo $ilanYazdir['semt']; ?>+<?php echo $ilanYazdir['sehir']; ?>" width="100%" height="300" frameborder="0" style="border:0" allowfullscreen></iframe>	 
</div>
</div>		
<?php include('include/sidebar.php'); ?>
</div>		
<div class="temizle"></div>
<?php include('include/alt.php'); ?>
</div><!--/.container-->
<script>
function onClick(e) {
var id = e.getAttribute('data-pageref-id');
var post = 'id='+id;
var req = new XMLHttpRequest();
req.open('POST', 'telclick.php', true);
req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');

req.onreadystatechange = function(){
if (req.readyState !== 4 || req.status !== 200) return;
document.getElementById("clicks").innerHTML = req.responseText;
};
req.send(post);

};
</script>
<script src="js/bootstrap.js"></script>
<script type="text/javascript" src="js/jquery.da-share.js?v2"></script>
</body>
</html>