tazwok annotate web/download.php @ rev 407
Improve chroot configuration
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Fri Mar 04 06:23:07 2011 +0100 (2011-03-04) |
parents | |
children | eb6a2f0a9faa |
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 { |
gokhlayeh@267 | 18 echo "Strange things happens..."; |
gokhlayeh@267 | 19 } |
gokhlayeh@267 | 20 ?> |