
<?php


//session_start();
$userID         = $_SESSION['user_id'];



$Details_Result = mysqli_query($conn,"SELECT * FROM user_permission WHERE userID='$userID' and activestatus=1");

 



while($row = mysqli_fetch_array($Details_Result))

{ 



if($row['filenames']== 'productMaster') {
$productMaster_Add  = $row['dataadd'];
$productMaster_Edit  = $row['dataedit'];
$productMaster_Delete  = $row['datadelete'];
$productMaster  = $row['datashow'];
$ProductMaster_View  = $row['datashow'];
}  


if($row['filenames']=='SupplierMaster') {

        $supplierMaster_Add     = $row['dataadd'];

        $supplierMaster_Edit    = $row['dataedit'];

        $supplierMaster_Delete  = 0;

        $supplierMaster_View    = $row['datashow'];

    }
	 


    if($row['filenames']=='BrandMaster') {

        $brandMaster_Add     = $row['dataadd'];

        $brandMaster_Edit    = $row['dataedit'];

        $brandMaster_Delete  = 0;

        $brandMaster_View    = $row['datashow'];

    }
	
	if($row['filenames']=='vehiclereg') {

        $vehiclereg_Add     = $row['dataadd'];

        $vehiclereg_Edit    = $row['dataedit'];

        $vehiclereg_Delete  = 0;

        $vehiclereg_View    = $row['datashow'];

    }
	
		



    if($row['filenames']=='employeeMaster') {

        $employeeMaster_Add     = $row['dataadd'];

        $employeeMaster_Edit    = $row['dataedit'];

        $employeeMaster_Delete  = 0;

        $employeeMaster_View    = $row['datashow'];

    }
	
	if($row['filenames']=='vehicleMaster') {

        $vehicleMaster_Add     = $row['dataadd'];

        $vehicleMaster_Edit    = $row['dataedit'];

        $vehicleMaster_Delete  = 0;

        $vehicleMaster_View    = $row['datashow'];

    }
	
	
	if($row['filenames']== 'expenseMaster') {

$expenseMaster_Add  = $row['dataadd'];
$expenseMaster_Edit  = $row['dataedit'];
$expenseMaster_Delete  = $row['datadelete'];
$expenseMaster_View = $row['datashow'];

}

if($row['filenames']=='Purchase') {    

        $purchase_Add     = $row['dataadd'];

        $purchase_Edit    = $row['dataedit'];

        $purchase_Delete  = 0;

        $purchase_View    = $row['datashow'];
		$purchase_Print  = $row['dataprint'];

    }
	
	if($row['filenames']=='DieselPurchase') {

        $piDieselInvoice_Add     = $row['dataadd'];

        $piDieselInvoice_Edit    = $row['dataedit'];

        $piDieselInvoice_Delete  = 0;

        $piDieselInvoice_View    = $row['datashow'];

    }
	
	
	
	
	 if($row['filenames']=='InternalDiesel') {

        $inDieselPro_Add     = $row['dataadd'];

        $inDieselPro_Edit    = $row['dataedit'];

        $inDieselPro_Delete  = 0;

        $inDieselPro_View    = $row['datashow'];

    }
	
	if($row['filenames']=='ExternalDiesel') {

        $exDieselPro_Add     = $row['dataadd'];

        $exDieselPro_Edit    = $row['dataedit'];

        $exDieselPro_Delete  = 0;

        $exDieselPro_View    = $row['datashow'];

    }
	
	if($row['filenames']=='SpareOut') {

        $inSparePro_Add     = $row['dataadd'];

        $inSparePro_Edit    = $row['dataedit'];

        $inSparePro_Delete  = 0;

        $inSparePro_View    = $row['datashow'];

    }
	
	if($row['filenames']=='Explosive_utilize') {
        $Explosive_utilize_Add     = $row['dataadd'];
        $Explosive_utilize_Edit    = $row['dataedit'];
        $Explosive_utilize_Delete  = 0;
        $Explosive_utilize_View    = $row['datashow'];
    }
	



if($row['filenames']=='Employee_Advance') {

        $Employee_Advanc_Add     = $row['dataadd'];

        $Employee_Advanc_Edit    = $row['dataedit'];

        $Employee_Advanc_Delete     = 0;
		$Employee_Advanc_Print  = $row['dataprint'];

        $Employee_Advanc_view   = $row['datashow'];

    }


if($row['filenames']=='Employee_Attendance') {

        $accEmployee_Add     = $row['dataadd'];

        $accEmployee_Edit    = $row['dataedit'];

        $accEmployee_Delete     = 0;

        $accEmployee_view    = $row['datashow'];

    }
	
	if($row['filenames']=='Employee_Payment') {

        $Employee_Payment_Add     = $row['dataadd'];

        $Employee_Payment_Edit    = $row['dataedit'];

        $Employee_Payment_Delete     = $row['dataedit'];
		$Employee_Payment_Print  = $row['dataprint'];

        $Employee_Payment_view   = $row['datashow'];

    }
	
	
	
	
	 if($row['filenames']=='SupplierPayment') {

        $accOver_Add     = $row['dataadd'];

        $accOver_Edit    = $row['dataedit'];

        $accOver_Delete     = 0;

        $accOver_View    = $row['datashow'];

    }

	


if($row['filenames']== 'expense') {

$expense_Add   = $row['dataadd'];
$expense_Edit  = $row['dataedit'];
$expense_Delete  = $row['datadelete'];
$expense_Print  = $row['dataprint'];
$expense_view           = $row['datashow'];

}



    if($row['filenames']=='reports') {

        $reportTrips_Add     = 0;

        $reportTrips_Edit    = 0;

        $reportTrips_Delete     = 0;

        $reportTrips_View    = $row['datashow'];



    }

  
	
	 if($row['filenames']=='reportswo') {

        $reportTripswo_Add     = 0;

        $reportTripswo_Edit    = 0;

        $reportTripswo_Delete     = 0;

        $reportTripswo_View    = $row['datashow'];



    }
	
	if($row['filenames']=='report_payroll') {

        $report_payroll_Add     = 0;

        $report_payroll_Edit    = 0;

        $report_payroll_Delete     = 0;

        $report_payroll_View    = $row['datashow'];



    }
	
	
	
	
	

} 

 

?>

