<?php session_start();
	$laporan = (isset($_POST["laporan"]) ? $_POST["laporan"] : null);
	$fileName = str_replace(".php", ".xls", $laporan);
//	$laporan  = $fileName."_report";
//	$fileName = $laporan.".xlsx";
//	$laporan  = $laporan.".php";
	
	// Redirect output to a client’s web browser (Excel5)
    header('Content-Type: application/vnd.ms-excel');
    header('Content-Disposition: attachment;filename='.$fileName);
    header('Cache-Control: max-age=0');

    // If you're serving to IE 9, then the following may be needed
    header('Cache-Control: max-age=1');

    // If you're serving to IE over SSL, then the following may be needed
    header ('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past
    header ('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); // always modified
    header ('Cache-Control: cache, must-revalidate'); // HTTP/1.1
    header ('Pragma: public'); // HTTP/1.0

    //$_REQUEST['datatodisplay']; 	
	header("Content-type: application/vnd-ms-excel");
	header("Content-Disposition: attachment; filename=".$fileName);

	include_once ("../../functions/init.php"); 
	include_once ($thisUrl."adm1n/functions/access.php");
	include_once ($thisUrl."adm1n/functions/koneksi.php");
	include_once ($thisUrl."functions/indonesian_date.php");
	include_once ($thisUrl."adm1n/functions/getUrl.php");
	include_once ($thisUrl."adm1n/functions/php_functions.php");
	include_once ($thisUrl."adm1n/functions/request_data.php");

	
	$date_start = (isset($_POST["data_start"]) ? $_POST["data_start"] : null);
	$date_end = (isset($_POST["data_end"]) ? $_POST["data_end"] : null);
	$remark = (isset($_POST["remark"]) ? $_POST["remark"] : null); 
	
	
	//echo "date_start ".$date_start;
	//phpinfo();
	include ($laporan);
	?>