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

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

$d_g_sayfa_d_tum = $dil_v_getir['m10'];

## SAYFALAR MODÜLÜ 
$m_kontrol=mysql_query("SELECT * FROM moduller WHERE modul_adi='sayfalar'"); 
$getir=mysql_fetch_array($m_kontrol); 
$sayfa_s_bar = $getir['modul_v1'];
?>
	

	<br>
	<section class="service-single">
	<div class="container">
	
	
	<?php if($sayfa_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="service-content">
	<?php echo $icerik;?>
	<br>				
	</div>
	</div>

	</div>
	<?php } ?>
	
	<?php if($sayfa_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="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 } ?>
	
	
	<?php if($sayfa_s_bar == "sol"){ ?>
	<div class="row desktop">
	
	<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 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>
	
	
	<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"); }
?>		