 <!-- Main Sidebar Container -->
  <aside class="main-sidebar sidebar-dark-primary elevation-4">
    <!-- Brand Logo -->
    <a href="#" class="brand-link">
      <!--<img src="dist/img/AdminLTELogo.png" alt="AdminLTE Logo" class="brand-image img-circle elevation-3"
           style="opacity: .8">-->
           <img src="images/logos/madinaconst-lgnew.png
" alt="AdminLTE Logo" class="brand-image img-circle elevation-3"
           style="opacity: .8">
      <span class="brand-text font-weight-light"><b style="color:#ffff;">Madina Construction</b></span>
    </a>

    <!-- Sidebar -->
    <div class="sidebar">
      <!-- Sidebar user panel (optional) -->
      <div class="user-panel mt-3 pb-3 mb-3 d-flex">
        <div class="image">
         <!-- <img src="dist/img/user2-160x160.jpg" class="img-circle elevation-2" alt="User Image">-->
         <img src="images/logos/madinaconst-lgnew.png
" class="img-circle elevation-2" alt="User Image">
        
        </div>
        <div class="info">
          <a href="#" class="d-block"><?= $_SESSION['sess_user']; ?>
          <br>
          </a>
        </div>
      </div>
<?php $activePage = basename($_SERVER['PHP_SELF'], ".php"); ?>
<?php $role = $_SESSION['sess_role']; ?>
      <!-- Sidebar Menu -->
      <nav class="mt-2">
        <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
          <!-- Add icons to the links using the .nav-icon class
               with font-awesome or any other icon font library -->
           <li class="nav-item">
            <a href="dashboard.php" class="nav-link  <?= ($activePage == 'dashboard') ? 'active':''; ?>">
              <i class="nav-icon fas fa-tachometer-alt"></i>
              <p>
                Dashboard
              </p>
            </a>
          </li>
          <?php if($role =='Admin') { ?>
          <li class="nav-item">
            <a href="users.php" class="nav-link  <?= ($activePage == 'users') ? 'active':''; ?> <?= ($activePage == 'useredit') ? 'active':''; ?>">
              <i class="nav-icon fas fa-user"></i>
              <p>
               Users
              </p>
            </a>
          </li>
           <li class="nav-item">
            <a href="vehicle.php" class="nav-link  <?= ($activePage == 'vehicle') ? 'active':''; ?> <?= ($activePage == 'vehicleedit') ? 'active':''; ?>">
              <i class="nav-icon fas fa-truck"></i>
              <p>
               Vehicle
              </p>
            </a>
          </li>
           <li class="nav-item">
            <a href="material.php" class="nav-link <?= ($activePage == 'material') ? 'active':''; ?><?= ($activePage == 'materialedit') ? 'active':''; ?>">
              <i class="nav-icon fas fa-tree"></i>
              <p>
                Material
              </p>
            </a>
          </li>
         <li class="nav-item">
            <a href="vendor.php" class="nav-link <?= ($activePage == 'vendor') ? 'active':''; ?>  <?= ($activePage == 'vendoredit') ? 'active':''; ?>">
              <i class="nav-icon fas fa-industry"></i>
              <p>
               Vendors
              </p>
            </a>
          </li>
           <li class="nav-item">
            <a href="vendormeasurement.php" class="nav-link <?= ($activePage == 'vendormeasurement') ? 'active':''; ?>  <?= ($activePage == 'vendormsedit') ? 'active':''; ?>">
              <i class="nav-icon fas fa-ruler-vertical"></i>
              <p>
               Vendors Measurement
              </p>
            </a>
          </li>
          <li class="nav-item">
            <a href="receivable.php" class="nav-link <?= ($activePage == 'receivable') ? 'active':''; ?> <?= ($activePage == 'addpayment') ? 'active':''; ?> <?= ($activePage == 'vendorbalance') ? 'active':''; ?>  <?= ($activePage == 'receivableedit') ? 'active':''; ?>">
                   <i class="nav-icon fa fa-sharp fa-solid fa-wallet"></i>
              <p>
               Account Receivable 
              </p>
            </a>
          </li>
          <li class="nav-item">
            <a href="payment.php" class="nav-link <?= ($activePage == 'payment') ? 'active':''; ?> <?= ($activePage == 'paymentedit') ? 'active':''; ?>">
                   <i class="nav-icon fa fa-solid fa-money-bill"></i>
                   
              <p>
              Payment Recoveries
              </p>
            </a>
          </li>
         
          
          
          
          <li class="nav-item">
            <a href="shipment.php" class="nav-link  <?= ($activePage == 'shipmenthedit') ? 'active':''; ?>  <?= ($activePage == 'shipment') ? 'active':''; ?> <?= ($activePage == 'addshipment') ? 'active':''; ?>  <?= ($activePage == 'shipmentedit') ? 'active':''; ?> <?= ($activePage == 'shipmentfedit') ? 'active':''; ?> ">
              <i class="nav-icon fas fa-shopping-cart"></i>
              <p>
               Shipment By Measurement
              </p>
            </a>
          </li>
           <li class="nav-item">
            <a href="addshipmentf.php" class="nav-link <?= ($activePage == 'addshipmentf') ? 'active':''; ?>">
              <i class="nav-icon fas fa-shopping-cart"></i>
              <p>
             Shipment By Trip
              </p>
            </a>
          </li>
           <li class="nav-item">
            <a href="addshipmenthour.php" class="nav-link <?= ($activePage == 'addshipmenthour') ? 'active':''; ?>">
              <i class="nav-icon fas fa-shopping-cart"></i>
              <p>
             Shipment By Hour
              </p>
            </a>
          </li>
          
        
           
              
          
            <li class="nav-item has-treeview">
            <a href="#" class="nav-link <?= ($activePage == 'shipvehreport') ? 'active':''; ?> <?= ($activePage == 'shipreport') ? 'active':''; ?> <?= ($activePage == 'shipureport') ? 'active':''; ?><?= ($activePage == 'shipavreport') ? 'active':''; ?> <?= ($activePage == 'shipvreport') ? 'active':''; ?> <?= ($activePage == 'paymentreport') ? 'active':''; ?> 
             <?= ($activePage == 'vbalancereport') ? 'active':''; ?>  ">
              <i class="nav-icon fas fa-file"></i>
              <p>
                Reports 
                <i class="fas fa-angle-left right"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
                 <li class="nav-item">
                <a href="shipcustomreport.php" class="nav-link <?= ($activePage == 'shipcustomreport') ? 'active':''; ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Custom Shipment</p>
                </a>
              </li>
                 <li class="nav-item">
                <a href="paymentreport.php" class="nav-link <?= ($activePage == 'paymentreport') ? 'active':''; ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Vendor Ledger</p>
                </a>
              </li>
               <li class="nav-item">
                <a href="vbalancereport.php" class="nav-link <?= ($activePage == 'vbalancereport') ? 'active':''; ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Vendor Balance Ledger</p>
                </a>
              </li>
               <li class="nav-item">
                <a href="shipvehreport.php" class="nav-link <?= ($activePage == 'shipvehreport') ? 'active':''; ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Shipment For Vehicle</p>
                </a>
              </li>
                <li class="nav-item">
                <a href="shipavreport.php" class="nav-link <?= ($activePage == 'shipavreport') ? 'active':''; ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Shipment For Admin</p>
                </a>
              </li>
               <li class="nav-item">
                <a href="shipvreport.php" class="nav-link <?= ($activePage == 'shipvreport') ? 'active':''; ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Shipment For Vendor</p>
                </a>
              </li>
              <li class="nav-item">
                <a href="shipureport.php" class="nav-link <?= ($activePage == 'shipureport') ? 'active':''; ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Shipment For User</p>
                </a>
              </li>
               <li class="nav-item">
                <a href="shipreport.php" class="nav-link <?= ($activePage == 'shipreport') ? 'active':''; ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>All Shipment</p>
                </a>
              </li>
              
               
              
             
              
             
            
        </ul>
        
      </li>
      
       <li class="nav-item has-treeview">
            <a href="#" class="nav-link  <?= ($activePage == 'materialtrashlist') ? 'active':''; ?> <?= ($activePage == 'usertrashlist') ? 'active':''; ?> <?= ($activePage == 'vehicletrashlist') ? 'active':''; ?>  <?= ($activePage == 'vendortrashlist') ? 'active':''; ?>
            <?= ($activePage == 'vendormtrashlist') ? 'active':''; ?>
             <?= ($activePage == 'shipmenttrashlist') ? 'active':''; ?>
            "> 
              <i class="nav-icon fas fa-trash"></i>
              <p>
                Trash 
                <i class="fas fa-angle-left right"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
                 <li class="nav-item">
                <a href="usertrashlist.php" class="nav-link <?= ($activePage == 'usertrashlist') ? 'active':''; ?> ">
                  <i class="far fa-user nav-icon"></i>
                  <p>User</p>
                </a>
              </li>
               <li class="nav-item">
                <a href="vehicletrashlist.php" class="nav-link <?= ($activePage == 'vehicletrashlist') ? 'active':''; ?>">
                  <i class="fas fa-truck nav-icon"></i>
                  <p>Vehicle</p>
                </a>
              </li>
               
                 <li class="nav-item">
                <a href="materialtrashlist.php" class="nav-link <?= ($activePage == 'materialtrashlist') ? 'active':''; ?>">
                  <i class="fas fa-tree nav-icon"></i>
                  <p>Materials</p>
                </a>
              </li>
             <li class="nav-item">
                <a href="vendortrashlist.php" class="nav-link <?= ($activePage == 'vendortrashlist') ? 'active':''; ?>">
                  <i class="fas fa-industry nav-icon"></i>
                  <p>Vendor</p>
                </a>
              </li>
                <li class="nav-item">
                <a href="vendormtrashlist.php" class="nav-link <?= ($activePage == 'vendormtrashlist') ? 'active':''; ?>">
                  <i class="fas fa-ruler-vertical nav-icon"></i>
                  <p>Vendor Measurement</p>
                </a>
              </li>
             
              <li class="nav-item">
            <a href="shipmenttrashlist.php" class="nav-link  <?= ($activePage == 'shipmenttrashlist') ? 'active':''; ?>">
              <i class="nav-icon fas fa-shopping-cart"></i>
              <p>
                Shipment
              </p>
            </a>
          </li>
             
              
              
             
            
        </ul>
        
      </li>
      <?php } ?>
      <?php if($role =='User') { ?>
       <li class="nav-item">
            <a href="shipment.php" class="nav-link <?= ($activePage == 'shipmenthedit') ? 'active':''; ?>  <?= ($activePage == 'shipment') ? 'active':''; ?> <?= ($activePage == 'addshipment') ? 'active':''; ?>  <?= ($activePage == 'shipmentedit') ? 'active':''; ?>">
              <i class="nav-icon fas fa-shopping-cart"></i>
              <p>
              Shipment By Measurement
              </p>
            </a>
          </li>
           <li class="nav-item">
            <a href="addshipmentf.php" class="nav-link <?= ($activePage == 'addshipmentf') ? 'active':''; ?>">
              <i class="nav-icon fas fa-shopping-cart"></i>
              <p>
              Shipment By Trip
              </p>
            </a>
          </li>
           <li class="nav-item">
            <a href="addshipmenthour.php" class="nav-link <?= ($activePage == 'addshipmenthour') ? 'active':''; ?>">
              <i class="nav-icon fas fa-shopping-cart"></i>
              <p>
             Shipment By Hour
              </p>
            </a>
          </li>
           <li class="nav-item has-treeview">
            <a href="#" class="nav-link <?= ($activePage == 'shipreport') ? 'active':''; ?> <?= ($activePage == 'shipureport') ? 'active':''; ?><?= ($activePage == 'shipavreport') ? 'active':''; ?> <?= ($activePage == 'shipvreport') ? 'active':''; ?>">
              <i class="nav-icon fas fa-file"></i>
              <p>
                Reports 
                <i class="fas fa-angle-left right"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
              
              <li class="nav-item">
                <a href="shipureport.php" class="nav-link <?= ($activePage == 'shipureport') ? 'active':''; ?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Your Shipment</p>
                </a>
              </li>
             
              
             
              
             
            
        </ul>
        
      </li>
      
      <?php } ?>

      
 
      </nav>
      <!-- /.sidebar-menu -->
    </div>
    <!-- /.sidebar -->
  </aside>

  <!-- Content Wrapper. Contains page content -->