Exemple #1
0
 function make_thumb($o_file, $s_file, $width, $height, $quality)
 {
     return HypCommonFunc::make_thumb($o_file, $s_file, $width, $height, "1,95", FALSE, $quality);
 }
Exemple #2
0
                switch ($_head) {
                    case 'R':
                        $file = XOOPS_ROOT_PATH . substr($file, 1);
                        break;
                    case 'T':
                        $file = XOOPS_TRUST_PATH . substr($file, 1);
                        break;
                }
            }
        }
        $out = $file;
        if (!is_file($file)) {
            $xelFinderMisc->exitOut(404);
        }
        $check = max($width, $height);
        if ($s < $check && function_exists('XC_CLASS_EXISTS') && XC_CLASS_EXISTS('HypCommonFunc')) {
            $s_file = $tmb . '_' . intval($s / $check * 100) . '.tmb';
            $out = HypCommonFunc::make_thumb($file, $s_file, $s, $s);
            if ($out !== $file) {
                $size = filesize($out);
                $mtime = filemtime($out);
                $mime = 'image';
            }
        }
        $xelFinderMisc->output($out, $mime, $size, $mtime);
    } else {
        $xelFinderMisc->exitOut(403);
    }
} else {
    $xelFinderMisc->exitOut(404);
}