1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| if (empty($_GET['fich'])) {
$fich = '';
} else {
$fich = $_GET['fich'];
}
if ($fich == 'ag08') {
$filename = '08-ag08.pdf';
} elseif ($fich == 'foretnoire') {
$filename = '08-foret_noire.pdf';
} elseif ($fich == 'noirblanc') {
$filename = '08-foret_noire.pdf';
} elseif ($fich == 'paques08') {
$filename = '08-paques08.pdf';
} else {
header('Location: 08-programme08.php');
exit;
}
$chemin = "../../ress/telechar/prog/$filename";
header("Content-type: application/force-download");
header("Content-Disposition: attachment; filename=$filename");
readfile("$chemin"); |