<?php include 'includes/header.php';?>
<title><?=$ayar['page_title'];?></title>
<meta name="description" content="<?=$ayar['page_description'];?>">
<meta name="keywords" content="<?=$ayar['page_keywords'];?>">
<meta name="author" content="ParsTech">
<?
$masamiz=1;

if($_GET["masa"] || !$_SESSION["masa"]){
	for ($i=0; $i < 1000; $i++) { 
		if(($_GET["masa"]) == md5($i)){
			$masamiz=$i;  
			$_SESSION["masa_no"]=$i;
			break;
		} 
	}
} 




?>
<body class="mobile_panel homepage ">
	<div class="slider">
		<!-- Slider -->
		<div class="swiper-container slidertoolbar">

			<div class="swiper-wrapper">
				<?php
				$slidsorgu = $dbh->prepare("SELECT * FROM home_banner ");
				$slidsorgu->execute();

				while ($slidsonuc = $slidsorgu->fetch()) {

					$id = $slidsonuc['id'];
					$foto = $slidsonuc['foto']; 
					$title = $slidsonuc['title'];
					$description = $slidsonuc['description'];
					$button = $slidsonuc['button'];  
                    $slidsonuc = cevir("home_banner",$slidsonuc,$_SESSION["dil"]);
                    ?>
                    <div class="swiper-slide" style="background-image:url(img/<?=$slidsonuc['foto'];?>);">
                      <div class="slider_trans">
                         <div class="slider-caption"> 
                            <h2 data-swiper-parallax="-100%"><?=$slidsonuc['title'];?></h2>
                            <p data-swiper-parallax="-30%"><?=$slidsonuc['description'];?></p> <br>
                            <a  class="slide_button" href="<?=$slidsonuc['button'];?>"><span class="subtitle" data-swiper-parallax="-60%"><?php echo $dil['048'];?></span></a>
                        </div>
                    </div>
                </div>

            <?php } ?>

        </div>

        <div class="swiper-pagination"></div>

        <div class="swiper-button-prev mb-4"></div>

        <div class="swiper-button-next mb-4"></div>

    </div>

    <div class="swiper-container-toolbar align-item">

     <div class="swiper-pagination-toolbar"></div>

     <div class="swiper-wrapper">

        <div class="swiper-slide toolbar-icon">

           <div class="restaurant_status">
              <a href="#"><span class="subtitle" data-swiper-parallax="-60%">
               <?
               if(isset( $_SESSION["masa_no"])){

                  $sth = $dbh->prepare("select * from masa_no where id=".$_SESSION["masa_no"]);
                  $sth->execute();
                  $masa_ = $sth->fetch(PDO::FETCH_ASSOC);
                  echo $masa_["masa_adi"];

              }else{
                  echo "Masa Seçilmedi";
              }

              ?>
          </span></a>
                   <a href="#"><span class="subtitle" data-swiper-parallax="-60%">


        <?php

        $zamanlar = $dbh -> prepare("SELECT * FROM calisma_saat WHERE id = ?");
        $zamanlar-> execute(array(date('w')));
        $zamanlar = $zamanlar->fetch(PDO::FETCH_OBJ);

        ?>
        Paket Sipariş : <?php if($zamanlar->paket_gon==0){echo "Paket Siparişi Şuan Kapalıdır";}else{echo "Paket Sipariş Aktif";} ?>
    </span></a>


      </div>
      <div class="homepage_nav_buttons row my-4 sm:my-4 md:my-0 lg:my-0 xl:my-0">
          <div class="col-xs-6 col-sm-4  col-md-2 col-lg-2 col-xl-2 mb-2 sm:mb-2 md:mb-2 lg:mb-0 xl:mb-0">
           <a href="qrsayfa.php"><img src="images/icons/black/qr-code.png" alt="" title="" /><img class="only_mobile_icon" src="images/icons/white/qr-code.png" alt="" title="" /><span><?php echo $dil['025'];?> </span></a>
       </div>
       <div class="col-xs-6 col-sm-4  col-md-2 col-lg-2 col-xl-2 mb-2 sm:mb-2 md:mb-2 lg:mb-0 xl:mb-0">
           <a href="menu"><img src="images/icons/black/food.png" alt="" title="" /><img class="only_mobile_icon" src="images/icons/white/food.png" alt="" title="" /><span><?php echo $dil['007'];?></span></a>
       </div>
       <div class="col-xs-6 col-sm-4  col-md-2 col-lg-2 col-xl-2 mb-2 sm:mb-2 md:mb-2 lg:mb-0 xl:mb-0">
           <a href="siparis-durumu" data-popup=".popup-login" class="open-popup"><img src="images/icons/black/features.png" alt="" title="" /><img class="only_mobile_icon" src="images/icons/white/features.png" alt="" title="" /><span><?php echo $dil['013'];?></span></a>
       </div>
       <div class="col-xs-6 col-sm-4  col-md-2 col-lg-2 col-xl-2 mb-2 sm:mb-2 md:mb-2 lg:mb-0 xl:mb-0">
           <a href="bize-ulasin"><img src="images/icons/black/favorites.png" alt="" title="" /><img class="only_mobile_icon" src="images/icons/white/favorites.png" alt="" title="" /><span><?php echo $dil['015'];?></span></a>
       </div>

   </div>

