r2610 - getNarrowObjectList(): bugfix, use provided filter name instead of hardcoded one
[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
d9731fc4
AD
10$pageno = 'file';
11$tabno = 'default';
12fixContext();
13if (!permitted())
14{
15 showError ("Permission denied", __FILE__);
16 die();
17}
18
e1ae3fb4
AD
19$file = getFile($_REQUEST['file_id']);
20if ($file != NULL)
21{
22 header("Content-Type: {$file['type']}");
23 header("Content-Length: {$file['size']}");
24 header("Content-Disposition: attachment; filename={$file['name']}");
25 echo $file['contents'];
26}
27?>