options = $options; } function exec(&$Doc) { require_once 'class/ImageFS.php'; $ImageFS = new ImageFS(); $iconName = 'fckthumbs/'.urldecode($this->options['_restAlias']); $file = null; $width = 0; $height = 0; $force = false; extract(ImageDB::fromIconName($iconName)); $sourceFileName = str_replace('fckthumbs', 'fckfiles', $file); $umask = umask(); umask(0); mkdir(dirname($iconName), 0777, true); umask($umask); if ($width || $height){ $ImageFS->resizeEx($sourceFileName, $width, $height, $iconName, $force); } if (file_exists($iconName)) { list($width, $height, $type, $attr) = getimagesize($iconName); header('Content-type: ' . image_type_to_mime_type($type)); $handle = fopen($iconName, 'rb'); fpassthru($handle); exit; } else { return SiteMap::get404Item(urldecode(CURR_PAGE)); } } }