<?php
$fname = '../../orders/'.$_GET['f'];
if(!file_exists($fname))
	die();
	
header('Content-disposition: attachment; filename='.basename($fname));

if(strpos($fname,".pdf") > 0)
	header('Content-type: application/pdf');
else if(strpos($fname,".txt") > 0)
	header('Content-type: text/plain');
else if(strpos($fname,".xls") > 0)
	header("Content-Type: application/vnd.ms-excel; charset=utf-8");
else
	die();

readfile($fname);
?>