tazwok view web/download.php @ rev 358

Fix branch transplantation errors
author Antoine Bodin <gokhlayeh@slitaz.org>
date Thu Feb 24 03:56:54 2011 +0100 (2011-02-24)
parents
children eb6a2f0a9faa
line source
1 <?php
2 $version=$_GET["version"];
3 if (file_exists("conf-$version.php")) {
4 include("conf-$version.php");
5 }
6 else {
7 if (file_exists("conf.php")) {
8 include("conf.php");
9 }
10 }
11 $package=$_GET["package"];
12 $filename=preg_replace('/.*\//', '', $package);
13 if (file_exists("$version-$package")) {
14 header("Content-disposition: attachment; filename=$filename");
15 readfile("$version-$package");
16 }
17 else {
18 echo "Strange things happens...";
19 }
20 ?>