ACC SHELL
<?
$filename = $_REQUEST['filename'];
//$filename = urldecode(iconv("Windows-1250", "UTF-8", $filename));
/*
if( file_exists("./spaw2/uploads/files".$filename)) echo"sss";;
echo"ds";
die();
*/
$pripona = substr($filename, strrpos($filename, "."));
switch ($pripona){
case "jpg" :
header ( "Content-type: image/jpg" );
break;
case "png" :
header ( "Content-type: image/png" );
break;
case "pdf" :
header ( "Content-type: application/x-pdf" );
break;
case "docx" :
header ( "Content-type: application/vnd.openxmlformats-officedocument.wordprocessingml.document" );
break;
case "doc" :
header ( "Content-type: application/msword" );
break;
case "pdf" :
header ( "Content-type: application/pdf" );
break;
case "txt" :
header ( "Content-type: text/plain" );
break;
case "html" :
header ( "Content-type: text/html" );
break;
}
//Header to tell browser it's getting an mp3:
//header("Content-type: application/pdf");
### Header to tell the browser to download it:
header("Content-Disposition: attachment; filename=".$filename);
//fpassthru("./spaw2/uploads/files".$filename);
readfile("./spaw2/uploads/files".$filename);
?>
ACC SHELL 2018