<?PHP 
// Initialize the session
session_start();
error_reporting(0);
// Initialize the session

require_once "config.php";
function dateDifference($start_date, $end_date)
{
    // calulating the difference in timestamps 
    $diff = strtotime($start_date) - strtotime($end_date);
     
    // 1 day = 24 hours 
    // 24 * 60 * 60 = 86400 seconds
    return ceil(abs($diff / 86400));
}
	include("sql_payment.php");
	$timestamp = date("Ymd");
	
	$filename = 'Export_excel_' .$report_type. '_' . strtoupper($_SESSION["locationName"]). "_" . $timestamp . '.csv';
	//header("Content-Type: application/csv");
	//header("Content-Disposition: attachment; filename=\"$filename\"");
	
	
	
	if($report_type == "Deposit"){
		include("export_payment_deposit.php"); //info Deposit
	}
	else if($report_type == "Rental" || $report_type == "Water"){
		include("export_payment_rental_water.php"); //info Rental/Water
	}
	
	
	//exit;
	



?>
