tazwok annotate web/download.php @ rev 488
Change VERSION to 4.2.12
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Thu Apr 07 19:47:02 2011 +0200 (2011-04-07) |
parents | c627f671fbca |
children |
rev | line source |
---|---|
gokhlayeh@267 | 1 <?php |
gokhlayeh@267 | 2 $version=$_GET["version"]; |
gokhlayeh@267 | 3 if (file_exists("conf-$version.php")) { |
gokhlayeh@267 | 4 include("conf-$version.php"); |
gokhlayeh@267 | 5 } |
gokhlayeh@267 | 6 else { |
gokhlayeh@267 | 7 if (file_exists("conf.php")) { |
gokhlayeh@267 | 8 include("conf.php"); |
gokhlayeh@267 | 9 } |
gokhlayeh@267 | 10 } |
gokhlayeh@267 | 11 $package=$_GET["package"]; |
gokhlayeh@267 | 12 $filename=preg_replace('/.*\//', '', $package); |
gokhlayeh@267 | 13 if (file_exists("$version-$package")) { |
gokhlayeh@267 | 14 header("Content-disposition: attachment; filename=$filename"); |
gokhlayeh@267 | 15 readfile("$version-$package"); |
gokhlayeh@267 | 16 } |
gokhlayeh@267 | 17 else { |
paul@418 | 18 echo "Strange things happen..."; |
gokhlayeh@267 | 19 } |
paul@418 | 20 ?> |