_x_ * resized files are created when one changes the dimensions of an image * in the image manager selection dialog - the image is scaled when the * user clicks the ok button. */ $IMConfig['resized_prefix'] = '.resized'; // ------------------------------------------------------------------------- /** * Resized Directory * * Resized images may also be stored in a directory, except in safe mode. */ $IMConfig['resized_dir'] = '.resized'; // ------------------------------------------------------------------------- /** * Allow New Directories * * * Possible values: true, false * * TRUE - Allow the user to create new sub-directories in the * $IMConfig['base_dir']. * * FALSE - No directory creation. * * NOTE: If $IMConfig['safe_mode'] = true, this parameter * is ignored, you can not create directories * * DEFAULT: for demo purposes we turn this off. */ $IMConfig['allow_new_dir'] = true; // ------------------------------------------------------------------------- /** * Allow Uploads * * Possible values: true, false * * TRUE - Allow the user to upload files. * * FALSE - No uploading allowed. * * DEFAULT: for demo purposes we turn this off. */ $IMConfig['allow_upload'] = true; // ------------------------------------------------------------------------- /** * Validate Images * * Possible values: true, false * * TRUE - If set to true, uploaded files will be validated based on the * function getImageSize, if we can get the image dimensions then * I guess this should be a valid image. Otherwise the file will be rejected. * * FALSE - All uploaded files will be processed. * * NOTE: If uploading is not allowed, this parameter is ignored. */ $IMConfig['validate_images'] = true; // ------------------------------------------------------------------------- /** * Default Thumnail. * * The default thumbnail if the thumbnails can not be created, either * due to error or bad image file. */ $IMConfig['default_thumbnail'] = 'img/default.gif'; // ------------------------------------------------------------------------- /** * Thumbnail dimensions. */ $IMConfig['thumbnail_width'] = 96; $IMConfig['thumbnail_height'] = 96; // ------------------------------------------------------------------------- /** * Editor Temporary File Prefix. * * Image Editor temporary filename prefix. */ $IMConfig['tmp_prefix'] = '.editor_'; $IMConfig['ViewMode'] = 'thumbs'; //////////////////////////////////////////////////////////////////////////////// // ================== END OF CONFIGURATION ======================= // //////////////////////////////////////////////////////////////////////////////// // If config specified from front end, merge it if(isset($_REQUEST['backend_config'])) { // Config specified from front end, check that it's valid session_start(); $secret = $_SESSION[$_REQUEST['backend_config_secret_key_location']]; if($_REQUEST['backend_config_hash'] !== sha1($_REQUEST['backend_config'] . $secret)) { die("Backend security error."); } $to_merge = unserialize($_REQUEST['backend_config']); if(!is_array($to_merge)) { die("Backend config syntax error."); } $IMConfig = array_merge($IMConfig, $to_merge); $IMConfig['backend_url'] .= "backend_config=" . rawurlencode($_REQUEST['backend_config']) . '&'; $IMConfig['backend_url'] .= "backend_config_hash=" . rawurlencode($_REQUEST['backend_config_hash']) . '&'; $IMConfig['backend_url'] .= "backend_config_secret_key_location=" . rawurlencode($_REQUEST['backend_config_secret_key_location']) . '&'; } define('IMAGE_CLASS', $IMConfig['IMAGE_CLASS']); define('IMAGE_TRANSFORM_LIB_PATH', $IMConfig['IMAGE_TRANSFORM_LIB_PATH']); define( "IM_CONFIG_LOADED", "yes" ); // bring in the debugging library include_once( "ddt.php" ); // uncomment to send debug messages to a local file // _setDebugLog( "/tmp/debug_log.txt" ); // turn debugging on everywhere. // _ddtOn(); // END ?>