<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html>
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  
 <title><?php echo $this->company;?> - <?php echo strtolower($this->outletname);?> outlet manager area</title>
  <base href="<?php echo base_url();?>" />
  <!-- <link rel="manifest" href="manifest.json"> //-->
    
  <!-- Stylesheets -->
  <link rel="stylesheet" href="assets/css/style.css">
  <link rel="stylesheet" href="assets/css/bootstrap.min.css"/>
  <link rel="stylesheet" href="assets/css/font-awesome.min.css"/>
  <link rel="stylesheet" href="assets/css/owl.carousel.min.css"/>
  <link rel="stylesheet" href="assets/css/nice-select.css"/>
  <link rel="stylesheet" href="assets/css/magnific-popup.css"/>
  <link rel="stylesheet" href="assets/css/slicknav.min.css"/>
  <link rel="stylesheet" href="assets/css/animate.css"/>
    
  <link rel="icon" href="favicon.ico" type="image/x-icon">
  <link rel="apple-touch-icon" href="images/logo.png">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="theme-color" content="white">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="apple-mobile-web-app-title" content="Web App">
  <meta name="msapplication-TileImage" content="images/logo.png">
  <meta name="msapplication-TileColor" content="#FFFFFF">
  <?php
	if($main_content=="managegifts" || $main_content=="stockstatus"  || $main_content=="outletsstock" || $main_content=="managewstocktransfer" || $main_content=="itemledger" || $main_content=="projecteditemstock")
	{
  ?>
<link rel="stylesheet" href="assets/css/select2.min.css"/>
  <?php
	}
  ?>
   <?php
	if($main_content=="managepages")
	{
  ?>
  <script type="text/javascript" src="assets/ckeditor/ckeditor/ckeditor.js"></script>
  <script type="text/javascript" src="assets/ckeditor/ckfinder/ckfinder.js"></script>
  <?php
	}
  ?>
  
  <!-- Add jQuery library -->
  <script type="text/javascript" src="assets/js/jquery-1.10.2.min.js"></script>

	<!-- Add fancyBox main JS and CSS files -->
	<script type="text/javascript" src="assets/js/jquery.fancybox.pack.js?v=2.1.5"></script>
	<link rel="stylesheet" type="text/css" href="assets/css/jquery.fancybox.css?v=2.1.5" media="screen" />

	<script type="text/javascript">
		$(document).ready(function() {
			$('.fancybox').fancybox();
			
			$("#fancybox-manual-b").click(function() {
				$.fancybox.open({
					type : 'iframe',
					padding : 0
				});
			});
			$('.fancybox-reloadparent').fancybox(
			{
				type: 'iframe',
				afterClose: function () { // USE THIS IT IS YOUR ANSWER THE KEY WORD IS "afterClose"
				parent.location.reload(true);
				}
			});

		});
	</script>
	
	<script type="text/javascript" src="assets/outlet/js/common_function.js"></script>
  
</head>

