<?php define('access',"False"); 

require_once ("include/connect.php"); require_once ("include/tarihfonksiyonu.php"); require_once ("include/zamanfonksiyonu.php");

$tag = htmlspecialchars($_GET["etiket"], ENT_QUOTES, 'utf-8');

$TagSql = $conn->prepare("SELECT * FROM etiketler WHERE seo = ?");  
$TagSql->execute(array($tag));
while ( $Etiket = $TagSql->fetch() ){
	
$EtiketBaslik = mb_convert_case($Etiket['baslik'], MB_CASE_TITLE, "UTF-8");
	
$NewSql = $conn->prepare("SELECT * FROM blog WHERE anahtar LIKE ? ORDER BY id DESC");  
$NewSql->execute(array("%".$EtiketBaslik."%"));
}
?>

<!DOCTYPE html>
<html lang="tr">
<head>
<meta http-equiv="Content-Type" content="text/html; 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 $EtiketBaslik; ?> | <?php echo htmlspecialchars($_SERVER["HTTP_HOST"], ENT_QUOTES, 'utf-8'); ?></title>
<meta name="description" content="<?php echo $EtiketBaslik; ?> hakkında yazılmış escort makale yazıları" />
<meta name="keywords" content="<?php echo $EtiketBaslik; ?>" />
<link rel="amphtml" href="<?php echo $SiteBilgi["ampurl"].'etiket/'.$tag; ?>" />

<?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>

</head>

<body id="top">

<?php include('include/ustmenu.php'); ?>

<div class="Header_Alani">

<h1 style="text-transform:capitalize;"><?php echo $EtiketBaslik; ?></h1>

</div>

<div class="container">

<div class="col-md-8">	

<?php while($Makale = $NewSql->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="<?php if($Makale['resim'] != ''){ echo 'BlogResim/'.$Makale['resim']; }else{ echo 'img/resimsiz.jpg'; } ?>" alt="<?php echo $Makale['baslik']; ?>" 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,700).'... '; 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>

<div class="col-md-4">

<?php include('include/sidebar.php'); ?>		

</div>

<div class="temizle"></div>

<?php include('include/alt.php'); ?>

</div><!--/.container-->

<script src="js/bootstrap.js"></script>

</body>

</html>