r2373 fix invalid link, rename vars for consistency
[racktables] / download.php
CommitLineData
e1ae3fb4
AD
1<?php
2require 'inc/init.php';
3
4if (empty($_REQUEST['file_id']))
5{
6 showError ("Invalid file specified", __FILE__);
7 die();
8}
9
10$file = getFile($_REQUEST['file_id']);
11if ($file != NULL)
12{
13 header("Content-Type: {$file['type']}");
14 header("Content-Length: {$file['size']}");
15 header("Content-Disposition: attachment; filename={$file['name']}");
16 echo $file['contents'];
17}
18?>