function js_success($resultFile) { echo '\'' . $resultFile . '\''; exit; } //check for img parameter in the url if (!isset($_GET['img']) || !isset($_GET['width']) || !isset($_GET['height'])) { js_fail('Missing parameter.'); } if ($IMConfig['resize_files'] == FALSE) { js_success($_GET['img']); } $manager = new RyuXFileManager($IMConfig); //get the image and the full path to the image $image = $_GET['img']; $fullpath = Files::makeFile($manager->getImagesDir(), $image); //not a file, so exit if (!is_file($fullpath)) { js_fail("File {$fullpath} does not exist."); } $imgInfo = @getImageSize($fullpath); //Not an image, bail out. if (!is_array($imgInfo)) { js_fail("File {$fullpath} is not an image."); } if (!isset($_GET['to'])) { $resized = $manager->getResizedName($fullpath, $_GET['width'], $_GET['height']); $_GET['to'] = $manager->getResizedName($image, $_GET['width'], $_GET['height'], FALSE); } else { $resized = Files::makeFile($manager->getImagesDir(), $_GET['to']); }
<td colspan="5"><input type="text" id="f_alt" class="largelWidth" value="" /></td> </tr> <?php } if ($insertMode == 'link' || $IMConfig['images_enable_title']) { ?> <tr> <td style="text-align: right;"><label for="f_title">Title (tooltip)</label></td> <td colspan="5"><input type="text" id="f_title" class="largelWidth" value="" /></td> </tr> <?php } ?> <tr> <?php if (!empty($IMConfig['max_foldersize_mb']) && Files::dirSize($manager->getImagesDir()) > $IMConfig['max_foldersize_mb'] * 1048576) { ?> <td colspan="6" style="text-align: right;">Maximum folder size limit reached. Upload disabled.</td> <?php } else { if ($IMConfig['allow_upload']) { ?> <td style="text-align: right;"><label for="upload">Upload</label></td> <td colspan="5"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td><input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $max = ($insertMode == 'image' ? $IMConfig['max_filesize_kb_image'] : $IMConfig['max_filesize_kb_link']) * 1024; ?> " /> <input type="file" name="upload" id="upload" /></td>
$insertMode = $_REQUEST['mode']; } if (!isset($insertMode)) { $insertMode = "image"; } require_once 'config.inc.php'; require_once 'Classes/RyuXFileManager.php'; require_once '../ImageManager/Classes/Thumbnail.php'; //check for img parameter in the url if (!isset($_GET['img'])) { exit; } $manager = new RyuXFileManager($IMConfig, $insertMode); //get the image and the full path to the image $image = rawurldecode($_GET['img']); $fullpath = Files::makeFile($manager->getImagesDir(), $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