예제 #1
0
파일: ref.inc.php 프로젝트: nouphet/rata
 function make_thumb($o_file, $s_file, $width, $height, $quality)
 {
     return HypCommonFunc::make_thumb($o_file, $s_file, $width, $height, "1,95", FALSE, $quality);
 }
예제 #2
0
파일: tmb.php 프로젝트: hmoritake/xelfinder
                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);
}