gestion des chemins de fichier sans types

This commit is contained in:
Michael RICOIS 2010-03-30 09:58:01 +00:00
parent af369ce2d8
commit 5871af0979

View File

@ -1,6 +1,7 @@
<?php <?php
$file = $_REQUEST['q']; $file = $_REQUEST['q'];
$type = $_REQUEST['type']; $type = $_REQUEST['type'];
if(!empty($type)){
switch($type){ switch($type){
case 'pdf': case 'pdf':
$content_type = 'application/pdf'; $content_type = 'application/pdf';
@ -26,6 +27,9 @@ switch($type){
break; break;
default: exit; break; default: exit; break;
} }
}else{
$path = PATH_DATA.'/';
}
$firephp->log($path.$file, 'path'); $firephp->log($path.$file, 'path');
if(file_exists($path.$file)) if(file_exists($path.$file))
{ {