resize($_GET['width'],$_GET['height']); $thumb->show(); $thumb->destruct(); exit; */ if (isset($_GET['filename'])) { //require_once 'config.php'; require_once 'classes/thumb/ThumbLib.inc.php'; $str = explode("|", $_GET['filename']); $file = $str[0]; $str[2] = "R"; trim($file) == "" ? $file = "img.jpg" : NULL; $sizes = explode("x", $str[1]); $w = (int)$_GET['width']; $h = (int)$_GET['height']; $options = array('resizeUp' => true, 'jpegQuality' =>90); $mediaDir = $_SERVER['DOCUMENT_ROOT']."/images/"; $thumb = PhpThumbFactory::create($mediaDir . $file); $str[2] == "R" ? $thumb->resize($w, $h) : $thumb->adaptiveResize($w, $h); $thumb->show(); exit(); } ?>