Example #1
0
 * Version: Updated on 08-01-2005 by Afru
 * Version: Updated on 04-07-2006 by Krzysztof Kotowicz
 * Version: Updated on 29-10-2006 by Raimund Meyer
 * Version: Updated on 20-01-2008 by Raimund Meyer
 * Package: RyuXFileManager (EFM 1.4)
 * http://www.afrusoft.com/htmlarea
 */
if (isset($_REQUEST['mode'])) {
    $insertMode = $_REQUEST['mode'];
}
if (!isset($insertMode)) {
    $insertMode = "image";
}
require_once 'config.inc.php';
require_once 'Classes/RyuXFileManager.php';
$manager = new RyuXFileManager($IMConfig);
$dirs = $manager->getDirs();
// calculate number of table rows to span for the preview cell
$num_rows = 4;
// filename & upload & disk info message & width+margin
if ($insertMode == 'image') {
    if ($IMConfig['images_enable_styling'] === false) {
        $hidden_fields[] = 'f_margin';
        $hidden_fields[] = 'f_padding';
        $hidden_fields[] = 'f_border';
        $hidden_fields[] = 'f_backgroundColor';
        $hidden_fields[] = 'f_borderColor';
        $num_rows += 2;
    } else {
        if ($IMConfig['use_color_pickers'] === false) {
            $hidden_fields[] = 'f_backgroundColor';
Example #2
0
    echo 'alert(\'ha ' . $message . '\'); false';
    exit;
}
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);
Example #3
0
 * Version: Updated on 20-01-2008 by Raimund Meyer
 * Package: RyuXFileManager (EFM 1.4)
 * http://www.afrusoft.com/htmlarea
 */
if (isset($_REQUEST['mode'])) {
    $insertMode = $_REQUEST['mode'];
}
if (!isset($insertMode)) {
    $insertMode = "image";
}
require_once 'config.inc.php';
require_once 'Classes/RyuXFileManager.php';
$backend_url_enc = htmlspecialchars($IMConfig['backend_url']);
//default path is /
$relative = '/';
$manager = new RyuXFileManager($IMConfig, $insertMode);
//process any file uploads
$uploadStatus = $manager->processUploads();
//process any file renames
$renameStatus = $manager->processRenames();
//process paste
$pasteStatus = isset($_GET['paste']) ? $manager->processPaste() : false;
$refreshFile = $IMConfig['allow_delete'] && $manager->deleteFiles() ? true : false;
$refreshDir = false;
//process any directory functions
if ($IMConfig['allow_delete'] && $manager->deleteDirs() || $manager->processNewDir() || $pasteStatus || $renameStatus) {
    $refreshDir = true;
}
$diskInfo = $manager->getDiskInfo();
//check for any sub-directory request
//check that the requested sub-directory exists
Example #4
0
 * http://www.afrusoft.com/htmlarea
 */
if (isset($_REQUEST['mode'])) {
    $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;