
<?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']== 'ratefix') {
$ratefix_Add  = $row['dataadd'];
$ratefix_Edit  = $row['dataedit'];
$ratefix_Delete  = $row['datadelete'];
$ratefix  = $row['datashow'];
$ratefix_View  = $row['datashow'];
}

  
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']=='customerMaster') {
        $customerMaster_Add     = $row['dataadd'];
        $customerMaster_Edit    = $row['dataedit'];
        $customerMaster_Delete  = 0;
        $customerMaster_View    = $row['datashow'];
    }
	
	
	
	if($row['filenames']== 'expenseMaster') {

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

}

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

        $employeeMaster_Add     = $row['dataadd'];

        $employeeMaster_Edit    = $row['dataedit'];

        $employeeMaster_Delete  = 0;

        $employeeMaster_View    = $row['datashow'];

    }


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

$Sales_Add  = $row['dataadd'];
$Sales_Edit  = $row['dataedit'];
$Sales_Delete  = $row['datadelete'];
$Sales_View = $row['datashow'];
$Sales_Print = $row['datashow'];

}

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

$Purchase_Add  = $row['dataadd'];
$Purchase_Edit  = $row['dataedit'];
$Purchase_Delete  = $row['datadelete'];
$Purchase_View = $row['datashow'];
$Purchase_Print = $row['datashow'];

}

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

        $accOver_Add     = $row['dataadd'];

        $accOver_Edit    = $row['dataedit'];

        $accOver_Delete     = 0;

        $accOver_View    = $row['datashow'];
		$accOver_Print  = $row['dataprint'];

    }

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

        $reportTrips_Add     = 0;

        $reportTrips_Edit    = 0;

        $reportTrips_Delete     = 0;

        $reportTrips_View    = $row['datashow'];



    }

  
	
	
	
	
	
	

} 

 

?>

