<?php if(!defined('access')){ echo "Hacking ?"; exit(); } ?>
<div class="panel panel-default panel-stili">
<div class="panel-heading">
<h3 class="panel-title"><span class="glyphicon glyphicon-star" aria-hidden="true"></span> En Çok Okunan Yazılar</h3>
</div>
<div class="panel-body">
<ul class="media-list">
<?php
$populerSor = $conn->prepare("select * from blog where durum=? order by hit desc limit 5");
$populerSor->execute(array('Aktif'));
while($populer = $populerSor->fetch()){
?>			
<li class="media">
<div class="media-left">
<div class="yan-cerceve"><a href="escort/<?php echo $populer['seo']; ?>"><img src="<?php if($populer['resim'] != ''){ echo 'BlogResim/'.$populer['resim']; }else{ echo 'img/resimsiz.jpg'; } ?>" alt="<?php echo $populer['baslik']; ?>" width="60" height="60" class="yan-resim"></a></div>
</div>
<div class="media-body">
<h5 class="media-heading">
<a href="escort/<?php echo $populer['seo']; ?>"><?php echo $populer['baslik']; ?></a>
<!--<br><small><?php echo turkcetarih('j F Y',$populer['yil'].'-'.$populer['tarih']); ?></small>-->
</h5>
<p class="small"><?php $metin = mb_substr($populer['aciklama'],0,140).'... '; echo strip_tags($metin); ?></p>
</div>
</li>
<?php } ?>					
</ul>
<a href="./makaleler" class="btn btn-danger btn-block">Tüm Yazılar »</a>
</div>
</div>
<div class="panel panel-default  panel-stili">
<div class="panel-heading">
<h3 class="panel-title"><span class="glyphicon glyphicon-asterisk" aria-hidden="true"></span> Kategoriler</h3>
</div>
<div class="list-group kategorilistesi">
<?php
$katSor = $conn->prepare("select * from kategori order by baslik asc");
$katSor->execute();
while($kategori = $katSor->fetch()){
?>
<a class="list-group-item" href="kategori/<?php echo $kategori['seo']; ?>"><?php echo $kategori['baslik']; ?></a>
<?php } ?>
</div>
</div>