Execute("UPDATE " . $oostable['configuration'] . " SET configuration_value = '" . oos_db_input($configuration_value) . "', last_modified = now() WHERE configuration_id = '" . intval($cID) . "'"); if ($cID == 2 || $cID == 3) { require 'includes/classes/class_upload.php'; // Logo if ($cID == 2) { $options = array( 'image_versions' => array( // The empty image version key defines options for the original image. // Keep in mind: these image manipulations are inherited by all other image versions from this point onwards. // Also note that the property 'no_cache' is not inherited, since it's not a manipulation. '' => array( // Automatically rotate images based on EXIF meta data: 'auto_orient' => TRUE ), 'medium' => array( // 'auto_orient' => TRUE, // 'crop' => TRUE, // 'jpeg_quality' => 82, // 'no_cache' => TRUE, (there's a caching option, but this remembers thumbnail sizes from a previous action!) // 'strip' => TRUE, (this strips EXIF tags, such as geolocation) 'max_width' => 320, // either specify width, or set to 0. Then width is automatically adjusted - keeping aspect ratio to a specified max_height. 'max_height' => 150 // either specify height, or set to 0. Then height is automatically adjusted - keeping aspect ratio to a specified max_width. ), 'small' => array( // 'auto_orient' => TRUE, // 'crop' => TRUE, // 'jpeg_quality' => 82, // 'no_cache' => TRUE, (there's a caching option, but this remembers thumbnail sizes from a previous action!) // 'strip' => TRUE, (this strips EXIF tags, such as geolocation) 'max_width' => 128, // either specify width, or set to 0. Then width is automatically adjusted - keeping aspect ratio to a specified max_height. 'max_height' => 60 // either specify height, or set to 0. Then height is automatically adjusted - keeping aspect ratio to a specified max_width. ), ), ); $dir_fs_catalog_images = OOS_ABSOLUTE_PATH . OOS_IMAGES . 'logo/'; } elseif ($cID == 3) { // Site Icons $options = array( 'image_versions' => array( // The empty image version key defines options for the original image. // Keep in mind: these image manipulations are inherited by all other image versions from this point onwards. // Also note that the property 'no_cache' is not inherited, since it's not a manipulation. '' => array( // Automatically rotate images based on EXIF meta data: 'auto_orient' => TRUE ), '180x180' => array( // 'auto_orient' => TRUE, // 'crop' => TRUE, // 'no_cache' => TRUE, (there's a caching option, but this remembers thumbnail sizes from a previous action!) // 'strip' => TRUE, (this strips EXIF tags, such as geolocation) 'max_width' => 180, // either specify width, or set to 0. Then width is automatically adjusted - keeping aspect ratio to a specified max_height. 'max_height' => 180 // either specify height, or set to 0. Then height is automatically adjusted - keeping aspect ratio to a specified max_width. ), '144x144' => array( // 'auto_orient' => TRUE, // 'crop' => TRUE, // 'no_cache' => TRUE, (there's a caching option, but this remembers thumbnail sizes from a previous action!) // 'strip' => TRUE, (this strips EXIF tags, such as geolocation) 'max_width' => 144, // either specify width, or set to 0. Then width is automatically adjusted - keeping aspect ratio to a specified max_height. 'max_height' => 144 // either specify height, or set to 0. Then height is automatically adjusted - keeping aspect ratio to a specified max_width. ), '114x114' => array( // 'auto_orient' => TRUE, // 'crop' => TRUE, // 'no_cache' => TRUE, (there's a caching option, but this remembers thumbnail sizes from a previous action!) // 'strip' => TRUE, (this strips EXIF tags, such as geolocation) 'max_width' => 114, // either specify width, or set to 0. Then width is automatically adjusted - keeping aspect ratio to a specified max_height. 'max_height' => 114 // either specify height, or set to 0. Then height is automatically adjusted - keeping aspect ratio to a specified max_width. ), '72x72' => array( // 'auto_orient' => TRUE, // 'crop' => TRUE, // 'no_cache' => TRUE, (there's a caching option, but this remembers thumbnail sizes from a previous action!) // 'strip' => TRUE, (this strips EXIF tags, such as geolocation) 'max_width' => 72, // either specify width, or set to 0. Then width is automatically adjusted - keeping aspect ratio to a specified max_height. 'max_height' => 72 // either specify height, or set to 0. Then height is automatically adjusted - keeping aspect ratio to a specified max_width. ), '96x96' => array( // 'auto_orient' => TRUE, // 'crop' => TRUE, // 'no_cache' => TRUE, (there's a caching option, but this remembers thumbnail sizes from a previous action!) // 'strip' => TRUE, (this strips EXIF tags, such as geolocation) 'max_width' => 96, // either specify width, or set to 0. Then width is automatically adjusted - keeping aspect ratio to a specified max_height. 'max_height' => 96 // either specify height, or set to 0. Then height is automatically adjusted - keeping aspect ratio to a specified max_width. ), '32x32' => array( // 'auto_orient' => TRUE, // 'crop' => TRUE, // 'no_cache' => TRUE, (there's a caching option, but this remembers thumbnail sizes from a previous action!) // 'strip' => TRUE, (this strips EXIF tags, such as geolocation) 'max_width' => 32, // either specify width, or set to 0. Then width is automatically adjusted - keeping aspect ratio to a specified max_height. 'max_height' => 32 // either specify height, or set to 0. Then height is automatically adjusted - keeping aspect ratio to a specified max_width. ), ), ); $dir_fs_catalog_images = OOS_ABSOLUTE_PATH . OOS_IMAGES . 'ico/'; } $oLogo = new upload('site_image', $options); $oLogo->set_destination($dir_fs_catalog_images); if ($oLogo->parse() && oos_is_not_null($oLogo->filename)) { $configurationtable = $oostable['configuration']; $dbconn->Execute("UPDATE $configurationtable SET configuration_value = '" . oos_db_input($oLogo->filename) . "', last_modified = now() WHERE configuration_id = '" . intval($cID) . "'"); } } oos_redirect_admin(oos_href_link_admin($aContents['configuration'], 'gID=' . $_GET['gID'] . '&cID=' . $cID)); break; } } $sHeaderTitle = constant(strtoupper((int)$_GET['gID'] . '_TITLE')); define('HEADING_TITLE', $sHeaderTitle); require 'includes/header.php'; ?>
'' . constant(strtoupper($cInfo->configuration_key . '_TITLE')) . ''); if ($cID == 2 || $cID == 3) { $value_field = oos_draw_file_field('site_image') . ' |
|