diff options
| author | moehm | 2014-03-21 18:40:44 +0100 |
|---|---|---|
| committer | moehm | 2014-03-21 18:40:44 +0100 |
| commit | cd7aeaef26bf05e42e789da6bc4a97118c40d616 (patch) | |
| tree | 1a253657f8ee29fb09dd9b9f03251b0ee6eae41a /www/index.php | |
| parent | 08e945b89d649759f40916877f40044657314d9a (diff) | |
| download | files.iamfabulous.de-cd7aeaef26bf05e42e789da6bc4a97118c40d616.tar.gz | |
The index.php starts the download. Also extra function to print empty folders.
Diffstat (limited to 'www/index.php')
| -rwxr-xr-x | www/index.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/www/index.php b/www/index.php index 88f11f8..1bfb993 100755 --- a/www/index.php +++ b/www/index.php @@ -89,11 +89,17 @@ if(empty($_GET)){ } } else { - /* shows the user content, main function */ + /* shows the user content, downloads files, main function */ if(rewrite($db)){ - $content = collect_content($db, $_GET["name"], $_GET["folder"]); - print_browser($content); + if(!check_if_file($db, $_GET["name"], $_GET["folder"])){ + $content = collect_content($db, $_GET["name"], $_GET["folder"]); + print_browser($content); + } else { + start_file_download($_GET["name"], $_GET["folder"]); + } + } else { + get_404($_GET["name"], $_GET["name"]); } } } |
