tazwok view web/download.php @ rev 484

Change VERSION to 4.2.11
author Antoine Bodin <gokhlayeh@slitaz.org>
date Thu Apr 07 19:10:44 2011 +0200 (2011-04-07)
parents c627f671fbca
children
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 happen...";
19 }
20 ?>