psychoticwolf%carolina.rr.com 010b56e12f Finish it before checking it in... Bug fixes for Approval Queue file downloader.
git-svn-id: svn://10.0.0.236/trunk@164731 18797224-902f-48f8-a5cc-f745e15eee43
2004-11-01 17:14:39 +00:00

23 lines
614 B
PHP
Executable File

<?php
require"core/sessionconfig.php";
require"../core/config.php";
if ($_SESSION["level"]=="admin" or $_SESSION["level"]=="editor") {
//Do Nothing, they're good. :-)
} else {
echo"<h1>Access Denied</h1>\n";
echo"You do not have access to the Approval Queue.";
exit;
}
$filename = basename($_SERVER["PATH_INFO"]);
$file = "$repositorypath/approval/$filename";
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Length: ' . filesize($file));
header('Content-Disposition: attachment; filename=' . basename($file));
readfile($file);
?>