<?php 
$nik=$_SESSION['warehouse'];
include"koneksi.php";
$datauser = mysqli_query ($koneksi, "SELECT *
FROM user
WHERE Nik ='$nik'");
$row= mysqli_fetch_array($datauser);
?>
<!DOCTYPE html>
<!-- Designined by CodingLab | www.youtube.com/codinglabyt -->
<html lang="en" dir="ltr">
  <head>
    <meta charset="UTF-8">
    <title> WAREHOUSE GPL </title>
    <link rel="stylesheet" href="view/style.css">
    <!-- Boxiocns CDN Link -->
    <link rel="stylesheet" type="text/css" href="style/bootstrap.css">
    <link href="assets/bootstrap-icons/bootstrap-icons.css" rel="stylesheet">
    <link href="style/table.css" rel="stylesheet">
    <style>
        div.dataTables_wrapper {
        width: 100%;
        margin: 0 auto;
        background-color: whitesmoke;
        padding-top: 3px;
    }

    .icon{cursor: pointer;}
    .icon span{background: #f00; border-radius: 50%;color: #fff;vertical-align: top;margin-left: -25px}
    .icon:hover{opacity: .7}.logo{flex: 1;margin-left: 50px;color: #eee;font-size: 20px;font-family: monospace}
    .notifications{width: 300px;max-height: 600px; overflow: hidden; overflow-y: scroll; opacity: 0;position: absolute; right: -400px; top: 10px; border-radius: 5px 0px 5px 5px;background-color: #fff;box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); -ms-overflow-style: none; scrollbar-width: none;}
    .notifications::-webkit-scrollbar { display: none; }
    .notifications h2{font-size: 14px;padding: 10px;border-bottom: 1px solid #eee;color: #999}
    .notifications h2 span{color: #f00}
    .notifications-item{display: flex;border-bottom: 1px solid #eee;padding: 6px 9px;margin-bottom: 0px;cursor: pointer}
    .notifications-item:hover{background-color: #eee}
    .notifications-item .text h4{color: #777;font-size: 16px;margin-top: 3px}
    .notifications-item .text p{color: #aaa;font-size: 12px}
    </style>
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
   </head>
<body>
  <div class="sidebar close">
    <div class="logo-details">
      <img src="image/logo.png" alt="">
      <span class="logo_name">PT. Indo Tirta Abadi</span>
    </div>
    <ul class="nav-links">
      <?php if($row['Kasta']=='0'){ ?>
      <li>
        <a href="index.php">
          <i class='bi bi-window-sidebar' ></i>
          <span class="link_name">Dashboard</span>
        </a>
        <ul class="sub-menu blank">
          <li><a class="link_name" href="index.php">Dashboard</a></li>
        </ul>
      </li>
      <li>
        <a href="index.php?switch=incoming">
          <i class='bi bi-truck' ></i>
          <span class="link_name">Incoming</span>
        </a>
        <ul class="sub-menu blank">
          <li><a class="link_name" href="index.php?switch=incoming">Incoming</a></li>
        </ul>
      </li>  
      <?php } else if($row['Kasta']=='1') { ?>
      <li>
        <a href="index.php">
          <i class='bi bi-window-sidebar' ></i>
          <span class="link_name">Dashboard</span>
        </a>
        <ul class="sub-menu blank">
          <li><a class="link_name" href="index.php">Dashboard</a></li>
        </ul>
      </li>
      <li>
        <div class="iocn-link">
          <a href="#">
            <i class='bi bi-box-seam' ></i>
            <span class="link_name">Produksi</span>
          </a>
          <i class='bi bi-caret-down arrow' ></i>
        </div>
        <ul class="sub-menu">
          <li><a href="index.php?switch=plan">Planning</a></li>
          <li><a href="dashboard/simulasi.php">Simulasi</a></li>
          <li><a href="index.php?switch=incoming">Incoming</a></li>
          <li><a href="index.php?switch=material">Material</a></li>
          <li><a href="index.php?switch=product">Product</a></li>
          <li><a href="index.php?switch=mesin">Mesin</a></li>
        </ul>
      </li>
      <li>
        <div class="iocn-link">
          <a href="#">
            <i class='bi bi-truck' ></i>
            <span class="link_name">Pengiriman</span>
          </a>
          <i class='bi bi-caret-down arrow' ></i>
        </div>
        <ul class="sub-menu">
          <li><a href="index.php?switch=customer">Customers</a></li>
          <!-- <li><a href="index.php?switch=ho">Head Officers</a></li> -->
          <li><a href="index.php?switch=delivery">Delivery</a></li>
          <!-- <li><a href="index.php?switch=return">Return</a></li> -->
          <li><a href="index.php?switch=expedisi">Expedisi</a></li>
          <li><a href="index.php?switch=logistik">Logistik</a></li>
          <!-- <li><a href="index.php?switch=cost">Cost</a></li> -->
        </ul>
      </li>
       <li>
        <div class="iocn-link">
          <a href="#">
            <i class='bi bi-journal-bookmark-fill' ></i>
            <span class="link_name">Report</span>
          </a>
          <i class='bi bi-caret-down arrow' ></i>
        </div>
        <ul class="sub-menu">
          <li><a href="index.php?switch=stok">Stok</a></li>

           <li><a href="rekap/plan_actual.php">Recap Plan & Actual</a></li>
          <li><a href="rekap/pemakaian_bb.php">Recap Pemakaian Resin</a></li>
          <li><a href="rekap/pengiriman.php">Data Pengiriman</a></li>
          <li><a href="rekap/data_pengiriman.php">Biaya Kirim</a></li>
          <li><a href="rekap/data_return.php">Biaya Return</a></li>
        </ul>
      </li>
      <!-- <li>
        <div class="iocn-link">
          <a href="#">
            <i class='bi bi-bookmark-star' ></i>
            <span class="link_name">PO</span>
          </a>
          <i class='bi bi-caret-down arrow' ></i>
        </div>
        <ul class="sub-menu">
          <li><a href="index.php?switch=po_tbl">PO Baru</a></li>
          <li><a href="index.php?switch=balance_po">Balance PO</a></li>
        </ul>
      </li> -->
      <li>
        <div class="iocn-link">
          <a href="index.php?switch=user">
            <i class='bi bi-tools' ></i>
            <span class="link_name">Others</span>
          </a>
          <i class='bi bi-caret-down arrow' ></i>
        </div>
        <ul class="sub-menu">
          <li><a href="index.php?switch=user">User</a></li>
        </ul>
      </li>
      <?php } ?>
      <li>
    <div class="profile-details">
      <div class="profile-content">
        <img src="file/<?php echo $row['Foto'] ?>" alt="profileImg">
      </div>
      <div class="name-job">
        <div class="profile_name"><?php echo $row['User_Name'] ?></div>
        <div class="job"><?php echo $row['Nik'] ?></div>
      </div>
      <a href="logout.php"><i style="font-size: 25px" class='bi bi-box-arrow-right' ></i></a>
    </div>
  </li>
</ul>
  </div>
  <section class="home-section">
    <div class="home-content">
    <div style="width: 100%;">
      <i class='bi bi-list bx-menu' ></i>
      <span class="text">WAREHOUSE GPL</span>
 
    </div>
    </div>

  <script src="view/scriptdd.js"></script>
	<script type="text/javascript" src="style/jquery.js"></script>
	<script type="text/javascript" src="style/bootstrap.js"></script>
  <script type="text/javascript" src="style/jquery-table.js"></script>
  <script>
    $(document).ready(function(){
            
            
            
        
            var down = false;
            
            $('#bell').click(function(e){
              
                var color = $(this).text();
                if(down){
                    
                    $('#box').css('height','0px');
                    $('#box').css('opacity','0');
                    $('#box').css('z-index','0');
                    $('#box').css('right','-350px');
                    down = false;
                }else{
                    
                    $('#box').css('height','auto');
                    $('#box').css('opacity','1');
                    $('#box').css('z-index','2');
                    $('#box').css('right','50px');
                    down = true;
                    
                }
                
            });
                
                });
  </script>
  
</body>
</html>
