
<?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_View = $row['datashow'];

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

$CustomerMaster_Add  = $row['dataadd'];
$CustomerMaster_Edit  = $row['dataedit'];
$CustomerMaster_Delete  = $row['datadelete'];
$CustomerMaster_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']=='AreaMaster') {

        $areaMaster_Add     = $row['dataadd'];

        $areaMaster_Edit    = $row['dataedit'];

        $areaMaster_Delete  = 0;

        $areaMaster_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']== 'expenseMaster') {

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

}

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

$vehicleMaster_Add  = $row['dataadd'];
$vehicleMaster_Edit  = $row['dataedit'];
$vehicleMaster_Delete  = $row['datadelete'];
$vehicleMaster_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']=='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']=='reports') {

        $reportTrips_Add     = 0;

        $reportTrips_Edit    = 0;

        $reportTrips_Delete     = 0;

        $reportTrips_View    = $row['datashow'];



    }

  
	
	
	

}

 

?>

