<?php
	ob_start();
	session_start();
?><?php


if($_SESSION['download_view'])
		{
			$view=$_SESSION['download_view'];
			
			$headingview=$_SESSION['heading_view'];
			$arr = explode("Timesheet",$headingview);
		
			$file_name ='Timesheet_Report.xls';
			
			header ("Expires: Mon, 28 Oct 2008 05:00:00 GMT");
			header ("Last-Modified: " . gmdate("D,d M Y H:i:s") . " GMT");
			header ("Cache-Control: no-cache, must-revalidate");
			header ("Pragma: no-cache");
			header ("Content-type: application/vnd.ms-excel");
			header ("Content-Disposition: attachment; filename=".$file_name );
			header ("Content-Description: Generated Report" );
			echo $headingview;
			echo "<br/><br/>";
			echo "<div class='employee-tabcells' id='employeetimesheet'>". $view."

</div><div class='clear-float'></div>";
			
			exit;	
		}	
		
		
		?>