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') . '
' . $cInfo->configuration_value; } else { if ($cInfo->set_function) { eval('$value_field = ' . $cInfo->set_function . '"' . htmlspecialchars($cInfo->configuration_value) . '");'); } else { $value_field = oos_draw_input_field('configuration_value', $cInfo->configuration_value); } } $contents = array('form' => oos_draw_form('id', 'configuration', $aContents['configuration'], 'gID=' . $_GET['gID'] . '&cID=' . $cInfo->configuration_id . '&action=save', 'post', FALSE, 'enctype="multipart/form-data"')); $contents[] = array('text' => TEXT_INFO_EDIT_INTRO); $contents[] = array('text' => '
' . constant(strtoupper($cInfo->configuration_key . '_TITLE')) . '
' . constant(strtoupper($cInfo->configuration_key . '_DESC')) . '
' . $value_field); $contents[] = array('align' => 'center', 'text' => '
' . oos_submit_button(IMAGE_UPDATE) . ' ' . BUTTON_CANCEL . ''); break; default: if (isset($cInfo) && is_object($cInfo)) { $heading[] = array('text' => '' . constant(strtoupper($cInfo->configuration_key . '_TITLE')) . ''); $contents[] = array('align' => 'center', 'text' => '' . oos_button(BUTTON_EDIT) . ''); if ($cID == 2) { $contents[] = array('text' => '
' . oos_info_image('logo/medium/' . $cInfo->configuration_value, $cInfo->configuration_value)); } elseif ($cID == 3) { $contents[] = array('text' => '
' . oos_info_image('ico/180x180/' . $cInfo->configuration_value, $cInfo->configuration_value)); } $contents[] = array('text' => '
' . constant(strtoupper($cInfo->configuration_key . '_DESC'))); $contents[] = array('text' => '
' . TEXT_INFO_DATE_ADDED . ' ' . oos_date_short($cInfo->date_added)); if (oos_is_not_null($cInfo->last_modified)) $contents[] = array('text' => TEXT_INFO_LAST_MODIFIED . ' ' . oos_date_short($cInfo->last_modified)); } break; } if ( (oos_is_not_null($heading)) && (oos_is_not_null($contents)) ) { ?>
Execute("SELECT configuration_id, configuration_key, configuration_value, use_function FROM " . $oostable['configuration'] . " WHERE configuration_group_id = '" . intval($_GET['gID']) . "' ORDER BY sort_order"); while ($configuration = $configuration_result->fields) { if (oos_is_not_null($configuration['use_function'])) { $use_function = $configuration['use_function']; if (preg_match('/->/', $use_function)) { $class_method = explode('->', $use_function); if (!is_object(${$class_method[0]})) { include 'includes/classes/class_'. $class_method[0] . '.php'; ${$class_method[0]} = new $class_method[0](); } $cfgValue = oos_call_function($class_method[1], $configuration['configuration_value'], ${$class_method[0]}); } else { $cfgValue = oos_call_function($use_function, $configuration['configuration_value']); } } else { $cfgValue = $configuration['configuration_value']; } if ((!isset($_GET['cID']) || (isset($_GET['cID']) && ($_GET['cID'] == $configuration['configuration_id']))) && !isset($cInfo) && (substr($action, 0, 3) != 'new')) { $cfg_extra_result = $dbconn->Execute("SELECT configuration_key, date_added, last_modified, use_function, set_function FROM " . $oostable['configuration'] . " WHERE configuration_id = '" . $configuration['configuration_id'] . "'"); $cfg_extra = $cfg_extra_result->fields; $cInfo_array = array_merge($configuration, $cfg_extra); $cInfo = new objectInfo($cInfo_array); } if (isset($cInfo) && is_object($cInfo) && ($configuration['configuration_id'] == $cInfo->configuration_id) ) { echo ' ' . "\n"; } else { echo ' ' . "\n"; } ?> MoveNext(); } ?>
 
configuration_id) ) { echo ''; } else { echo ''; } ?> 
infoBox($heading, $contents); ?>