<!DOCTYPE html>
<html lang="en">

<head>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="description" content="">
  <meta name="author" content="">
  <meta name="csrf-token" content="<?php echo e(csrf_token()); ?>">
  <script defer src="https://use.fontawesome.com/releases/v5.8.1/js/all.js" integrity="sha384-g5uSoOSBd7KkhAMlnQILrecXvzst9TdC09/VM+pjDTCM+1il8RHz5fKANTFFb+gQ" crossorigin="anonymous"></script>

  <title>Natureplus Admin</title>

 
  <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">


<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.9/dist/css/bootstrap-select.min.css">

  <!-- Custom fonts for this template-->
  <link rel="stylesheet" href="<?php echo asset('vendor/fontawesome-free/css/all.min.css'); ?>">
  <!-- <link rel="stylesheet" href="<?php echo asset('https://fonts.googleapis.com/css?family=Athiti&display=swap'); ?>"> -->
  <link rel="stylesheet" href="<?php echo asset('https://fonts.googleapis.com/css?family=Mitr&display=swap'); ?>">
  <!-- Custom styles for this template-->
  <script src="<?php echo asset('assets/js/vendors/jquery-3.2.1.min.js'); ?>"></script>
  <link rel="stylesheet" href="<?php echo asset('assets/css/sb-admin-2.min.css'); ?>">
  <link rel="stylesheet" href="<?php echo asset('assets/datepicker/css/bootstrap-datepicker.min.css'); ?>">
  <link rel="stylesheet" href="<?php echo asset('//cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css'); ?>">
  <link rel="stylesheet" href="<?php echo asset('assets/jstree/themes/proton/style.css'); ?>">
  <link href="https://fonts.googleapis.com/css?family=Athiti&display=swap" rel="stylesheet">
  <script src="<?php echo asset('//cdnjs.cloudflare.com/ajax/libs/numeral.js/2.0.6/numeral.min.js'); ?>"></script>
  <script src="<?php echo asset('assets/js/sweetalert/sweetalert.min.js'); ?>"></script>

  <script src="https://code.highcharts.com/highcharts.js"></script>
  <script src="https://code.highcharts.com/modules/data.js"></script>
  <script src="https://code.highcharts.com/modules/exporting.js"></script>
  <script src="https://code.highcharts.com/modules/accessibility.js"></script>


  <script src="dist/js/bootstrap-select.js"></script>
  <script>
    var last_move, cur_date, target;
        var redirectInSecond=300; // กำหนดเวลา redirect เป็นวินาที
        var redirect_url = 'https://erp.natureplus.co.th/'; // กำหนด url ที่ต้องการเมื่อครบเวลาที่กำหนด 
        $(document).ready(function(e) {
          target = redirectInSecond * 1000; // แปลงค่าเป็น microsecond
          last_move = new Date() // กำหนดค่าเริ่มต้นให้ last_move
              setTimeout( 'chk_last_move()', target ); // กำหนดเวลาตรวจเช็คเริ่มต้น
            }).mousemove(function(e) { afk();
            }).keyup(function(e) { afk();
            });
            function afk() {
              last_move = new Date();
            }
            function chk_last_move(){
        cur_date = new Date(); // อ่านเวลาปัจจุบันไว้ใน cur_date
        if( cur_date>last_move){ // ตรวจสอบเวลา 
          var micro = parseInt(cur_date.getTime() - last_move.getTime());
          if( micro > target ) location.href=redirect_url;
          else {
            var new_time = target - micro;
            setTimeout('chk_last_move()', new_time );
          }
        }else{
          setTimeout('chk_last_move()', target );
        }
      }
    </script>
  <style>
    @font-face {
        font-family: myFirstFont;
        src: url("<?php echo e(asset('assets/fonts/font-style/DB HelvethaicaMon X.ttf')); ?>");
      }
      .md-Load{
        background-color:rgba(255,252,255,0.9);
        width:100%;
        height:100%;
        position:fixed;
        z-index:9999;
        vertical-align: middle;
        text-align:center;
        display: none;
      }
      .md-showdata{
        background-color:rgba(255,252,255,0.9);
        width:100%;
        height:100%;
        position:fixed;
        z-index:9999;
        vertical-align: middle;
        text-align:center;
        display: none;
      }
      .center_div {
        width:100px;
        height:100px;
        position:absolute;
        top:calc(50% - 50px);
        left:calc(50% - 50px);
      }
      .zeroPadding {
        padding: 0 !important;
      }
      tr:nth-child(even) {
        background-color: #f2f2f2;
      }
  </style>

    <?php echo $__env->yieldContent('style'); ?>
  </head>

  <body id="page-top" style="background-color: rgba(0, 0, 0, 0.25);">

  <div class="md-Load">
    <div class="center_div">
      <div class="col-12  mt-3 mt-lg-10 text-center">
        <div>
        <img src="assets/file/img/Loading.gif" alt="..." class="rounded-circle">
       </div>
       กำลังโหลด
     </div>
   </div>
 </div>

    <!-- Page Wrapper -->
    <div id="wrapper">

      <!-- Sidebar -->
      <ul class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion" id="accordionSidebar">

        <!-- Sidebar - Brand -->
        <a class="sidebar-brand d-flex align-items-center justify-content-center" href="home">
          <div class="sidebar-brand-icon rotate-n-15">
            <i class="fas fa-chart-bar"></i>
          </div>
          <div class="sidebar-brand-text mx-3">Natureplus Admin <sup>v.1</sup></div>
        </a>

     <!-- Nav Item - Pages Collapse Menu -->
      <?php $__currentLoopData = $_mn[0]; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id => $menu): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <li class="nav-item">
          <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#c<?php echo e($menu['idMenu']); ?>" aria-expanded="true" aria-controls="c<?php echo e($menu['idMenu']); ?>">
            <i class="<?php echo e($menu['icon']); ?>"></i>
            <span><?php echo e($menu["name"]); ?></span>
          </a>
          <div id="c<?php echo e($menu['idMenu']); ?>" class="collapse" aria-labelledby="headingPages" data-parent="#accordionSidebar">
            <div class="bg-white py-2 collapse-inner rounded">
              <h6 class="collapse-header"><?php echo e($menu["name"]); ?> :</h6>
              <?php $__currentLoopData = $_mn[$menu["idMenu"]]; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id => $menusub): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
              <a class="collapse-item" href="<?php echo e(url($menusub['url'])); ?>"><?php echo e($menusub["name"]); ?></a>
               <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
          </div>
        </li>
         <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>


        <!-- Divider -->
        <hr class="sidebar-divider d-none d-md-block">

        <!-- Sidebar Toggler (Sidebar) -->
        <div class="text-center d-none d-md-inline">
          <button class="rounded-circle border-0" id="sidebarToggle"></button>
        </div>

      </ul>
      <!-- End of Sidebar -->

      <!-- Content Wrapper -->
      <div id="content-wrapper" class="d-flex flex-column">

        <!-- Main Content -->
        <div id="content">

          <!-- Topbar -->
          <nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">

            <!-- Sidebar Toggle (Topbar) -->
            <button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
              <i class="fa fa-bars"></i>
            </button>

            <!-- Topbar Search -->
               <!--  ***************************************************************************************************************************************
                <form class="d-none d-sm-inline-block form-inline mr-auto ml-md-3 my-2 my-md-0 mw-100 navbar-search">
                  <div class="input-group">
                    <input type="text" class="form-control bg-light border-0 small" placeholder="Search for..." aria-label="Search" aria-describedby="basic-addon2">
                    <div class="input-group-append">
                      <button class="btn btn-primary" type="button">
                        <i class="fas fa-search fa-sm"></i>
                      </button>
                    </div>
                  </div>
                </form> -->

                <!-- Topbar Navbar -->
                <ul class="navbar-nav ml-auto">

                  <!-- Nav Item - Search Dropdown (Visible Only XS) -->
                  <li class="nav-item dropdown no-arrow d-sm-none">
                    <a class="nav-link dropdown-toggle" href="#" id="searchDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                      <i class="fas fa-search fa-fw"></i>
                    </a>
                    <!-- Dropdown - Messages -->
                    <div class="dropdown-menu dropdown-menu-right p-3 shadow animated--grow-in" aria-labelledby="searchDropdown">
                      <form class="form-inline mr-auto w-100 navbar-search">
                        <div class="input-group">
                          <input type="text" class="form-control bg-light border-0 small" placeholder="Search for..." aria-label="Search" aria-describedby="basic-addon2">
                          <div class="input-group-append">
                            <button class="btn btn-primary" type="button">
                              <i class="fas fa-search fa-sm"></i>
                            </button>
                          </div>
                        </div>
                      </form>
                    </div>
                  </li>


                  

                  <div class="topbar-divider d-none d-sm-block"></div>

                  <!-- Nav Item - User Information -->
                  <li class="nav-item dropdown no-arrow">
                    <a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                      <span class="mr-2 d-none d-lg-inline text-gray-600 small"><?php echo e(Cookie::get('name')); ?></span>
                      <img class="img-profile rounded-circle" src="../img/user_no_photo_300x300.png">
                    </a>
                    <!-- Dropdown - User Information -->
                    <div class="dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-labelledby="userDropdown">
                     <!--  <a class="dropdown-item" href="#">
                        <i class="fas fa-user fa-sm fa-fw mr-2 text-gray-400"></i>
                        Profile
                      </a> -->
                      <?php
                      
                      ?>
                      <a class="dropdown-item" href="home">
                        <i class="fas fa-chart-bar fa-sm fa-fw mr-2 text-gray-400"></i>
                        สรุปยอดขาย
                      </a>
                      <a class="dropdown-item" href="settingpermit">
                        <i class="fas fa-cogs fa-sm fa-fw mr-2 text-gray-400"></i>
                        Settings
                      </a>
                     <!--  <a class="dropdown-item" href="#">
                        <i class="fas fa-list fa-sm fa-fw mr-2 text-gray-400"></i>
                        Activity Log
                      </a> -->
                      <div class="dropdown-divider"></div>
                      <a class="dropdown-item" href="logout">
                        <i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
                        Logout
                      </a>
                    </div>
                  </li>

                </ul>

              </nav>
              <!-- End of Topbar -->

              <!-- Begin Page Content -->
              <div class="container-fluid">

                <!-- Page Heading -->

                <?php echo $__env->yieldContent('content'); ?>
                <!-- /.container-fluid -->

              </div>
              <!-- End of Main Content -->

              <!-- Footer -->
              <footer class="sticky-footer bg-white">
                <div class="container my-auto">
                  <div class="copyright text-center my-auto">
                    <span>Copyright &copy; natureplus 2019</span>
                  </div>
                </div>
              </footer>
              <!-- End of Footer -->

            </div>
            <!-- End of Content Wrapper -->

          </div>
          <!-- End of Page Wrapper -->

          <!-- Scroll to Top Button-->
          <a class="scroll-to-top rounded" href="#page-top">
            <i class="fas fa-angle-up"></i>
          </a>

          <!-- Logout Modal-->
          <div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
            <div class="modal-dialog" role="document">
              <div class="modal-content">
                <div class="modal-header">
                  <h5 class="modal-title" id="exampleModalLabel">Ready to Leave?</h5>
                  <button class="close" type="button" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">×</span>
                  </button>
                </div>
                <div class="modal-body">Select "Logout" below if you are ready to end your current session.</div>
                <div class="modal-footer">
                  <button class="btn btn-secondary" type="button" data-dismiss="modal">Cancel</button>
                  <a class="btn btn-primary" href="login.html">Logout</a>
                </div>
              </div>
            </div>
          </div>

          <?php echo $__env->yieldContent('popup'); ?>


          <!-- Bootstrap core JavaScript-->
          <script src="<?php echo asset('vendor/jquery/jquery.min.js'); ?>"></script>
          <script src="<?php echo asset('vendor/bootstrap/js/bootstrap.bundle.min.js'); ?>"></script>
          <script src="<?php echo asset('//cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js'); ?>"></script>
          <!-- Core plugin JavaScript-->
          <script src="<?php echo asset('/vendor/jquery-easing/jquery.easing.min.js'); ?>"></script>
          
          <!-- Custom scripts for all pages-->
          <script src="<?php echo asset('assets/js/sb-admin-2.min.js'); ?>"></script>
          <script src="<?php echo e(asset('assets/jstree/jstree.min.js')); ?>"></script>
          <!-- Page level plugins -->
<!--           <script src="<?php echo asset('vendor/chart.js/Chart.min.js'); ?>"></script> -->
          <script src="//cdnjs.cloudflare.com/ajax/libs/numeral.js/2.0.6/numeral.min.js"></script>
          <!-- Page level custom scripts -->
<!--           <script src="<?php echo asset('assets/js/demo/chart-area-demo.js'); ?>"></script>
          <script src="<?php echo asset('assets/js/demo/chart-pie-demo.js'); ?>"></script> -->

          <script src="<?php echo asset('assets/datepicker/js/bootstrap-datepicker.min.js'); ?>"></script>
          <script src="<?php echo asset('assets/datepicker/locales/bootstrap-datepicker.th.min.js'); ?>"></script>
          
         
          <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
          <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>

          <script src="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.9/dist/js/bootstrap-select.min.js"></script>
          <?php echo $__env->yieldContent('script'); ?>
        </body>

        </html>
<?php /**PATH /home/cp325668/public_html/erp/resources/views/layout/menu.blade.php ENDPATH**/ ?>