<?php 
if (!empty($_GET["seflink"])) 

{
	$seflink=$VT->filter($_GET["seflink"]);
	$bilgi=$VT->VeriGetir("bloglar","WHERE seflink=? AND durum=?",array($seflink,1),"ORDER BY ID ASC",1);
	if ($bilgi!=false) 
	{

		?> 
		<link href="<?=SITE?>css/blog.css" rel="stylesheet">
		<main class="bg_gray">
			<div class="container margin_30">
				<div class="page_header">
					<div class="breadcrumbs">
						<ul>
							<li><a href="<?=SITE?>">Anasayfa</a></li> 
							<li><a href="<?=SITE?>blog">Blog</a></li> 
							<li><?=stripslashes($bilgi[0]["baslik"])?></li>
						</ul>
					</div>
				</div>
				<!-- /page_header -->
				<div class="row">
					<div class="col-lg-9">
						<div class="singlepost">
							<?php 
							if (!empty($bilgi[0]["resim"]))
							{
								?>
								<figure>
									<img alt="" class="img-fluid" src="<?=SITE?>images/bloglar/<?=$bilgi[0]["resim"]?>">
								</figure>
								<?php
							}
							?> 
							<h1><?=stripslashes($bilgi[0]["baslik"])?></h1>
							<div class="postmeta">
								<ul> 
									<li><i class="ti-calendar"></i><?=stripslashes($bilgi[0]["tarih"])?></li> 
								</ul>
							</div>
							<!-- /post meta -->
							<div class="post-content">
								<?=stripslashes($bilgi[0]["metin"])?>
							</div>
							<!-- /post -->
						</div>
						<!-- /single-post -->

						<hr> 

					</div>
					<!-- /col -->

					<aside class="col-lg-3"> 
						<!-- /widget -->
						<div class="widget">
							<div class="widget-title">
								<h4>En Son Bloglar</h4>
							</div>
							<ul class="comments-list">
								<?php 
								$bloglar=$VT->VeriGetir("bloglar","WHERE durum=?",array(1),"ORDER BY ID DESC",4);
								if ($bloglar!=false)
								{
									for ($i=0; $i <count($bloglar) ; $i++) { 

										if(!empty($bloglar[$i]["resim"])) 
										{
											$resim=$bloglar[$i]["resim"];
										}
										else
										{
											$resim="varsayilan";
										}

										?>

										<li>
											<div class="alignleft">
												<a href="<?=SITE?>blog-detay/<?=$bloglar[$i]["seflink"]?>"><img src="<?=SITE?>images/bloglar/<?=$resim?>" alt=""></a>
											</div>
											<small><?=date("d.m.y", strtotime($bloglar[$i]["tarih"]))?></small>
											<h3><a href="<?=SITE?>blog-detay/<?=$bloglar[$i]["seflink"]?>" title=""><?=mb_substr(strip_tags(stripslashes($bloglar[$i]["baslik"])),0,20,"UTF-8")?>..</a></h3>
										</li> 
										<?php
									}
								}
								?>
							</ul>
						</div> 
						<!-- /widget -->
					</aside>
					<!-- /aside -->
				</div>
				<!-- /row -->
			</div>
			<!-- /container -->
				<?php include_once(SAYFA."alt.php"); ?>
		</main>


		<?php
	}
}

?>
