<?php
session_start(); ## -> Oturum Başlatıldı
include("ust.php");

?>
	
	<section class="hero-slider style1">
	<div class="home-slider">
	
	<?php
	$slider_al = mysql_query("SELECT * FROM sliderler WHERE veri_dil='$dil_durum' ORDER BY slider_sira ASC limit 0,999");
	while($yaz=mysql_fetch_array($slider_al)){
	$id = $yaz['id'];
	$slider_resim = $yaz['resim'];
	$slider_m4 = $yaz['m4'];
	$slider_m5 = $yaz['m5'];
	$slider_icerik = $yaz['icerik'];
	$slider_m6 = $yaz['m6'];
	$slider_m7 = $yaz['m7'];
	$slider_m8 = $yaz['m8'];
	$slider_m9 = $yaz['m9'];
	?>
	
	<div class="single-slider" style="background-image:url('<?php echo $slider_resim;?>')">
	<div class="container">
	<div class="row">
	<div class="col-lg-7 col-md-8 col-12">
	<div class="welcome-text"> 
	<div class="hero-text"> 
	<?php if(empty($slider_m4)){}else{ echo "<h4 style='background:$tema_bar_renk;'>$slider_m4</h4>";}?>
	<?php if(empty($slider_m5)){}else{ echo "<h1>$slider_m5</h1>";}?>
	<?php if(empty($slider_icerik)){}else{ echo '
	<div class="p-text">
	<p>'.$slider_icerik.'</p>
	</div>
	';}?>
	
	<div class="button">
	<?php if(empty($slider_m6)){}else{ echo '<a href="'.$slider_m7.'" class="bizwheel-btn theme-1 effect">'.$slider_m6.'</a>';}?>
	<?php if(empty($slider_m8)){}else{ echo '<a href="'.$slider_m9.'" class="bizwheel-btn theme-2 effect" style="background:'.$tema_btn_renk.';">'.$slider_m8.'</a>';}?>
	</div>
	</div>
	</div>
	</div>
	</div>
	</div>
	</div>
	
	<?php } ?>
				
	
	</div>
	</section>

	<?php
	
	## DUYURULAR MODÜLÜ 
	$m_kontrol=mysql_query("SELECT * FROM moduller WHERE modul_adi='duyurular'"); 
	$getir=mysql_fetch_array($m_kontrol); 
	$duyuru_m_durum = $getir['modul_durum'];
	$duyuru_m_g_du = $getir['modul_v1'];
	if($duyuru_m_durum == "acik"){
	if($duyuru_m_g_du == "hep"){
	?>
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
	<script type="text/javascript">
	$(window).on('load',function(){
	$('#myModal').modal('show');
	});
	</script>
	<?php
	$sil_m_al = mysql_query("SELECT * FROM duyurular WHERE veri_dil='$dil_durum' ORDER BY id DESC limit 0,1");
	while($yaz=mysql_fetch_array($sil_m_al)){
	$id = $yaz['id'];
	$duyuru_baslik = $yaz['baslik'];	
	$duyuru_icerik = $yaz['icerik'];	
			
	echo '
	<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true" style="z-index:99999999999999;">
	<div class="modal-dialog modal-dialog-centered" role="document">
    <div class="modal-content">
	<div class="modal-header">
	<h5 class="modal-title" id="exampleModalLabel">'.$duyuru_baslik.'</h5>
	<button type="button" class="close" data-dismiss="modal" aria-label="Close">
	<span aria-hidden="true">&times;</span>
	</button>
	</div>
	<div class="modal-body">
	'.$duyuru_icerik.'
	</div>
	<div class="modal-footer">
	<button type="button" class="btn btn-secondary" data-dismiss="modal">Kapat</button>
	</div>
	</div>
	</div>
	</div>
	';
	}?>
	<?php }else{ 
	$d_t_g_kontrol = $_SESSION['duyuru_tamamla'];
	if($d_t_g_kontrol == "ok"){}else{
	$_SESSION['duyuru_tamamla']   = "ok";
	
	
	?>

	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
	<script type="text/javascript">
	$(window).on('load',function(){
	$('#myModal').modal('show');
	});
	</script>
	<?php
	$sil_m_al = mysql_query("SELECT * FROM duyurular WHERE veri_dil='$dil_durum' ORDER BY id DESC limit 0,1");
	while($yaz=mysql_fetch_array($sil_m_al)){
	$id = $yaz['id'];
	$duyuru_baslik = $yaz['baslik'];	
	$duyuru_icerik = $yaz['icerik'];	
			
	echo '
	<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true" style="z-index:99999999999999;">
	<div class="modal-dialog modal-dialog-centered" role="document">
    <div class="modal-content">
	<div class="modal-header">
	<h5 class="modal-title" id="exampleModalLabel">'.$duyuru_baslik.'</h5>
	<button type="button" class="close" data-dismiss="modal" aria-label="Close">
	<span aria-hidden="true">&times;</span>
	</button>
	</div>
	<div class="modal-body">
	'.$duyuru_icerik.'
	</div>
	<div class="modal-footer">
	<button type="button" class="btn btn-secondary" data-dismiss="modal">Kapat</button>
	</div>
	</div>
	</div>
	</div>
	';
	}?>

	<?php } } } ?>
				

	
	<?php
	


	$sira_al = mysql_query("SELECT * FROM asayfa_ayar WHERE veri_dil='$dil_durum' ORDER BY modul_sira ASC limit 0,999");
				
	while($yaz=mysql_fetch_array($sira_al)){
	$id = $yaz['id'];
	$modul_tanim = $yaz['modul_tanim'];
	$modul_v1 = $yaz['modul_v1'];
	$modul_v2 = $yaz['modul_v2'];
	$modul_deger = $yaz['modul_deger'];
	$modul_call = $yaz['modul_call'];
	if($modul_deger == "urunler"){$urun_kats = $modul_v1; $urun_k_sek = $modul_v2;}
	if($modul_deger == "paketler"){$paket_kats = $modul_v1;}

	
	include("moduller/$modul_call.php");
	
	}?>
				

	
	
	
	
	
	
	
	
	
	
		
		

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