<!-- Left side column. contains the sidebar -->
<aside class="main-sidebar sidebar-dark-primary elevation-4 <? echo (isset($_REQUEST['hide_left']) && $_REQUEST['hide_left']== 1 ) ? "hide" : "";?>">
<!-- Brand Logo -->
    <!-- Logo -->
	<?
		if(isset($_SESSION['job_user_id']) && $_SESSION['job_user_id'] !=""){
			$home_page = $siteURL."/index";
		}else{
			$home_page = $siteURL."/index1";
		}
		$logo = utility::getTableFieldById('sites', 'left_logo_name', 'site_name', $config->siteName);
		
		$src = $config->frontEndURL."/images/logo/" . '1_1_logo (1).png';
	?>
	<a href="<?php echo $home_page; ?>" class="brand-link" style="text-decoration:none;">
      <!--<img src="<?php echo $siteURL ?>/images/logo2.png" alt="AdminLTE Logo" class="brand-image img-circle elevation-3" style="opacity: .8;width: 33px;height: 33px;">-->
      <img src="<?php echo $src; ?>" alt="" class="brand-image img-circle" style="opacity: .8;width: 33px;height: 33px;">
      <span class="brand-text font-weight-light text-white text-bold">Web Alliance</span>
    </a>

<!-- sidebar: style can be found in sidebar.less -->
<div class="sidebar">
  <!-- sidebar menu: : style can be found in sidebar.less -->
  
  <!-- Sidebar user panel (optional) -->
      <div class="user-panel mt-3 pb-3 mb-3 d-flex">
        <div class="image">        
			<?
			$userimg = utility::getTableFieldById('admin', 'signature', 'id', $_SESSION['user_id']);
			$userimg_path = "../../signature/".$userimg;
			if(is_file($userimg_path)){
			?>					
			<img src="<?php echo $userimg_path;?>" class="img-circle elevation-2" alt="User Image" style="width: 34px;height: 34px;">
			<?}else{?>
			<img src="<?php echo $siteURL ?>/dist/img/avatar5.png" class="img-circle elevation-2" alt="User Image" style="width: 34px;height: 34px;">
			<?}?>		
		</div>		
		<div class="info">
		  <a href="#" class="d-block" style="text-decoration:none;"><p><?php echo ucfirst($_SESSION['login']);?><!--<br/><i class="fa fa-circle text-success"></i> Online--></p></a>
		  
		</div>
      </div>

      <!-- SidebarSearch Form -->
      <div class="form-inline hide">
        <div class="input-group" data-widget="sidebar-search">
          <input class="form-control form-control-sidebar" type="search" placeholder="Search" aria-label="Search">
          <div class="input-group-append">
            <button class="btn btn-sidebar">
              <i class="fas fa-search fa-fw"></i>
            </button>
          </div>
			<!--<form action="<?=$siteURL;?>/enquiry_management/index?page=view_jobs_by_search" method="post">
				<? //Admin::getAdminList("admin_id_global_search",$admin_id_global_search,"100%",false,"form-control"); ?>
				<input type="text" name="job_search" id="job_search" class="form-control form-control-sidebar" style="height:25px;margin-bottom:4px;border-radius:3px;" value="<?=$job_search;?>"  placeholder="Search" >
				<div class="input-group-append">
					<button type="submit" class="btn btn-sidebar" name="global_search" value="global_search">
						<i class="fas fa-search fa-fw"></i>
					</button>
				</div>
			</form>-->
        </div>
      </div>

      <!-- Sidebar Menu -->
  
  <nav class="mt-2">
  <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
	
	<? if(Admin::hasPermission('client_management')){?>
	<li class="nav-item">
		<a href="<?php echo $siteURL ?>/client_management/index?page=view" class="nav-link">
			<i class="nav-icon fas fa fa-edit"></i>
			<p><span>Customer Management</span></p>
		</a>		
	</li>
	<? } ?>
	<? if(Admin::hasPermission('item_management')){?>
	<li class="nav-item ">
		<a href="<?php echo $siteURL ?>/item_management/index?page=view" class="nav-link">
			<i class="nav-icon far fa-building"></i>
			<p><span>Item Management</span></p>
		</a>		
	</li>
	<?}?>
	<? if(Admin::hasPermission('kitting')){?>
	
	
	<li class="nav-item ">
		<a href="<?php echo $siteURL ?>/readyorders/index?page=readyorders_list" class="nav-link">
			<i class="nav-icon far fa-building"></i>
			<p><span>Ready orders List</span></p>
		</a>		
	</li>
	
	<?}?>
	<? if(Admin::hasPermission('sales_management')){?>
	<li class="nav-item">
		<a href="#" class="nav-link">
			<i class="nav-icon fas fa fa-crosshairs text-white"></i>
			<p class="text-white">Sales</p>
			<i class="fas fa-angle-left right"></i>
		</a>
        <ul class="nav nav-treeview">
		<? if(Admin::hasPermission('enquiry_management')){?>
			<li class="nav-item">
				<a href="<?php echo $siteURL ?>/enquiry_management/index?page=view" class="nav-link">
					<i class="nav-icon fas fa fa-edit"></i>
					<p><span>Enquiry Management</span></p>
				</a>		
			</li>
	    <? } ?>
		<? if(Admin::hasPermission('quotation_management')){?>
			<li class="nav-item ">
				<a href="<?php echo $siteURL ?>/quotation_management/index?page=view" class="nav-link">
					<i class="nav-icon fas fa fa-cube"></i>
					<p><span style='font-size:15px;'>Quotation Management</span></p>
				</a>		
			</li>
		<? } ?>
		</ul>		
	</li>
	<? } ?>
	
	<? if(Admin::hasPermission('production_planning')){?>
	<li class="nav-item">
		<a href="#" class="nav-link">
			<i class="nav-icon fas fa fa-crosshairs text-white"></i>
			<p class="text-white">Production Planning</p>
			<i class="fas fa-angle-left right"></i>
		</a>
        <ul class="nav nav-treeview">	
			<? if(Admin::hasPermission('part_import_csv')){?>	
				<li class="nav-item">
					<a href="<?php echo $siteURL ?>/production_planning/index?page=view" class="nav-link">
						<i class="nav-icon fas fa fa-crosshairs text-white"></i>
						<p class="text-white">Part CSV Import</p>
					</a>		
				</li>
			<?}?>		
			<? if(Admin::hasPermission('production_planner')){?>
			<li class="nav-item"><a href="<?php echo $siteURL ?>/production_planning/index?page=view_production" class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>Production Planner</p></a></li>
			<li class="nav-item"><a href="<?php echo $siteURL ?>/production_planning/index?page=replica_wood_production" class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>Replica Wood Planner</p></a></li>
			<?}?>
			<? if(Admin::hasPermission('work_order_management')){?>
			<? if(Admin::hasPermission('add_work_order')){?>
				<li class="nav-item hide"><a href="<?php echo $siteURL ?>/work_order_management/index?page=add_work_order" class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>Add Work Order</p></a></li>
				<li class="nav-item"><a href="<?php echo $siteURL ?>/work_order_management/index?page=view" class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>View Work Order List</p></a></li>
			<?}?>
			<?}?>
			<? if(Admin::hasPermission('engineer_asign_work_order')){?>
			<li class="nav-item">
				<a href="<?php echo $siteURL ?>/engineer_asign_work_order/index?page=view" class="nav-link">
					<i class="nav-icon fas fa fa-crosshairs text-white"></i>
					<p class="text-white">W/O Assignment </p>
				</a>		
			</li>
			<?}?>
		</ul>		
	</li>

	<? } ?>	
	<? if(Admin::hasPermission('machines_management')){?>
	<li class="nav-item">
		<a href="#" class="nav-link">
			<i class="nav-icon fas fa fa-user"></i>
			<p>Machine Scheduler
			<i class="fas fa-angle-left right"></i>
			</p>
		</a>
		<ul class="nav nav-treeview">
		 <? if(Admin::hasPermission('machines_gantt_view')){?>
            <li class="nav-item"><a href="<?php echo $siteURL ?>/machines_management/index?page=vca_gantt_machine" class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>VAC Gantt Machine </p></a></li>
			<li class="nav-item"><a href="<?php echo $siteURL ?>/machines_management/index?page=pu_gantt_machine" class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>PU Gantt Machine </p></a></li>
			<li class="nav-item"><a href="<?php echo $siteURL ?>/machines_management/index?page=cnc_gantt_machine" class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>CNC Gantt Machine </p></a></li>
			<li class="nav-item"><a href="<?php echo $siteURL ?>/machines_management/index?page=assmbly_gantt_machine" class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>ASM Gantt Machine</p></a></li>
			<li class="nav-item"><a href="<?php echo $siteURL ?>/machines_management/index?page=assypu_gantt_machine" class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>ASMPU Gantt Machine</p></a></li>
			<?}?>
			<? if(Admin::hasPermission('machines_list_view')){?>
			<li class="nav-item"><a href="<?php echo $siteURL ?>/machines_management/index?page=vac_scheduler_list_view" class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>VAC List Machine View</p></a></li>
			<li class="nav-item"><a href="<?php echo $siteURL ?>/machines_management/index?page=cnc_scheduler_list_view" class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>CNC List Machine View</p></a></li>
			<li class="nav-item"><a href="<?php echo $siteURL ?>/machines_management/index?page=pu_scheduler_list_view" class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>PU List Machine View</p></a></li>
			<li class="nav-item"><a href="<?php echo $siteURL ?>/machines_management/index?page=assmbly_scheduler_list_view" class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>ASM List Machine View</p></a></li>
			<li class="nav-item"><a href="<?php echo $siteURL ?>/machines_management/index?page=assmblypu_scheduler_list_view" class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>ASMPU List Machine View</p></a></li>
			<?}?>	
			<? if(Admin::hasPermission('machine_tab')){?>
			<li class="nav-item">
				<a href="<?php echo $siteURL ?>/machine_tab/index?page=machine_tabs" class="nav-link">
					<i class="nav-icon fas fa fa-crosshairs text-white"></i>
					<p class="text-white">Machine Tabs</p>
				</a>		
			</li>
			<?}?>
		</ul>
	</li>
	<?}?>	
	<? if(Admin::hasPermission('account_management')){?>
	<li class="nav-item">
		<a href="#" class="nav-link">
			<i class="nav-icon fas fa fa-user"></i>
			<p>Ordering / Accounts
			<i class="fas fa-angle-left right"></i>
			</p>
		</a>
		<ul class="nav nav-treeview">
		    <? if(Admin::hasPermission('work_order_management')){?>
			<? if(Admin::hasPermission('raw_matrial_forecast')){?>
			<li class="nav-item"><a href="<?php echo $siteURL ?>/work_order_management/index?page=view_purchase_list" class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>Raw Material Forecast</p></a></li>
			<?}?>
			<?}?>
			<? if(Admin::hasPermission('supplier_management')){?>
			<li class="nav-item">
				<a href="<?php echo $siteURL ?>/supplier_management/index?page=view" class="nav-link">
					<i class="nav-icon far fa-building"></i>
					<p><span>Supplier Management</span></p>
				</a>		
			</li>
			<?}?>
			<? if(Admin::hasPermission('purchase_order')){?>
			<li class="nav-item ">
				<a href="<?php echo $siteURL ?>/purchase_order/index?page=view" class="nav-link">
					<i class="nav-icon fas fa fa-cube"></i>
					<p><span style='font-size:15px;'>Purchase Management</span></p>
				</a>		
			</li>
			<?}?>
			<? if(Admin::hasPermission('po_invoices')){?>
			<li class="nav-item ">
				<a href="<?php echo $siteURL ?>/po_invoices/index?page=view" class="nav-link">
					<i class="nav-icon fas fa fa-cube"></i>
					<p><span style='font-size:15px;'>P/O Invoices </span></p>
				</a>		
			</li>
			<?}?>
			<? if(Admin::hasPermission('return')){?>
			<li class="nav-item ">
				<a href="<?php echo $siteURL ?>/return/index?page=view" class="nav-link">
					<i class="nav-icon fas fa fa-cube"></i>
					<p><span style='font-size:15px;'>P/O Return </span></p>
				</a>		
			</li>
			<?}?>
			<? if(Admin::hasPermission('sales_invoice')){?>
			<li class="nav-item ">
				<a href="<?php echo $siteURL ?>/sales_invoice/index?page=view" class="nav-link">
					<i class="nav-icon fas fa fa-cube"></i>
					<p><span style='font-size:15px;'>Sales Invoices </span></p>
				</a>		
			</li>
			<?}?>
			<? if(Admin::hasPermission('delivery_note')){?>
			<li class="nav-item ">
				<a href="<?php echo $siteURL ?>/delivery_note/index?page=view" class="nav-link">
					<i class="nav-icon fas fa fa-cube"></i>
					<p><span style='font-size:15px;'>Delivery Note</span></p>
				</a>		
			</li>
			<?}?>
		</ul>
	</li>
	<?}?>
	<? if(Admin::hasPermission('report_management')){?>
	<li class="nav-item">
		<a href="#" class="nav-link">
			<i class="nav-icon fas fa fa-user"></i>
			<p>Production Report
			<i class="fas fa-angle-left right"></i>
			</p>
		</a>
		<ul class="nav nav-treeview">
			<li class="nav-item"><a href="<?php echo $siteURL ?>/report_management/index?page=view_sales_purchasing" class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>View Sales </p></a></li>
			<li class="nav-item"><a href="<?php echo $siteURL ?>/report_management/index?page=view_daily_inputs" class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>Daily Inputs </p></a></li>
			<li class="nav-item"><a href="<?php echo $siteURL ?>/report_management/index?page=view_std_hrs" class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>Std Hours </p></a></li>
			<li class="nav-item"><a href="<?php echo $siteURL ?>/report_management/index?page=view_employee_hrs" class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>Employee Hours </p></a></li>
			<li class="nav-item"><a href="<?php echo $siteURL ?>/report_management/index?page=view_board_meeting_graph" class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>Board Meeting Graph</p></a></li>
			<li class="nav-item"><a href="<?php echo $siteURL ?>/report_management/index?page=view_production_totals" class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>Production Totals </p></a></li>
			<li class="nav-item"><a href="<?php echo $siteURL ?>/report_management/index?page=view_scrap_sales" class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>Scrap Sales </p></a></li>
		</ul>
	</li>
	<?}?>
	<? if(Admin::hasPermission('report_management')){?>
	<li class="nav-item">
		<a href="#" class="nav-link">
			<i class="nav-icon fas fa fa-user"></i>
			<p>Operational Report
			<i class="fas fa-angle-left right"></i>
			</p>
		</a>
		<ul class="nav nav-treeview">
			<li class="nav-item"><a href="<?php echo $siteURL ?>/report_management/index?page=delivery_report" class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>Delivery Report </p></a></li>
			<li class="nav-item"><a href="<?php echo $siteURL ?>/report_management/index?page=sales_order_stock" class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>Sales Order Stock </p></a></li>
			<li class="nav-item"><a href="<?php echo $siteURL ?>/report_management/index?page=delivery_awaiting" class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>Delivery Awaiting </p></a></li>
			<li class="nav-item"><a href="<?php echo $siteURL ?>/report_management/index?page=customer_delivery" class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>Customer Delivery </p></a></li>
			<li class="nav-item"><a href="<?php echo $siteURL ?>/report_management/index?page=standard_cost " class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>Standard Cost </p></a></li>
			<li class="nav-item"><a href="<?php echo $siteURL ?>/report_management/index?page=stock_valuation " class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>Stock Valuation </p></a></li>
			<li class="nav-item"><a href="<?php echo $siteURL ?>/report_management/index?page=abc_warehouse " class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>ABC By Warehouse </p></a></li>
			<li class="nav-item"><a href="<?php echo $siteURL ?>/report_management/index?page=sales_forecast " class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>Sales Forecast</p></a></li>
			
		</ul>
	</li>
	<?}?>	
	<? if(Admin::hasPermission('report_management')){?>
	<li class="nav-item">
		<a href="#" class="nav-link">
			<i class="nav-icon fas fa fa-user"></i>
			<p>Generic Reports
			<i class="fas fa-angle-left right"></i>
			</p>
		</a>
		<ul class="nav nav-treeview">
		
	     	<li class="nav-item ">
				<a href="<?php echo $siteURL ?>/kitting/index?page=kitting_list" class="nav-link">
					<i class="nav-icon far fa-building"></i>
					<p><span>Kitting Up List</span></p>
				</a>		
			</li>
		    <li class="nav-item ">
				<a href="<?php echo $siteURL ?>/quarantine_scrab/index?page=kitting_list" class="nav-link">
					<i class="nav-icon far fa-building"></i>
					<p><span>Quarantine Scrap</span></p>
				</a>		
			</li>
			<li class="nav-item ">
				<a href="<?php echo $siteURL ?>/machine_breakdown/index?page=machinebreakdown_list" class="nav-link">
					<i class="nav-icon far fa-building"></i>
					<p><span>Machine Breakdown List</span></p>
				</a>		
			</li>
			
			<li class="nav-item"><a href="<?php echo $siteURL ?>/report_management/index?page=view_production_planner_hybrid_report " class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>Production Planner Hybrid</p></a></li>
		</ul>
	</li>
	<?}?>
	<? if(Admin::hasPermission('in_out_reports')){ 
	  if($_SERVER['HTTP_HOST'] =="localhost"){?>
		<li class="nav-item">
			<a href="<?=$config->frontEndURL?>/admin/in_out_reports/index?page=view&id=<?=$_REQUEST['id'];?>&hide_top=1&hide_left=1" target="_blank" class="nav-link">
				<i class="nav-icon fas fa fa-crosshairs text-white"></i>
				
				<p class="text-white">In / Out Report</p>
				
			</a>		
		</li>
	<? }else{?>
		<li class="nav-item">
			<a  href="<?=$config->frontEndURL;?>in_outs_reports_pdf.php?id=<?=$_REQUEST['id'];?>&pdf_name=in_outs_reports" target="_blank" class="nav-link"> 
				<i class="nav-icon fas fa fa-crosshairs text-white"></i>
				
				<p class="text-white">In / Out Report</p>
				
			</a>		
		</li>
	<? }
	} ?>
		<? if(Admin::hasPermission('clockin_clockout')){?>
	<li class="nav-item">
		<a href="#" class="nav-link">
			<i class="nav-icon fas fa fa-user"></i>
			<p>Staff
			<i class="fas fa-angle-left right"></i>
			</p>
		</a>
		<ul class="nav nav-treeview">
			<li class="nav-item hide">
				<a href="<?php echo $siteURL ?>/clockin_clockout/index?page=clockin" class="nav-link">
					<i class="nav-icon fas fa fa-crosshairs text-white"></i>
					<p class="text-white">Clock in / Clock Out </p>
				</a>		
			</li>
			<li class="nav-item">
				<a href="<?php echo $config->frontEndURL . "/clock_in_clock_out/index.php?l=2"; ?>" class="nav-link">
					<i class="nav-icon fas fa fa-crosshairs text-white"></i>
					<p class="text-white">New Clock in/Clock Out</p>
				</a>		
			</li>
			<li class="nav-item">
				<a href="<?php echo $siteURL ?>/clockin_clockout/index?page=view_clockin_clockout_details" class="nav-link">
					<i class="nav-icon fas fa fa-crosshairs text-white"></i>
					<p class="text-white">Clock in / Clock Out List</p>
				</a>		
			</li>
			<li class="nav-item hide">
				<a href="<?php echo $siteURL ?>/clockin_clockout/index?page=enginer_login" class="nav-link">
					<i class="nav-icon fas fa fa-crosshairs text-white"></i>
					<p class="text-white">Engineer Login System </p>
				</a>		
			</li>
			<? if(Admin::hasPermission('leave_holiday_management')){?>
			<li class="nav-item">
				<a href="<?php echo $siteURL ?>/leave_holiday_management/index?page=view" class="nav-link">
					<i class="nav-icon fas fa fa-crosshairs text-white"></i>
					<p class="text-white">Leave / Holiday</p>
				</a>		
			</li>
			<?}?>
		</ul>
	</li>
	<?}?>
	
	<? if(Admin::hasPermission('miscellaneous')){?>
		<li class="nav-item ">	
			<a href="#" class="nav-link">
				<i class="nav-icon fas fa fa-cube"></i>
				<p>Management
				<i class="fas fa-angle-left right"></i>
				</p>
			</a>
			<ul class="nav nav-treeview">
			<? if(Admin::hasPermission('invoice_footer_details')){?>
				<li class="nav-item">
					<a href="<?php echo $siteURL ?>/invoice_footer_details/index?page=view" class="nav-link">
						<i class="nav-icon fas fa fa-circle text-white"></i>
						<p class="text-white">Invoice Footer Details</p>
					</a>		
				</li>
				<?}?>
				<? if(Admin::hasPermission('set_management')){?>
				<li class="nav-item">
					<a href="<?php echo $siteURL ?>/set_management/index?page=view" class="nav-link">
						<i class="nav-icon fas fa fa-circle text-white"></i>
						<p class="text-white">Set Management</p>
					</a>		
				</li>
				<?}?>
				<? if(Admin::hasPermission('group_management')){?>
				<li class="nav-item">
					<a href="<?php echo $siteURL ?>/group_management/index?page=view" class="nav-link">
						<i class="nav-icon fas fa fa-circle text-white"></i>
						<p class="text-white">Group Management</p>
					</a>		
				</li>
				<?}?>
				<? if(Admin::hasPermission('group_management')){?>
				<li class="nav-item hide">
					<a href="<?php echo $siteURL ?>/Mannual_fields_for_reports/index?page=view" class="nav-link">
						<i class="nav-icon fas fa fa-circle text-white"></i>
						<p class="text-white">Mannual Fields</p>
					</a>		
				</li>
				<?}?>
				<? if(Admin::hasPermission('working_hrs_management')){?>
				<li class="nav-item">
					<a href="<?php echo $siteURL ?>/working_hrs_management/index?page=view" class="nav-link">
						<i class="nav-icon fas fa fa-circle text-white"></i>
						<p class="text-white">Working Hours</p>
					</a>		
				</li>
				<?}?>
				<? if(Admin::hasPermission('works_order_management')){?>
				<li class="nav-item">
					<a href="<?php echo $siteURL ?>/works_order_management/index?page=view" class="nav-link">
						<i class="nav-icon fas fa fa-circle text-white"></i>
						<p class="text-white">Works Order Planning</p>
					</a>		
				</li>
				<?}?>
				<? if(Admin::hasPermission('shift_assigment')){?>
				<li class="nav-item">
					<a href="<?php echo $siteURL ?>/shift_assigment/index?page=view" class="nav-link">
						<i class="nav-icon fas fa fa-circle text-white"></i>
						<p class="text-white">Shift Assign</p>
					</a>		
				</li>
				<?}?>
				<? if(Admin::hasPermission('generic_holidays')){?>
				<li class="nav-item">
					<a href="<?php echo $siteURL ?>/generic_holidays/index?page=view" class="nav-link">
						<i class="nav-icon fas fa fa-crosshairs text-white"></i>
						<p class="text-white">Generic Holiday</p>
					</a>		
				</li>
				<? } ?>	
				<li class="nav-item"><a href='<?php echo $siteURL ?>/keycode/index?page=view_masterdata&name=title' class="nav-link"><i class="nav-icon fas fa fa-circle text-white"></i><p class="text-white">Title</p></a></li>
				<li class="nav-item hide"><a href='<?php echo $siteURL ?>/keycode/index?page=view_masterdata&name=items_types' class="nav-link"><i class="nav-icon fas fa fa-circle text-white"></i><p class="text-white">Products Types</p></a></li>	
				
				<li class="nav-item hide"><a href='<?php echo $siteURL ?>/keycode/index?page=view_masterdata&name=marketing_sector' class="nav-link"><i class="nav-icon fas fa fa-circle text-white"></i><p class="text-white"> Marketing Sector</p></a></li>	
				
				<li class="nav-item hide"><a href='<?php echo $siteURL ?>/keycode/index?page=view_masterdata&name=type' class="nav-link"><i class="nav-icon fas fa fa-circle text-white"></i><p class="text-white"> Type</p></a></li>	
				
				<li class="nav-item hide"><a href='<?php echo $siteURL ?>/keycode/index?page=view_masterdata&name=tax_code' class="nav-link"><i class="nav-icon fas fa fa-circle text-white"></i><p class="text-white"> Tax Code</p></a></li>	
				<li class="nav-item hide"><a href='<?php echo $siteURL ?>/keycode/index?page=view_masterdata&name=costing_method' class="nav-link"><i class="nav-icon fas fa fa-circle text-white"></i><p class="text-white"> Costing Method</p></a></li>
			<li class="nav-item hide"><a href='<?php echo $siteURL ?>/keycode/index?page=view_masterdata&name=source' class="nav-link"><i class="nav-icon fas fa fa-circle text-white"></i><p class="text-white"> Source</p></a></li>	
			 <li class="nav-item hide"><a href='<?php echo $siteURL ?>/keycode/index?page=view_masterdata&name=payment_terms' class="nav-link"><i class="nav-icon fas fa fa-circle text-white"></i><p class="text-white"> Payments Terms</p></a></li>	
			  <li class="nav-item "><a href='<?php echo $siteURL ?>/keycode/index?page=view_masterdata&name=spec' class="nav-link"><i class="nav-icon fas fa fa-circle text-white"></i><p class="text-white"> Spec</p></a></li>	
			  <li class="nav-item"><a href='<?php echo $siteURL ?>/keycode/index?page=view_masterdata&name=Grain' class="nav-link"><i class="nav-icon fas fa fa-circle text-white"></i><p class="text-white"> Material Grain</p></a></li>	
			<? if(Admin::hasPermission('stock_location')){?>
			<li class="nav-item hide">
				<a href="<?php echo $siteURL ?>/stock_location/index?page=view" class="nav-link">
					<i class="nav-icon fas fa fa-crosshairs text-white"></i>
					<p class="text-white">Stock Location</p>
				</a>		
			</li>
			<? } ?>	
			<? if(Admin::hasPermission('department')){?>
			<li class="nav-item hide">
				<a href="<?php echo $siteURL ?>/department/index?page=view" class="nav-link">
					<i class="nav-icon fas fa fa-crosshairs text-white"></i>
					<p class="text-white">Department</p>
				</a>		
			</li>
			<? } ?>	
			<? if(Admin::hasPermission('category')){?>
			<li class="nav-item hide">
				<a href="<?php echo $siteURL ?>/category/index?page=view" class="nav-link">
					<i class="nav-icon fas fa fa-crosshairs text-white"></i>
					<p class="text-white">Category</p>
				</a>		
			</li>
			<? } ?>				
						
				
			<? if(Admin::hasPermission('company')){?>
			<li class="nav-item hide">
				<a href="<?php echo $siteURL ?>/company/index?page=view" class="nav-link">
					<i class="nav-icon far fa-building text-white"></i>
					<p class="text-white">Company</p>
				</a>		
			</li>
			<? } ?>
			<? if(Admin::hasPermission('county_management')){?>
				<li class="nav-item hide">
				  <a href="<?php echo $siteURL ?>/county_management/index?page=view" class="nav-link">
					<i class="nav-icon fas fa fa-crosshairs text-white"></i> <p class="text-white">County Management</p>
				  </a>
				</li>
				<? } ?>
				<? if(Admin::hasPermission('country_management')){?>
				<li class="nav-item">
					<a href="<?php echo $siteURL ?>/country_management/index?page=view" class="nav-link">
						<i class="nav-icon fas fa fa-crosshairs text-white"></i>
						<p class="text-white">Country Management</p>
					</a>		
				</li>
				<? } ?>
				<? if(Admin::hasPermission('currency_management')){?>
				<li class="nav-item">
					<a href="<?php echo $siteURL ?>/currency_management/index?page=view" class="nav-link">
						<i class="nav-icon fas fa fa-money-bill text-white"></i>
						<p class="text-white">Currency</p>
					</a>		
				</li>
				<? } ?>
				<? if(Admin::hasPermission('station')){?>
				<li class="nav-item">
					<a href="<?php echo $siteURL ?>/station/index?page=view" class="nav-link">
						<i class="nav-icon fas fa-tools text-white"></i>
						<p class="text-white">Operation</p>
					</a>		
				</li>
				<? } ?>
				<? if(Admin::hasPermission('quotation_machines')){?>
				<li class="nav-item">
					<a href="<?php echo $siteURL ?>/quotation_machines/index?page=view" class="nav-link">
						<i class="nav-icon fas fa-tools text-white"></i>
						<p class="text-white">Quotation Machines</p>
					</a>		
				</li>
				<? } ?>
				<? if(Admin::hasPermission('product_group')){?>
				<li class="nav-item">
					<a href="<?php echo $siteURL ?>/product_group/index?page=view" class="nav-link">
						<i class="nav-icon fas fa fa-crosshairs text-white"></i>
						<p class="text-white">Product Group</p>
					</a>		
				</li>
				<? } ?>	
				<? if(Admin::hasPermission('scrp_item_list')){?>
				<li class="nav-item">
					<a href="<?php echo $siteURL ?>/scrp_item_list/index?page=view" class="nav-link">
						<i class="nav-icon fas fa fa-crosshairs text-white"></i>
						<p class="text-white">Scrap Item</p>
					</a>		
				</li>
				<? } ?>	
				<? if(Admin::hasPermission('nominal_code')){?>
				<li class="nav-item">
					<a href="<?php echo $siteURL ?>/nominal_code/index?page=view" class="nav-link">
						<i class="nav-icon fas fa fa-crosshairs text-white"></i>
						<p class="text-white">Nominal Code</p>
					</a>		
				</li>
				<? } ?>	
				
				<? if(Admin::hasPermission('product_group')){?>
				<li class="nav-item">
					<a href="<?php echo $siteURL ?>/default_receipt_location/index?page=view" class="nav-link">
						<i class="nav-icon fas fa fa-crosshairs text-white"></i>
						<p class="text-white">Default Receipt Location</p>
					</a>		
				</li>
				<? } ?>				
				<? if(Admin::hasPermission('raw_materials')){?>
				<li class="nav-item">
					<a href="<?php echo $siteURL ?>/raw_materials/index?page=view" class="nav-link">
						<i class="nav-icon fas fa fa-crosshairs text-white"></i>
						<p class="text-white">Raw Materials</p>
					</a>		
				</li>
				<? } ?>
				<? if(Admin::hasPermission('stock_category')){?>
				<li class="nav-item">
					<a href="<?php echo $siteURL ?>/stock_category/index?page=view" class="nav-link">
						<i class="nav-icon fas fa-boxes text-white"></i>
						<p class="text-white">Stock Category</p>
					</a>		
				</li>
				<? } ?>
				<? if(Admin::hasPermission('Mannual_fields_for_reports')){?>
				<li class="nav-item hide">
					<a href="<?php echo $siteURL ?>/Mannual_fields_for_reports/index?page=add" class="nav-link">
						<i class="nav-icon fas fa-boxes text-white"></i>
						<p class="text-white">Weekly Fieled Input</p>
					</a>		
				</li>
				<li class="nav-item">
					<a href="<?php echo $siteURL ?>/Mannual_fields_for_reports/index?page=view" class="nav-link">
						<i class="nav-icon fas fa-boxes text-white"></i>
						<p class="text-white">Monthly Fieled Input</p>
					</a>		
				</li>
				<? } ?>
				
			</ul>
		</li>
		
	<? }?>
	
		<? if(Admin::hasPermission('user_management')){?>
	<li class="nav-item">
		<a href="#" class="nav-link">
			<i class="nav-icon fas fa fa-user"></i>
			<p>User Management
			<i class="fas fa-angle-left right"></i>
			</p>
		</a>
		<ul class="nav nav-treeview">
			<? if(Admin::hasPermission('admin_user')){?>
			<li class="nav-item"><a href="<?php echo $siteURL ?>/adminuser/index?page=admin_view" class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>Admin User</p></a></li>
			<? } ?>
			<? if(Admin::hasPermission('groups')){?>
			<li class="nav-item"><a href="<?php echo $siteURL ?>/groups/index?page=view" class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>Groups</p></a></li>
			<? } ?>
			<? if(Admin::hasPermission('module')){?>
			<li class="nav-item"><a href="<?php echo $siteURL ?>/module/index?page=view" class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>Modules</p></a></li>
			<? } ?>
		</ul>
	</li>
	<? } ?>
	
	
	
	
	
	
	
	<? if(Admin::hasPermission('product_management')){?>
	<li class="nav-item hide">
		<a href="<?php echo $siteURL ?>/product_management/index?page=view" class="nav-link">
			<i class="nav-icon far fa-building"></i>
			<p><span>Product</span></p>
		</a>		
	</li>
	<?}?>
	<? if(Admin::hasPermission('daynmic_product_management')){?>
	<li class="nav-item hide">
		<a href="<?php echo $siteURL ?>/daynmic_product_management/index?page=view_pro_template" class="nav-link">
			<i class="nav-icon far fa-building"></i>
			<p><span>Create Item Template</span></p>
		</a>		
	</li>
	<?}?>
	<? if(Admin::hasPermission('daynmic_product_management')){?>
	<li class="nav-item hide">
		<a href="<?php echo $siteURL ?>/daynmic_product_management/index?page=view_product&quic=1" class="nav-link">
			<i class="nav-icon far fa-building"></i>
			<p><span>Item Listing</span></p>
		</a>		
	</li>
	<?}?>
	
	<? if(Admin::hasPermission('item_management')){?>
	<li class="nav-item hide">
		<a href="<?php echo $siteURL ?>/item_management/index?page=view" class="nav-link">
			<i class="nav-icon far fa-building"></i>
			<p><span>Item Management</span></p>
		</a>		
	</li>
	<?}?>



	

	<? if(Admin::hasPermission('item_management')){?>
	<li class="nav-item">
		<a href="#" class="nav-link hide">
			<i class="nav-icon fas fa fa-user"></i>
			<p>PO Management
			<i class="fas fa-angle-left right"></i>
			</p>
		</a>
		<? //if(Admin::hasPermission('quotation_management')){?>
		<ul class="nav nav-treeview">
				<li class="nav-item hide">
					<a href="<?php echo $siteURL ?>/purchase_order/index?page=view" class="nav-link">
						<i class="nav-icon fas fa fa-cube"></i>
						<p><span style='font-size:15px;'>Purchase Management</span></p>
					</a>		
				</li>
				<? //} ?>
				<? //if(Admin::hasPermission('po_invoices')){?>
				<li class="nav-item hide">
					<a href="<?php echo $siteURL ?>/po_invoices/index?page=view" class="nav-link">
						<i class="nav-icon fas fa fa-cube"></i>
						<p><span style='font-size:15px;'>P/O Invoices </span></p>
					</a>		
				</li>
				<?// } ?>
				<? //if(Admin::hasPermission('sales_invoice')){?>
				<li class="nav-item hide">
					<a href="<?php echo $siteURL ?>/sales_invoice/index?page=view" class="nav-link">
						<i class="nav-icon fas fa fa-cube"></i>
						<p><span style='font-size:15px;'>Sales Invoices </span></p>
					</a>		
				</li>
				<?// } ?>
				<? //if(Admin::hasPermission('return')){?>
				<li class="nav-item hide">
					<a href="<?php echo $siteURL ?>/return/index?page=view" class="nav-link">
						<i class="nav-icon fas fa fa-cube"></i>
						<p><span style='font-size:15px;'>P/O Return </span></p>
					</a>		
				</li>
				<? //}	?>
             </ul>			
	</li>
	<?}?>

	

