 <!-- Main Sidebar Container -->
 <?php
function thecheck($id){
  
            return $result=  DB::queryFirstField('SELECT status FROM thesettings where id='.$id.' ');

          

}
 ?>
 <aside class="main-sidebar elevation-4 sidebar-light-lightblue">
    

    <!-- Sidebar -->
    <div class="sidebar">
      <!-- Sidebar user panel (optional) -->
      <div class="user-panel mt-3 pb-3 mb-3 d-flex">
        <div class="image">
        <a  href="<?php echo $base_url;?>"  >
          <img src="<?php echo $base_url;?>dist/img/logo.JPG" class="img-circle elevation-3" alt="User Image">
</a>
        </div>
        <div class="info">
          <a  class="d-block"  href="<?php echo $base_url;?>"  >Jarie Ventures </a>
        </div>
      </div>
	  
	  <!-- applicationtop -->

      <!-- Sidebar Menu -->
      <nav class="mt-2">
        <ul class="nav nav-pills nav-sidebar flex-column nav-child-indent nav-flat" 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 has-treeview menu-open">
            <a  href="<?php echo $base_url;?>multiple.php"  class="nav-link active">
              <i class="fa fa-cubes"></i>
              <p>
                NEW JOB
              </p>
            </a>
             
          </li>
          
            <li class="nav-item has-treeview menu-open">
            <a  href="<?php echo $base_url;?>dashboard.php"  class="nav-link  ">
              <i class="nav-icon fas fa-tachometer-alt"></i>
              <p>
                Dashboard 
              </p>
            </a>
             
          </li>

         

          <?php if($_SESSION["connectedusergroup"] == 5)
						{?>
             <li class="nav-item has-treeview">
           <a  href="<?php echo $base_url;?>tasksearch/reports"  class="nav-link">
              <i class="nav-icon fas fa-eye"></i>
              <p>
              Search job 
                
              </p>
            </a>
           
          </li>
            

          <?php 
            }
            else {
          
           if($_SESSION["connectedusergroup"] == 1)
						{?>
          
		  <li class="nav-item has-treeview">
            <a  href="<?php echo $base_url;?>#" class="nav-link">
              <i class="nav-icon fas fa-wrench"></i>
              <p>
                Adminstration
                <i class="fas fa-angle-left right"></i>
               
              </p>
            </a>
            
           
            <ul class="nav nav-treeview">
               
			  <li class="nav-item"><a   href="<?php echo $base_url;?>systemusers.php" class="nav-link"><i class="fa fa-circle"></i> <p>Manage Users </p></a></li>
			  <li class="nav-item"><a  class="nav-link"   href="<?php echo $base_url;?>shops.php"><i class="fa fa-circle"></i> Manage Shops</a></li>

        <?php  if(thecheck( 1) > 0) { ?>
								<li class="nav-item"><a  class="nav-link"   href="<?php echo $base_url;?>new_settings.php"><i class="fa fa-circle"></i> Manage Loyalities and Commissions</a></li>
								<li class="nav-item"><a class="nav-link"    href="<?php echo $base_url;?>employee_commissions.php"><i class="fa fa-circle"></i> User Comissions</a></li>
								
								<li class="nav-item"><a  class="nav-link"   href="<?php echo $base_url;?>pricesetup.php"><i class="fa fa-circle"></i> Item Price Management</a></li>
								<li class="nav-item"><a class="nav-link"    href="<?php echo $base_url;?>category.php"><i class="fa fa-circle"></i> Stock Category</a></li>
								<li class="nav-item"><a class="nav-link"    href="<?php echo $base_url;?>itemsetup.php"><i class="fa fa-circle"></i>Add Stock Item</a></li>
								<li class="nav-item"><a class="nav-link"    href="<?php echo $base_url;?>stockitems.php"><i class="fa fa-circle"></i>Stock Items Management</a></li>
								<li class="nav-item"><a class="nav-link"    href="<?php echo $base_url;?>suppliers.php"><i class="fa fa-circle"></i> Manage Suppliers</a></li>

                <?php   } ?>
				 
            </ul>
          </li>

          <?php } ?>
		  
          <li class="nav-item has-treeview">
            <a  href="<?php echo $base_url;?>#" class="nav-link">
              <i class="nav-icon fas fa-copy"></i>
              <p>
                Work Shop
                <i class="fas fa-angle-left right"></i> 
              </p>
            </a>
            <ul class="nav nav-treeview"> 
            <li class="nav-item"><a  class="nav-link"  href="<?php echo $base_url;?>multiple.php"><i class="fa fa-cubes"></i> New Job</a></li>
			 <li class="nav-item"><a  class="nav-link"  href="<?php echo $base_url;?>oldjobs"><i class="fa fa-eye"></i> Returns</a></li>
            <?php   if($_SESSION["connectedusergroup"] < 4) {?>

            <li class="nav-item"><a  class="nav-link"  href="<?php echo $base_url;?>managetargets"><i class="fa fa-eye"></i> Daily Targets</a></li>
			 <li class="nav-item"><a  class="nav-link"  href="<?php echo $base_url;?>monthlytargets"><i class="fa fa-eye"></i> Monthly Targets</a></li>
            <?php } ?>

            <li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>todaysjobreport"><i class="fa fa-barcode"></i> Daily Report</a></li>

            <li class="nav-item"><a  class="nav-link"  href="<?php echo $base_url;?>jobsearch/reports"><i class="fa fa-book"></i> Workshop Receipts</a></li>
								<li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>repairs/repairname.php"><i class="fa fa-barcode"></i> Job Categories</a></li>
                <li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>jobsreport/reports"><i class="fa fa-barcode"></i> Report</a></li>
                 <li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>salesbreakdown"><i class="fa fa-book"></i> End of Day Report</a></li>
                 

                
								
							  </ul>
          </li>

          <li class="nav-item has-treeview">
            <a  href="<?php echo $base_url;?>jobsearch/reports"  class="nav-link">
              <i class="nav-icon fas fa-book-open"></i>
              <p>
              Search job 
                
              </p>
            </a>
           
          </li>

          <li class="nav-item has-treeview">
            <a  href="<?php echo $base_url;?>tasksearch/reports"  class="nav-link">
              <i class="nav-icon fas fa-book-open"></i>
              <p>
              Search Task 
                
              </p>
            </a>
           
          </li>

          <li class="nav-item has-treeview">
            <a  href="<?php echo $base_url;?>#" class="nav-link">
              <i class="nav-icon fas fa-book"></i>
              <p>
                Work shop Reports
                <i class="fas fa-angle-left right"></i> 
              </p>
            </a>
            <ul class="nav nav-treeview"> 
            <li class="nav-item"><a  class="nav-link"  href="<?php echo $base_url;?>jobreportbyjobtype"><i class="fa fa-search"></i> New Job</a></li> 
                <li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>jobsreport/reports"><i class="fa fa-search"></i> Report</a></li>
                 <li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>salesbreakdown"><i class="fa fa-book"></i> End of Day Report</a></li>
                

                
								
							  </ul>
          </li>

          

          <li class="nav-item has-treeview">
            <a  href="<?php echo $base_url;?>#" class="nav-link">
              <i class="nav-icon fas fa-user"></i>
              <p>
                Customers
                <i class="fas fa-angle-left right"></i> 
              </p>
            </a>
            <ul class="nav nav-treeview"> 
            <li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>customerregister.php"><i class="fa fa-folder"></i> Customers</a></li>
            <li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>searchforcustomer.php"><i class="fa fa-search"></i> Search Customer</a></li>

            <li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>createcustomer.php"><i class="fa fa-plus"></i> Create</a></li>


            
								
							  </ul>
          </li>


         


		  <?php if(thecheck( 1) > 0) { 

  if($_SESSION["connectedusergroup"] < 4) {
 
        
        ?>
		  
          <li class="nav-item has-treeview">
            <a  href="<?php echo $base_url;?>#" class="nav-link">
              <i class="nav-icon fas fa-copy"></i>
              <p>
                Store
                <i class="fas fa-angle-left right"></i> 
              </p>
            </a>
            <ul class="nav nav-treeview"> 
								<li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>store.php"><i class="fa fa-barcode"></i> Inventory</a></li>
								<li class="nav-item"><a  class="nav-link"  href="<?php echo $base_url;?>storestocktoshoptransfer.php"><i class="fa fa-cubes"></i> Transfer Items To Shop</a></li>
								<li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>Recelling_items_from_shop.php"><i class="fa fa-cubes"></i> Recall Items From Shop</a></li>
								<li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>speficic_item_ledger.php"><i class="fa fa-cubes"></i> Specific Item Ledger</a></li>
								
								<li class="nav-item"><a  class="nav-link"  href="<?php echo $base_url;?>General_item_ledger.php"><i class="fa fa-cubes"></i> General Item Ledger</a></li>
								
								
								
								 
								<li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>storestockadjustment.php"><i class="fa fa-adjust"></i> Adjust Stock Quantities</a></li>
								<li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>receivestorestock.php"><i class="fa fa-truck"></i> Receive Items</a></li>
            </ul>
          </li>

          <?php } ?>



          



          <li class="nav-item has-treeview">
            <a   class="nav-link">
              <i class="nav-icon fas fa-university text-info"></i>
              <p>
                Shop
                <i class="fas fa-angle-left right"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
			<li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>cashsalesregister.php"><i class="fa fa-shopping-cart"></i> Sales</a></li>
      <li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>invoicesales.php"><i class="fa fa-shopping-cart"></i> Invoice Sale</a></li>
								<li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>wholesale.php"><i class="fa fa-shopping-cart"></i> Whole Sale</a></li>
								<li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>customerregister.php"><i class="fa fa-shopping-cart"></i> Customers</a></li>
								<li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>special_sales.php"><i class="fa fa-chain-broken"></i> Returns and Damages</a></li>
								<li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>shopstock.php"><i class="fa fa-barcode"></i> Inventory</a></li>
								<li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>shopstocktransfer.php"><i class="fa fa-arrow-right"></i> Stock Transfer</a></li>
								<li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>shopstockadjustment.php"><i class="fa fa-adjust"></i> Adjust Stock Quantities</a></li>
								<li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>shoppricesview.php"><i class="fa fa-list-ul"></i> Prices View</a></li>
								<li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>shopreceiptsview.php"><i class="fa fa-calendar"></i> Shop Receipts View</a></li>
			 
            </ul>
          </li>

          <li class="nav-item has-treeview">
            <a  class="nav-link">
              <i class="nav-icon fas fa-book text-danger"></i>
              <p>
               Invoices
                <i class="fas fa-angle-left right"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
              
						<li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>invoicesales.php"><i class="fa fa-plus"></i> New Invoice</a></li>
										<li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>invoicespending.php"><i class="fa fa-book"></i> Pending Invoices</a></li>
										<li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>invoicetopupsdata.php"><i class="fa fa-book"></i> Invoices</a></li>
										 
					
            </ul>
          </li>
          <li class="nav-item has-treeview">
            <a  class="nav-link">
              <i class="nav-icon fas fa-trophy text-warning"></i>
              <p>
                Points
                <i class="fas fa-angle-left right"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
              
						<li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>customerclaims.php"><i class="fa fa-trophy"></i> All Points</a></li>
										<li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>individualcustomerclaims.php"><i class="fa fa-trophy"></i> Points Per Person</a></li>
										<li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>customerclaimspershop.php"><i class="fa fa-trophy"></i> Points Per Shop</a></li>
										 
					
            </ul>
          </li>


          
          <li class="nav-item has-treeview">
            <a  class="nav-link">
              <i class="nav-icon fas fa-gift text-info"></i>
              <p>
               Claims
                <i class="fas fa-angle-left right"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
               
										<li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>allclaims.php"><i class="fa fa-book"></i> All Claims</a></li>
										<li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>claimspershop.php"><i class="fa fa-book"></i> Claims Per Shop</a></li>
									
            </ul>
          </li>
		  
		   <li class="nav-item has-treeview">
            <a  class="nav-link">
              <i class="nav-icon fas fa-coins text-info"></i>
              <p>
              Expenses
                <i class="fas fa-angle-left right"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
               
										<li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>newexpanse.php"><i class="fa fa-pencil"></i> Add Expense</a></li>
										<li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>expanse_category.php"><i class="fa fa-book"></i> Categories</a></li>
										<li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>expanse_report.php"><i class="fa fa-dollar"></i> Report</a></li>
									
            </ul>
          </li>
		  
		   <li class="nav-item has-treeview">
       <a  class="nav-link">
       <i class="nav-icon fas fa-coins text-info"></i>
              <p>
              Staff Advances 
                <i class="fas fa-angle-left right"></i>
              </p>
            </a>
           
            <ul class="nav nav-treeview">
               
										<li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>addallowances.php"><i class="fa fa-pencil"></i> Add advances</a></li>
										<li class="nav-item"><a class="nav-link"   href="<?php echo $base_url;?>staffallowances.php"><i class="fa fa-book"></i> List advances</a></li>
									 			
            </ul>
          </li>
           
           
           
          <?php if($_SESSION["connectedusergroup"] == 1)
						{?>
  
           
           <li class="nav-item has-treeview">
            <a  href="<?php echo $base_url;?>#" class="nav-link">
              <i class="nav-icon fas fa-circle"></i>
              <p>
                Reports
                <i class="right fas fa-angle-left"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
               
             
              
			  
			   <li class="nav-item has-treeview">
                <a  href="<?php echo $base_url;?>#" class="nav-link">
                  <i class="far fa-circle nav-icon"></i>
                  <p>
                    Shop
                    <i class="right fas fa-angle-left"></i>
                  </p>
                </a>
                <ul class="nav nav-treeview">
				
				<li class="nav-item"><a class="nav-link"  href="<?php echo $base_url;?>shopsalessummary.php"><i class="fa fa-university"></i> Sales Summary</a></li>
										 <li class="nav-item"><a class="nav-link"  href="<?php echo $base_url;?>shopquantitiesview.php"><i class="fa fa-adjust"></i> Shop Quantities</a></li>
										
										 <li class="nav-item"><a class="nav-link"  href="<?php echo $base_url;?>sales_details.php"><i class="fa fa-adjust"></i> Sales Report Summary</a></li>
										
										 <li class="nav-item"><a class="nav-link"  href="<?php echo $base_url;?>Report_by_category.php"><i class="fa fa-adjust"></i> Sales by Category</a></li>
										
										 <li class="nav-item"><a class="nav-link"  href="<?php echo $base_url;?>Category_sales_report.php"><i class="fa fa-adjust"></i> Category Sales Details</a></li>
										 <li class="nav-item"><a class="nav-link"  href="<?php echo $base_url;?>detailed_sales.php"><i class="fa fa-adjust"></i> Detailed Sales report</a></li>
										  <li class="nav-item"><a class="nav-link"  href="<?php echo $base_url;?>expanse_report.php"><i class="fa fa-adjust"></i> Expanse Report</a></li>
										  
										   <li class="nav-item"><a class="nav-link"  href="<?php echo $base_url;?>salesbreakdown.php"><i class="fa fa-adjust"></i> General Breakdown Report</a></li>
										   
										   <li class="nav-item"><a class="nav-link"  href="<?php echo $base_url;?>periodicsummaryreport.php"><i class="fa fa-adjust"></i> Preriodic General   Report</a></li>
										   
										   
										  
										  
										 
										
                  
                </ul>
              </li>
			  
			  
			   <li class="nav-item has-treeview">
                <a  href="<?php echo $base_url;?>#" class="nav-link">
                  <i class="far fa-circle nav-icon"></i>
                  <p>
                    Store
                    <i class="right fas fa-angle-left"></i>
                  </p>
                </a>
                <ul class="nav nav-treeview">
				  <li class="nav-item"><a class="nav-link"  href="<?php echo $base_url;?>storequantitiesview.php"><i class="fa fa-stats"></i> Store Quantities</a></li>
										 <li class="nav-item"><a class="nav-link"  href="<?php echo $base_url;?>stock_movement_report.php"><i class="fa fa-adjust"></i> Stock Movement</a></li>
										 <li class="nav-item"><a class="nav-link"  href="<?php echo $base_url;?>storequantitiesbycategory.php"><i class="fa fa-stats"></i> Quantities By Category</a></li>
										
										 <li class="nav-item"><a class="nav-link"  href="<?php echo $base_url;?>storestockadjustmentsview.php"><i class="fa fa-adjust"></i> Adjust Stock Quantities</a></li>								
                  
                </ul>
              </li>
			  
			   
              
            </ul>
          </li>
		  
		  <li class="nav-item has-treeview">
            <a  href="<?php echo $base_url;?>personel_performance"  class="nav-link">
              <i class="nav-icon fas fa-book-open"></i>
              <p>
              Performance
                
              </p>
            </a>
           
          </li>
          
          <li class="nav-item has-treeview">
            <a  href="<?php echo $base_url;?>eagles"  class="nav-link">
              <i class="nav-icon fas fa-book-open"></i>
              <p>
             Eagles
                
              </p>
            </a>
           
          </li>

          <?php }  }

            }
          
          ?>
           
           
        </ul>
      </nav>
      <!-- /.sidebar-menu -->
    </div>
    <!-- /.sidebar -->
  </aside>