checkProtection(4); function force_download($dir,$file,$name="") { if ($name==""){ $name=$file; } if ((isset($file))&&(file_exists($dir."/".$file))) { header("Content-type: application/force-download"); header("Content-Disposition: inline; filename=".$name); header("Content-Transfer-Encoding: Binary"); header("Content-length: ".filesize($dir."/".$file)); header("Content-Type: application/octet-stream"); header("Content-Disposition: attachment; filename=".$name); readfile("$dir/$file"); } else { echo "No file selected"; } } force_download($_SESSION[$_SESSION["SCode"]]["rootPath"].$Utility->getPar("dir",""),$Utility->getPar("file",""),$Utility->getPar("name","")); ?>