<? if(Admin::hasPermission('clockin_clockout')){?>
	<li class="nav-item hide">
		<a href="<?php echo $siteURL ?>/clockin_clockout/index?page=clockin" class="nav-link">
			<i class="nav-icon fas fa fa-crosshairs text-white"></i>
			<p class="text-white">Clock in / Clock Out </p>
		</a>		
	</li>
	<li class="nav-item hide">
		<a href="<?php echo $siteURL ?>/clockin_clockout/index?page=enginer_login" class="nav-link">
			<i class="nav-icon fas fa fa-crosshairs text-white"></i>
			<p class="text-white">Engineer Login System </p>
		</a>		
	</li>
	<? } ?>	
	<? if(Admin::hasPermission('leave_holiday_management')){?>
	<li class="nav-item hide">
		<a href="<?php echo $siteURL ?>/leave_holiday_management/index?page=view" class="nav-link">
			<i class="nav-icon fas fa fa-crosshairs text-white"></i>
			<p class="text-white">Leave / Holiday</p>
		</a>		
	</li>
	<? } ?>	
	
	
	

	<? if(Admin::hasPermission('help_video')){?>
	<li class="nav-item hide">
		<a href="<?php echo $siteURL ?>/help_video/index?page=view" class="nav-link">
			<i class="nav-icon fas fa fa-crosshairs text-white"></i>
			<p class="text-white">Help Video Link</p>
		</a>		
	</li>
	<? } ?>	
	<? if(Admin::hasPermission('campaign_management')){?>
	<li class="nav-item hide">
		<a href="<?php echo $siteURL ?>/campaign_management/index?page=view" class="nav-link">
			<i class="nav-icon far fa-building"></i>
			<p><span>Campaign</span></p>
		</a>		
	</li>
	<? } ?>
	<? if(Admin::hasPermission('dynamic_form_management')){?>
	<li class="nav-item hide">
		<a href="#" class="nav-link">
			<i class="nav-icon fas fa fa-edit"></i>
			<p>Dynamic Forms
			<i class="fas fa-angle-left right"></i>
			</p>
		</a>
		<ul class="nav nav-treeview hide">
			<li class="nav-item hide"><a href="<?php echo $siteURL ?>/dynamic_form_management/index?page=dynamic_form_view" class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>Add / View Form</p></a></li>
			<li class="nav-item hide"><a href="<?php echo $siteURL ?>/dynamic_form_management/index?page=dynamic_form_list" class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>View Form List</p></a></li>
		</ul>
	</li>
	<?}?>
	
	<li class="nav-item hide">
		<a href="<?php echo $siteURL ?>/enquiry_management/index?page=view_celebrant" class="nav-link">
			<i class="nav-icon fas fa fa-edit"></i>
			<p><span>Quotations</span></p>
		</a>		
	</li>
	
	<li class="nav-item hide">
		<a href="<?php echo $siteURL ?>/enquiry_management/index?page=view_funeral" class="nav-link">
			<i class="nav-icon fas fa fa-edit"></i>
			<p><span>Clients</span></p>
		</a>		
	</li>
	<li class="nav-item hide">
		<a href="<?php echo $siteURL ?>/job_contract/index?page=list&source=f" class="nav-link">
			<i class="nav-icon fas fa fa-edit"></i>
			<p><span>Contract</span></p>
		</a>
	</li>
	

	<? if(Admin::hasPermission('ess')){?>
	<li class="nav-item hide">	
		<a href="#" class="nav-link">
			<i class="nav-icon fas fa fa-wrench"></i>
			<p>ESS
			<i class="fas fa-angle-left right"></i>
			</p>
		</a>
		<ul class="nav nav-treeview">				
			<li class="nav-item"><a href="<?php echo $siteURL ?>/ess/index?page=view_ess" class="nav-link"><i class="far fa-circle nav-icon"></i><p>ESS</p></a></li>
			<li class="nav-item"><a href='<?php echo $siteURL ?>/ess/index?page=view_ess_template' class="nav-link"><i class="far fa-circle nav-icon"></i><p>ESS Image Template</p></a></li>
			<li class="nav-item"><a href='<?php echo $siteURL ?>/keycode/index?page=view_masterdata&name=ess_category' class="nav-link"><i class="far fa-circle nav-icon"></i><p>ESS Category</p></a></li>
			<li class="nav-item"><a href='<?php echo $siteURL ?>/ess/index?page=view_ess_heading' class="nav-link"><i class="far fa-circle nav-icon"></i><p>ESS Headings</p></a></li>
			<li class="nav-item"><a href='<?php echo $siteURL ?>/ess/index?page=view_ess_items' class="nav-link"><i class="far fa-circle nav-icon"></i><p>ESS Items</p></a></li>
		</ul>
	</li>
	<? } ?>
	
	<? if(Admin::hasPermission('payment_management')){?>
	<!--<li class="nav-item">
		<a href="<?php echo $siteURL ?>/payment_management/index?page=view_payment_main">
			<i class="nav-icon fas fa fa-credit-card"></i>
			<p><span>Payments</span></p>
		</a>		
	</li>-->
	<li class="nav-item hide">
		<a href="<?php echo $siteURL ?>/payment_management/index?page=view_admin_invoice" class="nav-link">
			<i class="nav-icon fas fa fa-edit"></i>
			<p><span>Invoices</span></p>
		</a>		
	</li>
	<? }?>
		
	<? if(Admin::hasPermission('document_management')){?>
	<li class="nav-item hide">
		<a href="<?php echo $siteURL ?>/document_management/index?page=view_documents_for_admin" class="nav-link">
			<i class="nav-icon fas fa fa-book"></i>
			<p><span>Documents</span></p>
		</a>		
	</li>
	<? } ?>
	
	<? if(Admin::hasPermission('mileage')){?>
	<li class="nav-item hide">
		<a href="<?php echo $siteURL ?>/mileage/index?page=list" class="nav-link">
			<i class="nav-icon fas fa fa-taxi"></i>
			<p><span>Mileage</span></p>
		</a>		
	</li>
	<? } ?>
	
	<? if(Admin::hasPermission('template_document')){?>
	<li class="nav-item hide">
		<a href="<?php echo $siteURL ?>/template_document/index?page=view" class="nav-link">
			<i class="nav-icon fas fa fa-tasks"></i>
			<p><span>Template Document</span></p>
		</a>		
	</li>
	<? } ?>
	<? if(Admin::hasPermission('appointment')){?>
	<li class="nav-item hide">
		<a href="<?php echo $siteURL ?>/appointment/index?page=view_appointment_for_admin" class="nav-link">
			<i class="nav-icon fas fa fa-calendar"></i>
			<p><span>Appointments</span></p>
		</a>		
	</li>
	<? } ?>
	<? if(Admin::hasPermission('notes_management')){?>
	<li class="nav-item hide">
		<a href="<?php echo $siteURL ?>/notes/index?page=view_post_out_for_admin" class="nav-link">
			<i class="nav-icon fas fa fa-sticky-note"></i>
			<p><span>Notes</span></p>
		</a>		
	</li>
	<? } ?>
	<? if(Admin::hasPermission('reminders_management')){?>
	<li class="nav-item hide">
		<a href="<?php echo $siteURL ?>/notes/index?page=view_reminders_for_admin" class="nav-link">
			<i class="nav-icon fas fa fa-star"></i>
			<p><span>Reminders</span></p>
		</a>		
	</li>
	<? } ?>
	
	<? if(Admin::hasPermission('bulk_import_export')){?>
	<li class="nav-item hide">
		<a href="<?php echo $siteURL ?>/bulk_import_export/index?action=bulk_import" class="nav-link">
			<i class="nav-icon fas fa fa-cloud"></i>
			<p><span>Bulk Upload</span></p>
		</a>		
	</li>
	<? } ?>
	
	<? if(Admin::hasPermission('timesheet_management')){?>
	<li class="nav-item hide">
		<a href="<?php echo $siteURL ?>/timesheet_management/index?page=view_timesheet_for_admin" class="nav-link">
			<i class="nav-icon fas fa fa-list-alt"></i>
			<p><span>Timesheets</span></p>
		</a>		
	</li>
	<? } ?>
	
	<? if(Admin::hasPermission('mail_schedule')){?>
	<li class="nav-item hide">	
		<a href="#" class="nav-link">
			<i class="nav-icon fas fa fa-wrench"></i>
			<p>Mail &amp; SMS
			<i class="fas fa-angle-left right"></i>
			</p>
		</a>
		<ul class="nav nav-treeview">				
			<li class="nav-item"><a href='<?php echo $siteURL ?>/mail_schedule/index?page=view' class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>My Emails</p></a></li>
			<li class="nav-item"><a href='<?php echo $siteURL ?>/mail_schedule/index?page=view_sms_schedule' class="nav-link"><i class="nav-icon fas fa fa-circle"></i><p>My SMS</p></a></li>
		</ul>
	</li>
	<? } ?>
	
	

	<? if(Admin::hasPermission('quotation_information')){?>
	<li class="nav-item hide">
		<a href="<?php echo $siteURL ?>/quotation_information/index?page=view" class="nav-link">
			<i class="nav-icon far fa-building"></i>
			<p><span>Quotation Information</span></p>
		</a>		
	</li>
	<? } ?>
	

	<? if(Admin::hasPermission('site_management') && $_SESSION['is_super_admin']){?>
	<li class="nav-item hide">
	  <a href="<?php echo $siteURL ?>/sites/index?page=view" class="nav-link">
		<i class="nav-icon fas fa fa-wrench"></i> <p><span>Site Management</span></p>
	  </a>
	</li>
	<? } ?>
	<? if(Admin::hasPermission('mail_format')){?>
	<li class="nav-item hide">
	  <a href="<?php echo $siteURL ?>/mail_format/index?page=view" class="nav-link">
		<i class="nav-icon fas fa fa-envelope"></i> <p><span>Mail Format</span></p>
	  </a>
	</li>
	<? } ?>
	<? if($_SESSION['is_super_admin']){ ?>
	<li class="nav-item hide">
	  <a href="<?php echo $siteURL ?>/adminuser/index?page=server_setting" class="nav-link">
		<i class="nav-icon fas fa fa-cog"></i> <p><span>Server Setting</span></p>
	  </a>
	</li>
	<? } ?>
	<? if($_SESSION['uname'] =="sami"){ ?>
	<li class="nav-item hide">
	   <a href="<?php echo $siteURL ?>/job_contract/index?page=number_list" class="nav-link">
		<i class="nav-icon fas fa fa-cog"></i> <p><span>Numbers</span></p>
	 </a>
	</li>
	<li class="nav-item hide">
	  <a href="<?php echo $siteURL ?>/job_contract/index?page=number_alter" class="nav-link">
		<i class="nav-icon fas fa fa-cog"></i> <p><span>Change Number </span></p>
	  </a>
	</li>
	<? } ?>
	<li class="nav-item">
	  <a href="<?php echo $siteURL ?>/adminuser/index?page=logout" class="nav-link">
		<i class="nav-icon fas fa-sign-out-alt"></i> <p><span>Sign Out</span></p>
	  </a>
	</li>
	
  </ul>
  </nav>
</div>
<!-- /.sidebar -->
</aside>