mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-02 07:05:24 +00:00
20 lines
611 B
PHP
Executable File
20 lines
611 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);
|
|
?>
|