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

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

$d_g_etiket = $dil_v_getir['m21'];
$d_g_urun_ilgili = $dil_v_getir['m31'];

## ÜRÜNLER MODÜLÜ 
$m_kontrol=mysql_query("SELECT * FROM moduller WHERE modul_adi='urunler'"); 
$getir=mysql_fetch_array($m_kontrol); 
$urun_m_fiyat = $getir['modul_v4'];
$urun_m_durum = $getir['modul_durum'];
$modul_v5 = $getir['modul_v5'];
$modul_v6 = $getir['modul_v6'];
$modul_v7 = $getir['modul_v7'];

if($urun_m_durum == "acik"){
?>
	

	<br>
	<section class="service-single">
	<div class="container">
	
	

	<div class="row">
	<div class="col-lg-8 col-12">
	
	<div class="col-md-12 mobile">
	<h2><?php echo "$baslik";?></h2>
	<font style="font-size:18px;font-weight:bold;"><?php if($urun_m_fiyat == "evet"){ echo "<font color='#ff9600'> $tl_formati "; echo $dil_v_getir['dil_para']; echo "</font> ";}else{}?></font>
	<hr>
	</div>
	<div class="service-img">
	<img src="<?php echo $resim;?>" alt="<?php echo $baslik;?>">
	</div>
	<br>
	<div class="row mobile">
	<div class="col-6">
	<?php if($modul_v6 == "evet"){ ?>
	<a href="buy/<?php echo $verino;?>"><button class="btn btn-block btn-warning" style="font-weight:bold;"> <?php echo $dil_v_getir["m69"];?></button></a>
	<?php } ?>	
	</div>

	<div class="col-6" style="margin-top:5px;">
	<?php if($modul_v7 == "evet"){ ?>
	<div>
	<div class="socialshare"><a onclick="window.open('https://www.facebook.com/sharer/sharer.php?u=https://<?php echo $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; ?>', 'share-dialog', 'width=560,height=436');"><i class="fa fa-facebook"></i></a></div>
	<div class="socialshare"><a onclick="window.open('https://twitter.com/share?url=https://<?php echo $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; ?>&text=<?php echo $baslik;?>', 'share-dialog', 'width=560,height=436');"><i class="fa fa-twitter"></i></a></div>
	<div class="socialshare"><a onclick="window.open('http://pinterest.com/pin/create/button/?url=https://<?php echo $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; ?>&description=<?php echo $baslik;?>', 'share-dialog', 'width=560,height=436');"><i class="fa fa-pinterest"></i></a></div>
	</div>
	
	<?php } ?>
	</div></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="urun/'.$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="service-sidebar">
	
	<div class="service-single-sidebar widget">
	<h2 class="widget-title"><?php echo $baslik; ?></h2>		
	<div class="menu-service-menu-container"> 
	<?php if($urun_m_fiyat == "evet"){?>
	
	<h5><?php echo "$tl_formati "; echo $dil_v_getir["dil_para"];?></h5><br>
	
	<?php if($modul_v6 == "evet"){ ?>
	<a href="buy/<?php echo $verino;?>">
	<button class="btn btn-block btn-warning" style="font-weight:bold;"><i class="fa fa-credit-card-alt" aria-hidden="true"></i> <?php echo $dil_v_getir["m69"];?></button>
	</a>
	<?php } ?>
	<?php } ?>

	</div>
	</div>
	
	<?php if($modul_v7 == "evet"){ ?>
	<div >
	<div class="socialshare"><a onclick="window.open('https://www.facebook.com/sharer/sharer.php?u=https://<?php echo $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; ?>', 'share-dialog', 'width=560,height=436');"><i class="fa fa-facebook"></i></a></div>
	<div class="socialshare"><a onclick="window.open('https://twitter.com/share?url=https://<?php echo $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; ?>&text=<?php echo $baslik;?>', 'share-dialog', 'width=560,height=436');"><i class="fa fa-twitter"></i></a></div>
	<div class="socialshare"><a onclick="window.open('http://pinterest.com/pin/create/button/?url=https://<?php echo $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; ?>&description=<?php echo $baslik;?>', 'share-dialog', 'width=560,height=436');"><i class="fa fa-pinterest"></i></a></div>
	</div>
	<br><br>
	<?php } ?>
	
	
	<div class="service-single-sidebar widget">
	<h2 class="widget-title"><?php echo $dil_v_getir['m30']; ?></h2>		
	<div class="menu-service-menu-container">
	<ul id="menu-service-menu" class="menu">
	<?php
	$sayfa_al = mysql_query("SELECT * FROM urun_kategori WHERE veri_dil='$dil_durum' ORDER BY id ASC limit 0,999");
	while($yaz=mysql_fetch_array($sayfa_al)){
	$id = $yaz['id'];
	$kategori_baslik= $yaz['baslik'];
	$kategori_url = $yaz['seo_url'];
	
	$query3 = mysql_query("SELECT * FROM `urunler` WHERE m15='$id'");
	$p_b_k_sayi = mysql_num_rows($query3);
	
	echo '	<li><a href="urunler/'.$kategori_url.'">'.$kategori_baslik.' <font style="float:right;">('.$p_b_k_sayi.')</font></a></li>';
	}
	?>
	</ul>
	</div>
	</div>
	
	
	
	</div>
	
	<div class="blog-sidebar">
	<div class="single-sidebar bizwheel_latest_news_widget">
	<h2 class="sidebar-title"><?php echo $dil_v_getir['m31']; ?></h2>
	
	<?php
	$blog_al = mysql_query("SELECT * FROM urunler WHERE veri_dil='$dil_durum' AND m15='$urun_kategori_al' ORDER BY goruntuleme DESC limit 0,5");
	while($yaz=mysql_fetch_array($blog_al)){
	$id = $yaz['id'];
	$urun_baslik_o = $yaz['baslik'];
	$urun_url_o = $yaz['seo_url'];
	$urun_resim_o = $yaz['resim'];
	$urun_kategori_o = $yaz['m15'];
	

	$m_kontrol=mysql_query("SELECT * FROM urun_kategori WHERE id='$urun_kategori_o'"); 
	$getir=mysql_fetch_array($m_kontrol); 
	$o_urun_baslik = $getir['baslik'];

	echo '
	<div class="row" style="margin-top:5px;">
	<div class="col-md-5"><a href="urun/'.$urun_url_o.'"><img src="'.$urun_resim_o.'" alt="'.$urun_baslik_o.'"></a></div>
	<div class="col-md-7">
	<a href="urun/'.$urun_url_o.'"><h6>'.$urun_baslik_o.'</h6>'.$o_urun_baslik.'</a>
	</div>
	</div>
	<hr>
	';
	}
	?>			
	</div>
	
	<?php if($modul_v5 == "evet"){ ?>
	<div class="single-sidebar tagcloud">
	<h2 class="sidebar-title"><?php echo $d_g_etiket; ?></h2>
	<ul>
	<?php
	$blog_al = mysql_query("SELECT * FROM urunler 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="urun/'.$a_u_cek.'">'.$d.'</a></li>';
	}
	}
	?>
	</ul>
	</div>
	<?php } ?>
	
	</div>
	



	</div>
	</div>
	
	
	</div>
	</section>	

		
<?php
include("alt.php"); }else{echo '<meta http-equiv="refresh" content="0;URL=anasayfa/">';}}
?>		