$filename) { if (SAVE_NAMES_URLENCODED) $physicalFileName = urlencode($filename); else $physicalFileName = $filename; // security check - the file has to be in the same directory $physicalFileName = basename($physicalFileName); // security check - reserved files can not be deleted if (!isReserved($physicalFileName)) { if (unlink($physicalFileName)) $message = $message.$filename.DELETION_MESSAGE."
\n"; else $message = $message.DELETION_ERROR.' '.$filename."
\n"; } else { $message = $message.DELETION_ERROR.' '.$filename."
\n"; } } showMessage($message); } else { showMessage(NO_SELECTION_ERROR); } } // wrong password: show error message else { showMessage(PASSWORD_ERROR); } exit; } else if (($_GET['action'] == 'show') || ($_GET['action'] == 'download')) { if (SAVE_NAMES_URLENCODED) $physicalFileName = urlencode($_GET['file']); else $physicalFileName = $_GET['file']; // security check - the file has to be in the same directory $physicalFileName = basename($physicalFileName); // security check if (file_exists($physicalFileName) & (!isReserved($physicalFileName))) { // the MIME type $contentType = ''; // if ($_GET['action'] == 'show') try to set MIME type for content delivery from file name extension if ($_GET['action'] == 'show') { $extension = strtolower(substr($physicalFileName, strrpos($physicalFileName, '.'))); if (($extension == '.aif') || ($extension == '.aiff')) $contentType = 'Content-Type: audio/x-aiff'; else if (($extension == '.asc') || ($extension == '.txt')) $contentType = 'Content-Type: text/plain'; else if (($extension == '.asf') || ($extension == '.asx')) $contentType = 'Content-Type: video/x-ms-asf'; else if ($extension == '.avi') $contentType = 'Content-Type: video/x-msvideo'; else if ($extension == '.bmp') $contentType = 'Content-Type: image/bmp'; else if ($extension == '.css') $contentType = 'Content-Type: text/css'; else if ($extension == '.doc') $contentType = 'Content-Type: application/msword'; else if ($extension == '.gif') $contentType = 'Content-Type: image/gif'; else if (($extension == '.htm') || ($extension == '.html')) $contentType = 'Content-Type: text/html'; else if ($extension == '.ico') $contentType = 'Content-Type: image/x-icon'; else if (($extension == '.jpeg') || ($extension == '.jpg')) $contentType = 'Content-Type: image/jpeg'; else if ($extension == '.m3u') $contentType = 'Content-Type: audio/x-mpegurl'; else if (($extension == '.mid') || ($extension == '.midi')) $contentType = 'Content-Type: audio/midi'; else if (($extension == '.mp2') || ($extension == '.mp3')) $contentType = 'Content-Type: audio/mpeg'; else if (($extension == '.mpeg') || ($extension == '.mpg')) $contentType = 'Content-Type: video/mpeg'; else if (($extension == '.ogg') || ($extension == '.ogm')) $contentType = 'Content-Type: application/ogg'; else if ($extension == '.pdf') $contentType = 'Content-Type: application/pdf'; else if ($extension == '.png') $contentType = 'Content-Type: image/png'; else if ($extension == '.ppt') $contentType = 'Content-Type: application/vnd.ms-powerpoint'; else if (($extension == '.ps') || ($extension == '.eps')) $contentType = 'Content-Type: application/postscript'; else if (($extension == '.qt') || ($extension == '.mov')) $contentType = 'Content-Type: video/quicktime'; else if (($extension == '.ram') || ($extension == '.rm')) $contentType = 'Content-Type: audio/x-pn-realaudio'; else if ($extension == '.rtf') $contentType = 'Content-Type: text/rtf'; else if ($extension == '.svg') $contentType = 'Content-Type: image/svg+xml'; else if ($extension == '.swf') $contentType = 'Content-Type: application/x-shockwave-flash'; else if ($extension == '.tar') $contentType = 'Content-Type: application/x-tar'; else if (($extension == '.tif') || ($extension == '.tiff')) $contentType = 'Content-Type: image/tiff'; else if ($extension == '.vrml') $contentType = 'Content-Type: model/vrml'; else if ($extension == '.wav') $contentType = 'Content-Type: audio/x-wav'; else if ($extension == '.wma') $contentType = 'Content-Type: audio/x-ms-wma'; else if ($extension == '.wmv') $contentType = 'Content-Type: audio/x-ms-wmv'; else if ($extension == '.wvx') $contentType = 'Content-Type: audio/x-ms-wvx'; else if ($extension == '.xhtml') $contentType = 'Content-Type: application/xhtml+xml'; else if ($extension == '.xls') $contentType = 'Content-Type: application/x-msexcel'; else if ($extension == '.xml') $contentType = 'Content-Type: application/xml'; else if ($extension == '.zip') $contentType = 'Content-Type: application/zip'; } // if no valid Content-Type is available and SHOW_UNKNOWN_FILETYPES_IN_BROWSER set true // send the file with Content-Type if (($contentType == '') && (SHOW_UNKNOWN_FILETYPES_IN_BROWSER)) { $contentType = 'text/html'; } // if // ($_GET['action'] == 'show') and valid Content-Type available // or // SHOW_UNKNOWN_FILETYPES_IN_BROWSER == true // send file to be shown in browser if (($_GET['action'] == 'show') && ($contentType != '')) { // send file to the browser header($contentType); header('Content-Length: '.(string)filesize($physicalFileName)); readfile($physicalFileName); } else { // if // ($_GET['action'] == 'download') // or // file extension unknown and SHOW_UNKNOWN_FILETYPES_IN_BROWSER == false // send file for download header('Content-Type: application/octet-stream'); //header('Content-type: application/force-download'); header('Content-Disposition: attachment; filename="'.$_GET['file'].'"'); header('Content-Length: '.(string)filesize($physicalFileName)); header('Cache-Control: no-store, no-cache, must-revalidate'); header('Pragma: no-cache'); header('Expires: 0'); readfile($physicalFileName); } } else { showMessage(NO_FILE_ERROR); } exit; } else if ($_GET['action'] == 'info') { // TODO HIER GEHT'S WEITER - Umgebungsvariablen anzeigen showMessage(); } else if ($_GET['action'] == 'icon') { header('Content-type: image/gif'); echo pack('H*', '47494638396110001000F7000033333310346F0C3D7E153974143B7A153F7B0D417620507C4242454343474B4B4E4C4C5151'. '51515050565555555656575B5B5B55694D6161616666666A6A6A6B6B6B617566687D656D6D736F6F7471717174747477777C'. '7878787A7A7A7B7B7C7C7C7C7F7F7F57BD31778C7F10498317508A13548C13558F2D51833050832A658324659D2977AB506B'. '9675758476768A39879F3389BB318CBD7F93B23D90C33D94C6349DCA42A1D045ADDA50BDE85AC8F380808081818182828286'. '868684848E88888888888D8A8A8F8C8C8C8E8E8E80809392929298989899999A9C9C9C9E9E9E9F9F9F8799B79898B7A3A3A3'. 'A4A4A4A5A5A5A7A7A7AEAEAEB5B5B5B9B9B9BABABABFBFBF9FAEC5BEC8D8C0C0C0C3C3C3C4C4C4C7C7C7C9C9C9CACACACECE'. 'CECCCCDED0D0D0D1D1D1D3D3D3D8D8D8DADADADBDBDBDDDDDDDCDDDEDEDEDEDFDFDFCFD6E2E0E0E0E1E1E1E2E2E2E4E4E4E5'. 'E5E5E6E6E6E9E9E9EAEAEAEAEAEEECECECEFEFEFF0F0F0F2F2F2F4F4F4F5F5F5F6F6F6F7F7F7F8F8F8F9F9F9FAFAFAFCFCFC'. 'FDFDFDFEFEFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF'. 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF'. 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF'. 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF'. 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF'. 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF'. 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF'. 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF2C00000000100010000008E2000709C4326000'. '168108130E0C404040812B6A14225C1360069A16274C3039237110453967D4A4B041624DC739730496992123C68C101D059E'. '384102C78D1233636681C122878E152A602ACC72A70D99033568A848034849C4416ED854E95061CB1E0328E4F4F19225CC9F'. '4154C6A4E1D2464D9E4078E0F0A103464890384B924C211B270C19315A9070B830C2050828528EF47842450C11AA3C246010'. 'F180C21D2040BA3809D1E30382222E305888C0C0C3203B56766C1802250380262F1438D010C58C403F75BE1899F023410306'. '40ACBCD123E8751D40C0272C80E003F86E4100003B'); } else { ?> <?php echo PROGRAM_NAME; ?>
0) { ?>
"> ">
 <?php echo DOWNLOAD_LABEL; ?>
\n"; echo ''.PROGRAM_NAME.''; ?>