<?php

$settings = $this->session->userdata('settings');
//p($this->session->merchantInfo); 
$merchantInfo = $this->session->userdata('merchantInfo');

if(isset($settings['website_logo']) && $settings['website_logo'] )
{
	$website_logo = $settings['website_logo'];
}else{
	$website_logo = 'assets/images/logo-mobile.png';
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
		"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" class="">
<head>
	<base href="<?= base_url();?>">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
    <?php
        
        $title = '';
        $getUrl .= "$_SERVER[REQUEST_URI]";
        switch (basename($getUrl)) {
          case ('signup') : $title = $this->session->merchantInfo['restaurant_name'].': Login and Signup'; break;
          case ('menu') : $title = $this->session->merchantInfo['restaurant_name'].': Online Order by Loveeatery'; break;
          case ('checkout') : $title = $this->session->merchantInfo['restaurant_name'].': Checkout'; break;
          case ('guestcheckout') : $title = $this->session->merchantInfo['restaurant_name'].': Guest Checkout'; break;
          case ('cart') : $title = $this->session->merchantInfo['restaurant_name'].': Mobile Cart'; break;
          case ('receipt') : $title = $this->session->merchantInfo['restaurant_name'].': Order Receipt'; break;
          case ('payment_option') : $title = $this->session->merchantInfo['restaurant_name'].': Payment Option'; break;
        }
        echo '<title>'.$title.'</title>';
    ?>
	<link rel="stylesheet" type="text/css" href="assets/css/store.css">
	<link rel="stylesheet" type="text/css" href="assets/css/font-awesome.min.css">
	<link rel="stylesheet" type="text/css" href="assets/css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="assets/css/jquery.raty.css">
	<link rel="stylesheet" type="text/css" href="assets/css/ionicons.min.css">
	<link rel="stylesheet" type="text/css" href="assets/css/bootstrap-select.min.css">
	<link rel="stylesheet" type="text/css" href="assets/css/justifiedGallery.min.css">
	<link rel="stylesheet" type="text/css" href="assets/css/store-v2.css">
	<link rel="stylesheet" type="text/css" href="assets/css/responsive.css">
	<link rel="stylesheet" type="text/css" href="assets/css/custom.css">
	<link rel="shortcut icon" href="https://www.loveeatery.co.nz/favicon.ico?ver=1.1">
	<script src="assets/js/jquery.min.js"></script>
	<script src="assets/vendor/theia-sticky-sidebar.js"></script>
	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
	<script src='https://www.google.com/recaptcha/api.js?render=<?= @$this->session->merchantInfo['recaptcha_site_key']; ?>&ver=3.0'></script>
	


    <!-- Google tag (gtag.js) --> 
    <script async src="https://www.googletagmanager.com/gtag/js?id=<?= @$merchantInfo['google_tag']; ?>">
    </script> 
    <script> window.dataLayer = window.dataLayer || []; 
        function gtag(){dataLayer.push(arguments);} 
        gtag('js', new Date()); 
        gtag('config', '<?= @$merchantInfo['google_tag']; ?>'); 
    </script>
    
    <!-- Google tag (gtag.js) Google Analytics LE-->
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-8G0D9YJ14J"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
    
      gtag('config', 'G-8G0D9YJ14J');
    </script>

	<style>
.fa:hover {
    opacity: 0.7;
}

.fa-facebook {
  background: #3B5998;
  color: white;
  padding: 8px;
  font-size: 15px;
  /*width: 70px;*/
  text-align: center;
  text-decoration: none;
  margin: 5px 2px;
}

.fa-twitter {
  background: #55ACEE;
  color: white;
   padding: 8px;
  font-size: 15px;
  /*width: 70px;*/
  text-align: center;
  text-decoration: none;
  margin: 5px 2px;
}

.fa-google {
  background: #dd4b39;
  color: white;
 padding: 8px;
  font-size: 15px;
  /*width: 70px;*/
  text-align: center;
  text-decoration: none;
  margin: 5px 2px;
}

.fa-instagram {
  background: #125688;
  color: white;
  padding: 8px;
  font-size: 15px;
  /*width: 70px;*/
  text-align: center;
  text-decoration: none;
  margin: 5px 2px;
}

.footer-title{
    font-family: "Roboto Slab";
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    color:#acacab;
}
</style>
	
</head>
<body style="">
<div class="top-menu-wrapper top-index">
	<div class="container border">
		<div class="col-md-3 col-xs-3 border col-a">
		<?php //if($settings['theme_logo_setting'] == 'Yes'){ ?>
			<!--<a href="">-->
			<!--	<img src="<?= $website_logo; ?>" class="logo logo-desktop">-->
			<!--	<img src="<?= $website_logo; ?>" class="logo logo-mobile">-->
			<!--</a>-->
		<?php //} ?>
			<a href="<?= @$merchantInfo['website']; ?>">
				<img src="<?= @$merchantInfo['merchant_logo']; ?>" class="logo logo-desktop">
				<img src="<?= @$merchantInfo['merchant_logo']; ?>" class="logo logo-mobile">
			</a>
		</div>
		<div class="col-xs-1 menu-nav-mobile border relative">
			<a><i class="ion-android-menu"></i></a>
		</div> <!--menu-nav-mobile-->
        <div class="col-xs-1 cart-mobile-handle border relative" style=""> <div class="badge cart_count"></div> <a href="cart"> <i class="ion-ios-cart"></i> </a> </div>
		<div class="col-md-9 border col-b">
			<ul id="menu">
			    <?php if(!empty(@$merchantInfo['book_now_link'])) { ?>
                    <li><a href="<?= @$merchantInfo['book_now_link']; ?>">Book Now</a></li>
                <?php } ?>
                
                <li><a href="menu">Menu</a></li>
                
				<?php if(!empty(@$merchantInfo['about_us_link'])) { ?>
				    <li><a href="<?= @$merchantInfo['about_us_link']; ?>">About Us</a></li>
				<?php } ?> 
				
				<?php if(!empty(@$merchantInfo['contact_link'])) { ?>
				<li><a href="<?= @$merchantInfo['contact_link']; ?>">Contact</a></li>
				<?php } ?>
				
				<?php
				if ($this->session->userdata('user')) {
					?>
					<li class="green-button"><a href="profile"><i
									class="ion-android-contact"></i><?= @$this->session->userdata('user_name') ?></a>
					</li>
					<li class="logout-menu orange-button"><a href="site/logout">Sign Out</a></li>
				<?php } else { ?>
					<li><a href="signup">Login &amp; Signup</a></li>
				<?php } ?>
			</ul>
			<div class="clear"></div>
		</div>
	</div> <!--container-->
</div> <!--END top-menu-->
<div class="menu-top-menu" style="font-size: 18px; width: 80%; position: fixed; height: 100vh; z-index: 999; background: rgba(2, 2, 2, 0.8); color: rgb(255, 255, 255); transition: all 0.3s ease 0s; padding-top: 35px;">
     <button id="closeButton" style="position: absolute; top: 0; right: 0; background-color: red;">close</button>
	<ul id="mobile-menu">
	        	<li><a href="<?= @$merchantInfo['book_now_link']; ?>">Book Now</a></li>
				<li><a href="menu">Menu</a></li>
				<li><a href="<?= @$merchantInfo['about_us_link']; ?>">About Us</a></li>
				<li><a href="<?= @$merchantInfo['contact_link']; ?>">Contact</a></li>
        <?php
        if ($this->session->userdata('user')) {
            ?>
            <li class="green-button"><a href="profile"><?= @$this->session->userdata('user_name') ?></a>
            </li>
            <li class="logout-menu orange-button"><a href="site/logout">Sign Out</a></li>
        <?php } else { ?>
            <li><a href="signup">Login &amp; Signup</a></li>
        <?php } ?>
	</ul>
	<div class="clear"></div>
</div> <!--menu-top-menu-->

<?php $this->load->view($view); ?>

	<div class="container" style="background-color:#000000; color:#ffffff; width: 100vw; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; padding-top: 10px;">
		<div class="row">
		    
		      <!-- Footer -->
  <footer class="bg-white">
    <div class="container py-5">
      <div class="row py-4">
           <div class="col-md-3" style="padding-bottom: 10px;">
					<h6 class="footer-title">Opening Hours</h6>
					<?php if(isset($this->session->merchantInfo) && !empty($this->session->merchantInfo)) { foreach ($this->session->merchantInfo['opening'] as $row) { ?>
									<div class="center" style="padding-bottom: 30px;">
										<div class="col-md-4 col-xs-4 " style="padding-bottom: 10px;"><?= $row['day'] ?></div>
										<div class="col-md-8 col-xs-8 " style="padding-bottom: 10px;"><?= $row['hours']; ?></div>
									</div>
								<?php } } ?>
        </div>
        
       
        
        <div class="col-md-3" style="padding-bottom: 10px;">
          <h6 class="footer-title">Address</h6>
           <p class="center"><i class="fa fa-map-marker fa-3x" aria-hidden="true"></i><br>
              <?= @$this->session->merchantInfo['complete_address']; ?></p>
        </div>
        
        <div class="col-md-3" style="padding-bottom: 10px;"> 
            <h6 class="footer-title">Contact Us</h6>
            <li class="center"><a href="tel:<?= @$this->session->merchantInfo['restaurant_phone']; ?>" target="_blank" title="phone"><i class="fa fa-phone-square fa-2x"></i><p style="font-size: 25px; display: inline-block; margin-left: 10px;"><?= @$this->session->merchantInfo['restaurant_phone']; ?></p></a></li>
            <ul class="list-inline center">
                <li class="list-inline-item"><a href="#" target="_blank" title="twitter"><i class="fa fa-twitter"></i></a></li>
                <li class="list-inline-item"><a href="#" target="_blank" title="facebook"><i class="fa fa-facebook"></i></a></li>
                <li class="list-inline-item"><a href="#" target="_blank" title="instagram"><i class="fa fa-instagram"></i></a></li>
                <li class="list-inline-item"><a href="#" target="_blank" title="google"><i class="fa fa-google"></i></a></li>
             </ul>
        </div>
       
        <div class="col-md-3" style="padding-bottom: 10px;"> 
          <h6 class="footer-title">Supported by</h6>
            <p class="center"><a href="https://loveeatery.co.nz"><img src="https://www.loveeatery.co.nz/assets/images/loveeatery_logo_bottom.png" style="height: 50px;"></a></p>
        </div>
        
         
        
        
      </div>
    </div>

    <!-- Copyrights -->
    <div class="bg-light py-4" style="background-color:#dd4b39; color:#ffffff; width: 100vw; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; padding-top: 10px;">
      <div class="container text-center">
        <p >© 2021 <?= @$this->session->merchantInfo['restaurant_name']; ?>. All rights reserved.</p>
      </div>
    </div>
  </footer>
		    
			<!--col-->
			<!--<div class="col-md-3 border">
				<h3>Others</h3>
				<li>
					<a href="<?= base_url() ?>" target="_blank">Privacy Policy</a>
				</li>
			</div> --><!--col-->
			<!--<div class="col-md-2 border">-->
			<!--	<h3>Connect with us</h3>-->
			<!--	<div class="mytable social-wrap">-->
			<!--	</div> <!--social wrap-->
			<!--</div> <!--col-->
		</div> <!--row-->
	</div> <!--container-->
</div> <!--section-footer-->

<div class="main-preloader">
	<div class="inner">
		<div class="ploader"></div>
	</div>
</div>

<div class="modal fade" id="menumodel" role="dialog">
</div>

<div class="main-preloader fancybox-margin">
   <div class="inner">
   <div class="ploader"></div>
   </div>
</div>

<script src="assets/js/bootstrap.min.js"></script>
<script type="text/javascript" src="assets/js/icheck.js"></script>
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.3/js/intlTelInput.min.js"></script>
<script type="text/javascript" src="assets/js/functions.js"></script>
<script>
    $( document ).on( "click", ".menu-nav-mobile a", function() {
        $(".menu-top-menu").slideToggle("fast");
    });
</script>

<script>
    document.getElementById('closeButton').addEventListener('click', function(e) {
    e.preventDefault();
    this.parentNode.style.display = 'none';
}, false);
</script>

</body>
</html>
