20 defined(
'XOOPS_ROOT_PATH') or die('Restricted access');
42 function XoopsDownloader()
53 function _header($filename)
55 if (function_exists(
'mb_http_output')) {
56 mb_http_output(
'pass');
58 header(
'Content-Type: ' . $this->mimetype);
59 if (preg_match(
"/MSIE ([0-9]\.[0-9]{1,2})/",
$_SERVER[
'HTTP_USER_AGENT'])) {
60 header(
'Content-Disposition: attachment; filename="' . $filename .
'"');
62 header(
'Cache-Control: must-revalidate, post-check=0, pre-check=0');
63 header(
'Pragma: public');
65 header(
'Content-Disposition: attachment; filename="' . $filename .
'"');
67 header(
'Pragma: no-cache');
77 function addFile($filepath, $newfilename = null)
88 function addBinaryFile($filepath, $newfilename = null)
100 function addFileData(&$data, $filename,
$time = 0)
112 function addBinaryFileData(&$data, $filename,
$time = 0)
123 function download($name, $gzip =
true)