$_REQUEST[Group::ID_REQUEST_NAME], 'name' => $_REQUEST['name'])); if (!$element->existsBinary ()) { header (true, true, 404); echo "file not found '".$element->fileName ()."'"; exit; } if (isset ($_REQUEST['filename']) && empty ($_REQUEST['open'])) { // force Download if (ini_get('zlib.output_compression')) { ini_set('zlib.output_compression', 'Off'); } header ("Pragma: public"); header ("Expires: 0"); header ("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header ("Cache-Control: private"); // IE6 bug fix header('Last-Modified: '.gmdate ('D, d M Y H:i:s').' GMT', true, 200); $type = isset ($_REQUEST['type']) ? $_REQUEST['type'] : ""; header ("Content-type: $type"); if (strstr ($_SERVER['HTTP_USER_AGENT'], "mac")) { header ("Content-Type: application/x-macbinary"); } else { header ("Content-Type: application/force-download"); } if (strstr ($_SERVER['HTTP_USER_AGENT'], "msie") && strstr ($_SERVER['HTTP_USER_AGENT'], "win")) { header( "Content-Disposition: filename=\"{$_REQUEST['filename']}\""); } else { header( "Content-Disposition: attachment; filename=\"{$_REQUEST['filename']}\""); } header ("Content-Description: File Transfer"); header ("Content-Length: " . $element->getBinarySize ()); } else { // direkte Ausgabe header ("Cache-control: public"); header('Last-Modified: '.gmdate ('D, d M Y H:i:s').' GMT', true, 200); $type = isset ($_REQUEST['type']) ? $_REQUEST['type'] : ""; header ("Content-type: $type"); if (isset ($_REQUEST['filename'])) { if (strstr ($_SERVER['HTTP_USER_AGENT'], "msie") && strstr ($_SERVER['HTTP_USER_AGENT'], "win")) { header( "Content-Disposition: filename=\"{$_REQUEST['filename']}\""); } else { header( "Content-Disposition: attachment; filename=\"{$_REQUEST['filename']}\""); } } } echo $element->getBinary (); ?>