* relative to the base_dir given in config.inc.php * @author $Author$ * @version $Id$ * @package ImageManager */ require_once 'config.inc.php'; require_once 'Classes/ImageManager.php'; require_once 'Classes/Thumbnail.php'; //check for img parameter in the url if (!isset($_GET['img'])) { exit; } $manager = new ImageManager($IMConfig); //get the image and the full path to the image $image = rawurldecode($_GET['img']); $fullpath = Files::makeFile($manager->getBaseDir(), $image); //not a file, so exit if (!is_file($fullpath)) { exit; } $imgInfo = @getImageSize($fullpath); //Not an image, send default thumbnail if (!is_array($imgInfo)) { //show the default image, otherwise we quit! $default = $manager->getDefaultThumb(); if ($default) { header('Location: ' . $default); exit; } } //if the image is less than the thumbnail dimensions