<body class="m-0">
    <!-- Header Section -->
    <?php
    if($main_content=="products") // for 100% width
    {
    ?>
  <div class="container_fluid mr-0 p-0">
     <div class="m-auto">
        <div class="header-info border-dark">
          <div class="row">
            <div class="col-md-6 d-sm-block col-sm-4"><a href="outlet/dashboard" class="d-block mt-2"><?php echo ADMLOGOTITLE;?></a></div>
        	<div class="p-0 d-sm-none d-flex ml-auto">
                <span class="usrnam ml-0 pt-3">Welcome <?php echo $this->lguserinfo["sessName"];?>! ( <?php echo $this->lguserinfo["sessOTLName"];?> Outlet )</span><a href="outlet/logout" class="topright-bx" title="Logout"><span class="fa fa-power-off btn"></span></a>
				
             </div>
          </div>
        </div>
      </div>
     <?php
	}
	else
	{
     ?>
  <div class="container mr-0 p-0">    
     <div class="m-auto">
        <div class="header-info border-dark">
	        <a href="outlet/dashboard" class="d-block d-sm-block d-md-none mt-2"><?php echo ADMLOGOTITLE;?></a>
        	 <div class="p-0 d-sm-none d-flex ml-auto">
                <span class="usrnam ml-0 pt-3">Welcome <?php echo $this->lguserinfo["sessName"];?>! ( <?php echo $this->lguserinfo["sessOTLName"];?> Outlet Manager )</span><a href="outlet/logout" class="topright-bx" title="Logout"><span class="fa fa-power-off btn"></span></a>
				
             </div>
              <input type="checkbox" class="openSidebarMenu" id="openSidebarMenu">
              <label for="openSidebarMenu" class="sidebarIconToggle">
                <div class="spinner diagonal part-1"></div>
                <div class="spinner horizontal"></div>
                <div class="spinner diagonal part-2"></div>
              </label>
              <div id="sidebarMenu">
                <ul class="sidebarMenuInner">
                  <li class="logo d-sm-none border-bottom bg-light border-dark"><a href="outlet/dashboard"><h4 class="mb-0 mt-1"><?php echo ADMLOGOTITLE;?></h4></a></li>
				  <li><span class="material-icons">list</span><a href="outlet/products">Products</a></li>
				  <li><span class="material-icons">list</span><a href="outlet/products/price">Products Price</a></li>
	              <li><span class="material-icons">list</span><a href="outlet/stockreceived">Stock Received</a></li>
	              <li><span class="material-icons">list</span><a href="outlet/stocktransfer">Stock Transfer To Outlets </a></li>
	              <li><span class="material-icons">list</span><a href="outlet/wstocktransfer">Stock Transfer To Warehouse </a></li>
	              <li><span class="material-icons">list</span><a href="outlet/stockstatus">Stock Status </a></li>
	              <li><span class="material-icons">list</span><a href="outlet/itemledger">Item Ledger </a></li>
                  <li><span class="material-icons">list</span><a href="outlet/customers">Manage Customers</a></li>
	              <li><span class="material-icons">list</span><a href="outlet/billing">Manage Billing </a></li>
				  <li><span class="material-icons">list</span><a href="outlet/gifts">Manage Gifts</a></li>
				  <li><span class="material-icons">list</span><a href="outlet/report/sale">Sale Report</a></li>
	              
				  <li><span class="material-icons">list</span><a href="outlet/odemands">Demand To Warehouse </a></li>
				  <li><span class="material-icons">list</span><a href="outlet/dayoff">Dayoff </a></li>
				  <li><span class="material-icons">list</span><a href="outlet/projecteditemstock">Projected Item Stock </a></li>
	            

                  <li><span class="material-icons">manage_accounts</span><a href="outlet/updateinfo">Update Info.</a></li>
                  <li><span class="material-icons">password</span><a href="outlet/changepass">Change Password</a></li>
                  <li><span class="material-icons">logout</span><a href="outlet/logout">Logout</a></li>
                </ul>
              </div>
        </div>
      </div>
      <?php
	}
      ?>
        <?php $this->load->view("outlet/" . $main_content); ?>
        
        <div class="clearfix">&nbsp;</div>
      <footer>
    	© <?php echo date("Y");?>, <?php echo WEBNAME;?>
    </footer>
	</div>
    <div class="clearfix"></div>
	
    <!-- <script src="js/main.js"></script> //-->
<?php
	if($this->router->fetch_method()=="report"  || $this->router->fetch_method()=="orders" || $main_content=="stockreceived" || $main_content=="stocktransfer" || $main_content=="wstocktransfer" || $main_content=="stockstatus" || $main_content=="customers" || $main_content=="billing" || $main_content=="odemands" || $main_content=="dayoff" || $main_content=="managewstocktransfer" || $main_content=="itemledger" || $main_content=="projecteditemstock") // include date for specific criteria
	{
?>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
    <script>
  	// INCLUDE JQUERY & JQUERY UI 1.12.1
		$( function() {
			$( ".datepicker" ).datepicker({
				dateFormat: "dd-mm-yy",
				maxDate: "<?php echo date("d-m-Y");?>",
				duration: "fast"
			});
			$( ".datepickerfuture" ).datepicker({
				dateFormat: "dd-mm-yy",
				minDate: "<?php echo date("d-m-Y");?>",
				duration: "fast"
			});
		} );
		
	$(document).ready(function() {
    $('.js-example-basic-single').select2();
});
    </script>
    <script src="assets/js/select2.min.js"></script>
    
<?php
	}
?>
    
    <script>
    		$(document).ready(function() {
			$('.minus').click(function () {
				var $input = $(this).parent().find('input');
				var count = parseInt($input.val()) - 1;
				count = count < 1 ? 1 : count;
				$input.val(count);
				$input.change();
				return false;
			});
			$('.plus').click(function () {
				var $input = $(this).parent().find('input');
				$input.val(parseInt($input.val()) + 1);
				$input.change();
				return false;
			});
		});
    </script>
<?php
	if($main_content=="managegifts" || $main_content=="stockstatus"  || $main_content=="outletsstock"  || $main_content=="projecteditemstock") // include date for specific criteria
	{
?>

<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>//-->
<script>
$(document).ready(function() {
$('.js-example-basic-single').select2();
//$('.js-example-basic-multiple').select2();
});
</script>
<script src="assets/js/select2.min.js"></script>
<?php
	}
?>
</body>
</html>
