From 1dad265bebdbc8a51d739dce7a757befe135a233 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Wed, 22 Sep 2004 09:03:24 +0000 Subject: [PATCH] =?UTF-8?q?Modification=20pour=20g=E9rer=20plusieurs=20typ?= =?UTF-8?q?es=20de=20fichiers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/document.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/htdocs/document.php b/htdocs/document.php index 64c811e4cb1..e0c71755f52 100644 --- a/htdocs/document.php +++ b/htdocs/document.php @@ -25,7 +25,14 @@ $original_file = urldecode($_GET["file"]); $filename = basename ($original_file); -header('Content-type: application/pdf'); +if ($_GET["type"]) +{ + header('Content-type: '.$_GET["type"]); +} +else +{ + header('Content-type: application/pdf'); +} header('Content-Disposition: attachment; filename="'.$filename.'"');