</div>



</div>

</div>
</div>
<div class="duyuru_alan">
    <div class="container">
        <div class="duyuru_wrapper">
            <div class="swiper-container">
                <div class="swiper-wrapper">
                   <?php
                   $ebultensorgu = $dbh->prepare("SELECT * FROM news ");
                   $ebultensorgu->execute();

                   while ($ebultensonuc = $ebultensorgu->fetch()) {

                    $id = $ebultensonuc['id'];
                    $news_name = $ebultensonuc['news_name'];   
                    $news_description = $ebultensonuc['news_description'];
                    $ebultensonuc = cevir("news",$ebultensonuc,$_SESSION["dil"]);
                    ?>
                    <div class="swiper-slide duyuru_item">
                    	<h2>🔔 <?php echo $dil['049'];?> 🔔</h2> 
                        <h2><?=$ebultensonuc['news_name'];?></h2>
                        <p><?=$ebultensonuc['news_description'];?></p>
                    </div>
                <?php } ?>
            </div>
        </div>
    </div>
</div>
</div>

<div class="instagram_alan">
    <div class="container">
        <div class="instagram_wrapper">
            <a href="#" class="instagram_follow_link" target="_blank"><i class="zmdi zmdi-instagram"></i> <?php echo $dil['050'];?></a>
            <div class="home-author">
                <?
                for ($y = 1; $y <= 10; $y++) {
                    $resim_link = "https://instagram.fsaw2-2.fna.fbcdn.net/v/t51.2885-15/e35/105956109_266286251302541_1390088756089019040_n.jpg?_nc_ht=instagram.fsaw2-2.fna.fbcdn.net&_nc_cat=105&_nc_ohc=ltpmvBhbUwgAX9Fhq7P&tp=1&oh=55d5a1a4dc487287e7cfc2cc5b3c80e6&oe=6035B21F";
                    ?>
                    <div class="author-box">
                        <div class="author-img">
                            <a href="<?=$resim_link?>" class="fancybox" rel="fancybox">
                                <img src="<?=$resim_link?>" alt="author">
                            </a>
                        </div>
                        <div class="author-name">Osman</div>
                    </div>
                <? } ?>
            </div>
        </div>

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


<!--<div class="favorite_products">
    <div class="container">
        <h3>Favori Ürünler</h3>
        <div class="row favorite_product_wrapper">
            <div class="col-md-6 col-sm-6 col-6">
                <div class="favorite_product_box item" data-id="1" data-qty="0" data-title="Veg Cheese Burger" data-price="12.00">
                        <a href="urundetay.php?id=3">
                            <div class="item_img center_img">
                                <img src="images/1.png" class="crop_img">
                            </div>
                            <div class="text_box" (click)="item_detail()">
                                <h2>1test3 <br></h2>
                                <h3>₺50</h3>
                            </div>
                        </a>
                </div>
            </div>
        </div>
    </div>
</div> -->



<?php include 'includes/modal.php';?>
<?php include 'includes/footer.php';?>