<?php 

require 'config/constant.php';

//require 'userPermission.php';
//admin@thinkofmind.com   
$userID         = $_SESSION['user_id'];

$menu_status=mysqli_query($conn,"select * from dc_activate");
while($menurow=mysqli_fetch_array($menu_status))
{
	
	$mstatus=$menurow['status'];
}


if($userID==1)
{  ?>
<nav class="navbar navbar-default">
    <div class="container-fluid">
      <div class="navbar-header">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>                        
        </button>
        <a class="navbar-brand" href="welcome.php"><strong>  <?php echo $COMPANYNAME; ?></strong></a>
      </div>
      <div class="collapse navbar-collapse" id="myNavbar">
        <ul class="nav navbar-nav">
          <li class="dropdown">
            <a class="dropdown-toggle" data-toggle="dropdown" href="#"><?php echo $MENU_MASTER; ?><span class="caret"></span></a>
            <ul class="dropdown-menu" >
            
            <li><a href="productMasterDashboard.php">Product</a></li>
            <li><a href="supplierMasterDashboard.php"><?php echo $MENU_Supplier; ?></a></li>
           <li><a href="brandMasterDashboard.php">Brand</a></li>
           <li><a href="vehicleregMasterDashboard.php">Vehicle Reg Name</a></li>
            <li><a href="employeeMasterDashboard.php"><?php echo $MENU_emp; ?></a></li>
             <li><a href="vehicleMasterDashboard.php">Add Vehicle</a></li>
              <li><a href="expenseMaster.php"><?php echo $MENU_EXPENSE; ?></a></li>
            </ul>
          </li>
          
          <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#">Purchase <span class="caret"></span></a>
        <ul class="dropdown-menu">
       
     <li><a href="purchaseDashboard.php">Purchase</a></li>
      <li <?php echo $mstatus;?>><a href="purchaseDashboardwo.php">Purchase wo</a></li>
     <li><a href="piDieselInvoiceDashboard.php">Diesel Invoice</a></li>
    
          </ul>
          </li>
          
     
        <li class="dropdown">
            <a class="dropdown-toggle" data-toggle="dropdown" href="#">Fuel<span class="caret"></span></a>
            <ul class="dropdown-menu" >
              <li><a href="inDieselProDashboard.php">Internal Fill</a></li>
              <li><a href="inDieselunfillProDashboard.php">Internal UnFill</a></li>
              <li><a href="exDieselProDashboard.php">External Unfill</a></li>
			  <li><a href="exfDieselProDashboard.php">External Fill</a></li>
              
            </ul>
          </li>
          
           <li class="dropdown">
            <a class="dropdown-toggle" data-toggle="dropdown" href="#">Spare/Explosive&nbsp;Out<span class="caret"></span></a>
            <ul class="dropdown-menu" >
              
              <li><a href="inSpareProDashboard.php">Spare</a></li>
           <li><a href="explosive_utilizeDashboard.php">Explosive Utiliz</a></li>
            </ul>
          </li>
          
          <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#">Payroll <span class="caret"></span></a>
        <ul class="dropdown-menu">
        
       <li><a href="accEmpDashboard.php">Emp.Attendance</a></li>
        <li><a href="employeeAdvanceDashboard.php">Emp.Advance</a></li>
       <!-- <li><a href="employeeAdvance_collection_Dashboard.php">Adv.Collection</a></li>-->
      
      <li><a href="EmployeePaymentDashboard.php">Salary&nbsp;Payment</a></li>
      
      
      </ul>
      </li>
          
          <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#">Accounts <span class="caret"></span></a>
        <ul class="dropdown-menu">
        <li><a href="paypurchaseDashboard.php">Purchase With GST</a></li>
        <li <?php echo $mstatus;?>><a href="paypurchaseDashboardwo.php">Purchase EST</a></li>
         <li><a href="accOverDashboard.php">Fuel/Contractor&nbsp;Payment</a></li>
      
      <li><a href="expenseEntryDashboard.php">Expense</a></li>
      </ul>
      </li>
      
      <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#">Report <span class="caret"></span></a>
        <ul class="dropdown-menu">
        
      <li><a href="purchasereport.php">Purchase Report</a></li>
      
        <li><a href="fuel_purchasereport.php">Fuel&nbsp;Purchase&nbsp;Report</a></li>
       <li><a href="purchasetaxDashboard.php">Purchase Tax </a></li>
       <li><a href="stockreportpayment.php">Supplier Payment</a></li>
      
       <!--<li><a href="reportPurchaseDashboard.php">Fuel/Contactor&nbsp;Amount</a></li>-->
       <li><a href="reportAccountDashboard.php">Fuel/Contactor&nbsp;Payment</a></li>
       <li><a href="supplier_statement.php">Supplier Statement</a></li>
       
       <li><a href="overallpendingpurchase.php"> Pending GST Purchase</a></li>
       
		 <li><a href="reportSpareOutDashboard.php">Spare Out </a></li>
          <li><a href="stockSpareDashboard.php"> Stock Spare</a></li>
           <li><a href="compressor_report.php"> Compressor Report</a></li>
           <li><a href="elgi_report.php"> ELGI Report</a></li>
          <li><a href="stockExplosiveDashboard.php"> Stock Explosive</a></li>
          <li><a href="reportInDieselDashboard.php">Diesel Internal Report</a></li>
          <li><a href="reportExDieselDashboard.php">Diesel External</a></li>
           <li><a href="reportmileage.php">Vehicle Mileage</a></li>
           <li><a href="stockreportexpense.php">Expense</a></li>
            <li><a href="overall_report.php">Overall&nbsp;Report</a></li>
          
         
        </ul>
      </li>
          
        
         <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#">EST Report <span class="caret"></span></a>
        <ul class="dropdown-menu">
         <li <?php echo $mstatus;?>><a href="purchasereportwo.php">Purchase Report EST</a></li>
         <li <?php echo $mstatus;?>><a href="stockreportpaymentwo.php">Supplier Payment EST</a></li>
         <li <?php echo $mstatus;?>><a href="supplier_statementwo.php">Supplier Statement EST</a></li>
          <li  <?php echo $mstatus;?>><a href="overallpendingpurchasewo.php">Pending EST Purchase</a></li>
        </ul>
        </li>
        
      
      
       <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#">Payroll Report <span class="caret"></span></a>
        <ul class="dropdown-menu">
              <li><a href="Advance_payment_report.php">Advance Payment</a></li>        
          <li><a href="Advance_payment_collection_report.php">Advance Collection </a></li>
          <li><a href="payroll_statement.php">Payroll Statement </a></li>
          <li><a href="emp_salary_payment.php">Emp.Salary Payment </a></li>
          <li><a href="salaryreport.php">Emp Statement</a>
          
           <li><a href="salary_details.php">Salary&nbsp;Details</a></li>
         
        </ul>
      </li>
      
          <li>
            <a href="usersMasterDashboard.php"><?php echo $MENU_UserPermission; ?></a>
            
          </li>
        </ul>
        <ul class="nav navbar-nav navbar-right">
          <li><a href="logoutController.php"><span class="glyphicon glyphicon-log-out"></span> <?php echo $MENU_LOGOUT; ?></a></li>
        </ul>
      </div>
    </div>
  </nav>

<?php }  
else  {  ?>

  <nav class="navbar navbar-default">
    <div class="container-fluid">
      <div class="navbar-header">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>                        
        </button>
        <a class="navbar-brand" href="homeDashboard.php"><strong>  <?php echo $COMPANYNAME; ?></strong></a>
      </div>
      <div class="collapse navbar-collapse" id="myNavbar">
        <ul class="nav navbar-nav">
          <li class="dropdown">
            <a class="dropdown-toggle" data-toggle="dropdown" href="#"><?php echo $MENU_MASTER; ?><span class="caret"></span></a>
            <ul class="dropdown-menu" >
            <?php if ($ProductMaster_View==1){ ?>
              <li><a href="productMasterDashboard.php">Product</a></li>
            <?php } ?>
            <?php if ($supplierMaster_View==1){ ?>  
            <li><a href="supplierMasterDashboard.php"><?php echo $MENU_Supplier; ?></a></li>
            <?php } ?>
             <?php if ($brandMaster_View==1){ ?> 
            <li><a href="brandMasterDashboard.php">Brand</a></li>
            <?php } ?> 
            <?php if ($vehiclereg_View==1){ ?> 
            <li><a href="vehicleregMasterDashboard.php">Vehicle Reg Name</a></li>
             <?php } ?> 
            <?php if ($employeeMaster_View==1){ ?> 
            <li><a href="employeeMasterDashboard.php"><?php echo $MENU_emp; ?></a></li>
              <?php } ?> 
              
              <?php if ($vehicleMaster_View==1){ ?> 
              <li><a href="vehicleMasterDashboard.php">Add Vehicle</a></li>
              <?php } ?> 
              
            <?php if ($expenseMaster_View==1){ ?> 
            <li><a href="expenseMaster.php">Expense</a></li>
            <?php } ?>
           
          
            </ul>
          </li>
          
           <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#">Purchase <span class="caret"></span></a>
        <ul class="dropdown-menu">
        <?php if ($purchase_View==1){ ?> 
        <li><a href="purchaseDashboard.php">Purchase</a></li>
      <li <?php echo $mstatus;?>><a href="purchaseDashboardwo.php">Purchase wo</a></li>
   
        <?php } ?> 
        <?php if ($piDieselInvoice_View==1){ ?> 
         <li><a href="piDieselInvoiceDashboard.php">Diesel Invoice</a></li>
           <?php } ?> 
          </ul>
          </li>
          
		  
		<li class="dropdown">
            <a class="dropdown-toggle" data-toggle="dropdown" href="#">Fuel<span class="caret"></span></a>
            <ul class="dropdown-menu" >
             <?php if ($inDieselPro_View==1){ ?> 
              <li><a href="inDieselProDashboard.php">Internal Fill</a></li>
              <li><a href="inDieselunfillProDashboard.php">Internal UnFill</a></li>
               <?php } if ($exDieselPro_View==1){ ?> 
              <li><a href="exDieselProDashboard.php">External Unfill</a></li>
			  <li><a href="exfDieselProDashboard.php">External Fill</a></li>
                <?php } ?> 
            </ul>
          </li>
          
          
           <li class="dropdown">
            <a class="dropdown-toggle" data-toggle="dropdown" href="#">Spare/Explosive&nbsp;Out<span class="caret"></span></a>
            <ul class="dropdown-menu" >
               <?php if ($inSparePro_View==1){ ?> 
              <li><a href="inSpareProDashboard.php">Spare</a></li>
                <?php } if ($Explosive_utilize_View==1){ ?> 
           <li><a href="explosive_utilizeDashboard.php">Explosive Utiliz</a></li>
            <?php } ?> 
            </ul>
          </li>
          
          
           <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#">Payroll <span class="caret"></span></a>
        <ul class="dropdown-menu">
        
        <?php if ($Employee_Advanc_view==1){ ?> 
        <li><a href="employeeAdvanceDashboard.php">Emp.Advance</a></li>
        <?php } ?> 
         <?php if ($Employee_Advanc_view==1){ ?> 
       <!-- <li><a href="employeeAdvance_collection_Dashboard.php">Adv.Collection</a></li>-->
        <?php } ?> 
         <?php if ($accEmployee_view==1){ ?> 
      <li><a href="accEmpDashboard.php">Emp.Attendance</a></li>
      
      <?php } ?> 
      
      <?php if ($Employee_Payment_view==1){ ?> 
      
      <li><a href="EmployeePaymentDashboard.php">Salary&nbsp;Payment</a></li>
       <?php } ?> 
      </ul>
      </li>
          
          <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#">Accounts <span class="caret"></span></a>
        <ul class="dropdown-menu">
      <?php if ($accOver_View==1){ ?> 
				<li><a href="paypurchaseDashboard.php">Purchase With GST</a></li>
			 <li <?php echo $mstatus;?>><a href="paypurchaseDashboardwo.php">Purchase EST</a></li>
         <li><a href="accOverDashboard.php">Fuel/Contractor&nbsp;Payment</a></li>
			<?php } ?>  
             <?php if ($expense_view==1){ ?> 
        <li><a href="expenseEntryDashboard.php">Expense</a></li>
        <?php } ?> 	
       
      </ul>
      </li>
		  
		 
          
         <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#">Report <span class="caret"></span></a>
        <ul class="dropdown-menu">
        
      <li><a href="purchasereport.php">Purchase Report</a></li>
      
        <li><a href="fuel_purchasereport.php">Fuel&nbsp;Purchase&nbsp;Report</a></li>
       <li><a href="purchasetaxDashboard.php">Purchase Tax </a></li>
       <li><a href="stockreportpayment.php">Supplier Payment</a></li>
      
       <!--<li><a href="reportPurchaseDashboard.php">Fuel/Contactor&nbsp;Amount</a></li>-->
       <li><a href="reportAccountDashboard.php">Fuel/Contactor&nbsp;Payment</a></li>
       <li><a href="supplier_statement.php">Supplier Statement</a></li>
       
       <li><a href="overallpendingpurchase.php"> Pending GST Purchase</a></li>
       
		 <li><a href="reportSpareOutDashboard.php">Spare Out </a></li>
          <li><a href="stockSpareDashboard.php"> Stock Spare</a></li>
           <li><a href="compressor_report.php"> Compressor Report</a></li>
           <li><a href="elgi_report.php"> ELGI Report</a></li>
          <li><a href="stockExplosiveDashboard.php"> Stock Explosive</a></li>
          <li><a href="reportInDieselDashboard.php">Diesel Internal Report</a></li>
          <li><a href="reportExDieselDashboard.php">Diesel External</a></li>
           <li><a href="reportmileage.php">Vehicle Mileage</a></li>
           <li><a href="stockreportexpense.php">Expense</a></li>
            <li><a href="overall_report.php">Overall&nbsp;Report</a></li>
          
         
        </ul>
      </li>
          
        
         <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#">EST Report <span class="caret"></span></a>
        <ul class="dropdown-menu">
         <li <?php echo $mstatus;?>><a href="purchasereportwo.php">Purchase Report EST</a></li>
         <li <?php echo $mstatus;?>><a href="stockreportpaymentwo.php">Supplier Payment EST</a></li>
         <li <?php echo $mstatus;?>><a href="supplier_statementwo.php">Supplier Statement EST</a></li>
          <li  <?php echo $mstatus;?>><a href="overallpendingpurchasewo.php">Pending EST Purchase</a></li>
        </ul>
        </li>
      
      
       <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#">Payroll Report <span class="caret"></span></a>
        <ul class="dropdown-menu">
              <li><a href="Advance_payment_report.php">Advance Payment</a></li>        
          <li><a href="Advance_payment_collection_report.php">Advance Collection </a></li>
          <li><a href="payroll_statement.php">Payroll Statement </a></li>
          <li><a href="emp_salary_payment.php">Emp.Salary Payment </a></li>
          <li><a href="salaryreport.php">Emp Statement</a>
          
         <li><a href="salary_details.php">Salary&nbsp;Details</a></li>
         
        </ul>
      </li>
        <ul class="nav navbar-nav navbar-right">
          <li><a href="logoutController.php"><span class="glyphicon glyphicon-log-out"></span> <?php echo $MENU_LOGOUT; ?></a></li>
        </ul>
      </div>
    </div>
  </nav>
<?php  } ?>