<?
# How to download a file whose name and signal to which directory the file
# is in are passed by a URL or SSI command, or by another way?

$file = $_GET['f'];
$dir = $_GET['d']; 
$which_directory = stripslashes(trim($dir));
$file = stripslashes(trim($file));

if (empty($file))
	exit;
if ($file[0] == ".")
	exit;
if ($which_directory == "prop")
	$path = "/home/abu-jeib/proposals/";
else if ($which_directory == "final")
	$path = "/home/abu-jeib/proposals/final_proposals/";
else
	exit;
$file = $path.$file;

echo "<pre>\n";
@readfile($file);
echo "</pre>\n";

?>
