<?php
include("ust.php");

$verino = g("verino");
$icerik_getir=mysql_query("SELECT * FROM bloglar WHERE seo_url='$verino'"); 
$getir=mysql_fetch_array($icerik_getir); 
$id = $getir['id'];
$baslik = $getir['baslik'];
$icerik = $getir['icerik'];
$resim = $getir['resim'];
$tarih = $getir['tarih'];
$goruntuleme = $getir['goruntuleme'];
$seo_anahtarkelime = $getir['seo_anahtarkelime'];
$m_m_seo_url = $getir['seo_url'];
if(empty($baslik)){ echo '<meta http-equiv="refresh" content="0;URL=anasayfa/">';}else{
	
$sayi1= $goruntuleme;
$sayi2=1;
$toplam=$sayi1+$sayi2;
$duzenle = mysql_query("update bloglar set goruntuleme='$toplam' where id='$id'") or die("Hata Olustu!");

$d_g_sayfa_d_tum = $dil_v_getir['m10'];

## BLOGLAR MODÜLÜ 
$m_kontrol=mysql_query("SELECT * FROM moduller WHERE modul_adi='bloglar'"); 
$getir=mysql_fetch_array($m_kontrol); 
$blog_s_bar = $getir['modul_v4'];
$blog_m_go = $getir['modul_v2'];
$blog_etiket_mo = $getir['modul_v5'];
?>
	

	<br>
	<section class="service-single">
	<div class="container">
	
	
	<?php if($blog_s_bar == "kullanma"){ ?>
	<div class="row">
	<div class="col-lg-12 col-12">
	<h2><?php echo $baslik;?></h2>
	<hr>
	<div class="service-img">
	<center><img src="<?php echo $resim;?>" alt="<?php echo $baslik;?>"></center>
	</div>
	<br>
	<div class="blog-detail">
	<ul class="news-meta">
	<li><i class="fa fa-calendar"></i><?php echo $tarih;?></li>
	<?php if($blog_m_go == "evet"){?><li><i class="fa fa-eye"></i><?php echo $goruntuleme;?></li><?php } ?>
	</ul>
	</div>
	
	<br>
	<div class="service-content">
	<?php echo $icerik;?>
	<div class="blog-sidebar">
	<div class="tagcloud">
	<ul>
	<?php
	$dizi = explode (",",$seo_anahtarkelime);
	$i=0;
	foreach ($dizi as $d) {
	if($i==50){
	echo '<br>';
	$i=0;
     }
	$i++;
	echo '<li><a href="blog/'.$m_m_seo_url.'" style="margin-top:5px;">'.$d.'</a></li>';
	}
	?>
	</ul>
	</div>
	</div>
	<br>				
	<br>				
	</div>
	</div>

	</div>
	<?php } ?>
	
	<?php if($blog_s_bar == "sag"){ ?>
	<div class="row">
	<div class="col-lg-8 col-12">
	<h2><?php echo $baslik;?></h2>
	<hr>
	<div class="service-img">
	<img src="<?php echo $resim;?>" alt="<?php echo $baslik;?>">
	</div>
	<br>
	<div class="blog-detail">
	<ul class="news-meta">
	<li><i class="fa fa-calendar"></i><?php echo $tarih;?></li>
	<?php if($blog_m_go == "evet"){?><li><i class="fa fa-eye"></i><?php echo $goruntuleme;?></li><?php } ?>
	</ul>
	</div>
	
	<br>
	<div class="service-content">
	<?php echo $icerik;?>
	<div class="blog-sidebar">
	<div class="tagcloud">
	<ul>
	<?php
	$dizi = explode (",",$seo_anahtarkelime);
	$i=0;
	foreach ($dizi as $d) {
	if($i==50){
	echo '<br>';
	$i=0;
     }
	$i++;
	echo '<li><a href="blog/'.$m_m_seo_url.'" style="margin-top:5px;">'.$d.'</a></li>';
	}
	?>
	</ul>
	</div>
	</div>
	<br>				
	<br>				
	</div>
	</div>

	<div class="col-lg-4 col-12">
	<div class="blog-sidebar">
					
	<div class="single-sidebar bizwheel_latest_news_widget">
	<h2 class="sidebar-title"><?php echo $dil_v_getir['m20']; ?></h2>
	
	<?php
	$blog_al = mysql_query("SELECT * FROM bloglar WHERE veri_dil='$dil_durum' ORDER BY goruntuleme DESC limit 0,5");
	while($yaz=mysql_fetch_array($blog_al)){
	$id = $yaz['id'];
	$b_s_b_baslik = $yaz['baslik'];
	$b_s_b_url = $yaz['seo_url'];
	$b_s_b_resim = $yaz['resim'];
	$b_s_b_tarih = $yaz['tarih'];
	
	echo '
	
	<div class="single-f-news">
	<div class="post-thumb"><a href="blog/'.$b_s_b_url.'"><img src="'.$b_s_b_resim.'" alt="'.$b_s_b_baslik.'"></a></div>
	<div class="content">
	<p class="post-meta" style="padding-top:15px;"><time class="post-date"><i class="fa fa-clock-o" ></i>'.$b_s_b_tarih.'</time></p>
	<h4 class="title"><a href="blog/'.$b_s_b_url.'">'.$b_s_b_baslik.'</a></h4>
	</div>
	</div>
	
	';
	}
	?>			
	</div>
	
	<?php if($blog_etiket_mo == "evet"){?>	
	<div class="single-sidebar tagcloud">
	<h2 class="sidebar-title"><?php echo $dil_v_getir['m21']; ?></h2>
	<ul>
	<?php
	$blog_al = mysql_query("SELECT * FROM bloglar WHERE veri_dil='$dil_durum' ORDER BY RAND() DESC limit 0,3");
	while($yaz=mysql_fetch_array($blog_al)){
	$id = $yaz['id'];
	$a_k_cek = $yaz['seo_anahtarkelime'];
	$a_u_cek = $yaz['seo_url'];
	
	$dizi = explode (",",$a_k_cek);
	$i=0;
	foreach ($dizi as $d) {
	if($i==50){
	echo '<br>';
	$i=0;
     }
	$i++;
	echo '<li><a href="blog/'.$a_u_cek.'">'.$d.'</a></li>';
	}
	}
	?>
	</ul>
	</div>
	<?php } ?>

	</div>
	</div>
	</div>
	<?php } ?>
	
	
	<?php if($blog_s_bar == "sol"){ ?>
	<div class="row desktop">
	
	<div class="col-lg-4 col-12">
	<div class="blog-sidebar">
					
	<div class="single-sidebar bizwheel_latest_news_widget">
	<h2 class="sidebar-title"><?php echo $dil_v_getir['m20']; ?></h2>
	
	<?php
	$blog_al = mysql_query("SELECT * FROM bloglar WHERE veri_dil='$dil_durum' ORDER BY goruntuleme DESC limit 0,5");
	while($yaz=mysql_fetch_array($blog_al)){
	$id = $yaz['id'];
	$b_s_b_baslik = $yaz['baslik'];
	$b_s_b_url = $yaz['seo_url'];
	$b_s_b_resim = $yaz['resim'];
	$b_s_b_tarih = $yaz['tarih'];
	
	echo '
	
	<div class="single-f-news">
	<div class="post-thumb"><a href="blog/'.$b_s_b_url.'"><img src="'.$b_s_b_resim.'" alt="'.$b_s_b_baslik.'"></a></div>
	<div class="content">
	<p class="post-meta" style="padding-top:15px;"><time class="post-date"><i class="fa fa-clock-o" ></i>'.$b_s_b_tarih.'</time></p>
	<h4 class="title"><a href="blog/'.$b_s_b_url.'">'.$b_s_b_baslik.'</a></h4>
	</div>
	</div>
	
	';
	}
	?>				
	</div>
	
	<?php if($blog_etiket_mo == "evet"){?>	
	<div class="single-sidebar tagcloud">
	<h2 class="sidebar-title"><?php echo $dil_v_getir['m21']; ?></h2>
	<ul>
	<?php
	$blog_al = mysql_query("SELECT * FROM bloglar WHERE veri_dil='$dil_durum' ORDER BY RAND() DESC limit 0,3");
	while($yaz=mysql_fetch_array($blog_al)){
	$id = $yaz['id'];
	$a_k_cek = $yaz['seo_anahtarkelime'];
	$a_u_cek = $yaz['seo_url'];
	
	$dizi = explode (",",$a_k_cek);
	$i=0;
	foreach ($dizi as $d) {
	if($i==50){
	echo '<br>';
	$i=0;
     }
	$i++;
	echo '<li><a href="blog/'.$a_u_cek.'">'.$d.'</a></li>';
	}
	}
	?>
	</ul>
	</div>
	<?php } ?>

	</div>
	</div>
	
	<div class="col-lg-8 col-12">
	<h2><?php echo $baslik;?></h2>
	<hr>
	<div class="service-img">
	<img src="<?php echo $resim;?>" alt="<?php echo $baslik;?>">
	</div>
	<br>
	<div class="blog-detail">
	<ul class="news-meta">
	<li><i class="fa fa-calendar"></i><?php echo $tarih;?></li>
	<?php if($blog_m_go == "evet"){?><li><i class="fa fa-eye"></i><?php echo $goruntuleme;?></li><?php } ?>
	</ul>
	</div>
	
	<br>
	<div class="service-content">
	<?php echo $icerik;?>
	<div class="blog-sidebar">
	<div class="tagcloud">
	<ul>
	<?php
	$dizi = explode (",",$seo_anahtarkelime);
	$i=0;
	foreach ($dizi as $d) {
	if($i==50){
	echo '<br>';
	$i=0;
     }
	$i++;
	echo '<li><a href="blog/'.$m_m_seo_url.'" style="margin-top:5px;">'.$d.'</a></li>';
	}
	?>
	</ul>
	</div>
	</div>
	<br>				
	<br>				
	</div>
	</div>


	</div>
	
	
	<div class="row mobile">
	<div class="col-lg-8 col-12">
	<h2><?php echo $baslik;?></h2>
	<hr>
	<div class="service-img">
	<img src="<?php echo $resim;?>" alt="<?php echo $baslik;?>">
	</div>
	<br>
	<div class="service-content">
	<?php echo $icerik;?>
	<br>				
	</div>
	</div>

	<div class="col-lg-4 col-12">
	<div class="service-sidebar">	
	<div class="service-single-sidebar widget">
	<h2 class="widget-title"><?php echo $d_g_sayfa_d_tum;?></h2>		
	<div class="menu-service-menu-container">
	<ul id="menu-service-menu" class="menu">
	<?php
	$sayfa_al = mysql_query("SELECT * FROM sayfalar WHERE veri_dil='$dil_durum' ORDER BY id DESC limit 0,999");
	while($yaz=mysql_fetch_array($sayfa_al)){
	$id = $yaz['id'];
	$y_m_baslik = $yaz['baslik'];
	$y_m_url = $yaz['seo_url'];
	
	echo '	<li><a href="sayfa/'.$y_m_url.'">'.$y_m_baslik.'</a></li>';
	}
	?>
	</ul>
	</div>
	</div>		
	</div>
	</div>
	</div>
	<?php } ?>
	
	</div>
	</section>	

		
<?php
include("alt.php"); }
?>		