Not Found

The requested URL /'.$_GET['q'].' was not found on this server.

'); } list($user,$id,$extension,$filename) = explode("/",$_GET['q']); $soubor = sprintf('/www/taboreni.cz/html/file/%s/%s.%s',$user,$id,$extension); switch ($extension){ case "docx": $ctype = "application/vnd.openxmlformats-officedocument.wordprocessingml.document"; break; case "pptx": $ctype = "application/vnd.openxmlformats-officedocument.presentationml.presentation"; break; case "xlsx": $ctype = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; break; case "xls": $ctype = "application/vnd.ms-excel"; break; case "doc": $ctype = "application/msword"; break; case "pdf": $ctype = "application/pdf"; break; case "odt": $ctype = "application/vnd.oasis.opendocument.text"; break; case "ods": $ctype = "application/vnd.oasis.opendocument.spreadsheet"; break; default: $ctype = "application/data"; break; } if(is_file($soubor)){ header('Content-type: '.$ctype); header('Content-disposition: attachment; filename=' . str_replace(" ","_",$filename.'.'.$extension)); readfile($soubor); file_put_contents('/www/taboreni.cz/html/file/log.txt',sprintf('%s %s %s %s %s',DATE("Y-m-d"),$_SERVER['REMOTE_ADDR'],$soubor,$filename,"\n"),FILE_APPEND); }else{ notfound(); } ?>