$settings = array(); foreach ($_POST as $key => $value) { if (substr($key, 0, 5) == 'post-') { $settings[substr($key, 5)] = $value; } } if (i18n_gallery_settings_save($settings)) { $msg = i18n_r('i18n_gallery/SAVE_SETTINGS_SUCCESS'); $msg .= ' <a href="load.php?id=i18n_gallery&configure&undo">' . i18n_r('UNDO') . '</a>'; $success = true; $settings = i18n_gallery_settings(true); } else { $msg = i18n_r('i18n_gallery/SAVE_SETTINGS_FAILURE'); } } else { $settings = i18n_gallery_settings(true); } } } $atw = intval(@$settings['adminthumbwidth']) > 0 ? intval($settings['adminthumbwidth']) : I18N_GALLERY_DEFAULT_THUMB_WIDTH; $ath = intval(@$settings['adminthumbheight']) > 0 ? intval($settings['adminthumbheight']) : I18N_GALLERY_DEFAULT_THUMB_HEIGHT; ?> <form method="post" class="largeform" id="settingsForm" action="load.php?id=i18n_gallery&configure" accept-charset="utf-8"> <h3><?php i18n('i18n_gallery/SETTINGS_HEADER'); ?> </h3> <p><?php i18n('i18n_gallery/SETTINGS_DESCR'); ?> </p>
$msg .= ' <a href="load.php?id=i18n_gallery&edit&name=' . $name . '&new=' . @$_POST['post-name'] . '&undo">' . i18n_r('UNDO') . '</a>'; } $success = true; $gallery = return_i18n_gallery(@$_POST['post-name']); // reread $name = @$_POST['post-name']; } else { $msg = i18n_r('i18n_gallery/SAVE_FAILURE'); } } } else { $gallery = return_i18n_gallery(@$_GET['name']); } } } $settings = i18n_gallery_settings(); $w = intval(@$settings['adminthumbwidth']) > 0 ? intval($settings['adminthumbwidth']) : I18N_GALLERY_DEFAULT_THUMB_WIDTH; $h = intval(@$settings['adminthumbheight']) > 0 ? intval($settings['adminthumbheight']) : I18N_GALLERY_DEFAULT_THUMB_HEIGHT; $viewlink = function_exists('find_i18n_url') ? find_i18n_url('index', null) : find_url('index', null); $viewlink .= (strpos($viewlink, '?') === false ? '?' : '&') . 'name=' . $name . '&preview-gallery'; $plugins = i18n_gallery_plugins(); $plugins = subval_sort($plugins, 'name'); // default gallery type if (!@$gallery['type']) { $gallery['type'] = @$settings['type'] ? $settings['type'] : I18N_GALLERY_DEFAULT_TYPE; } ?> <h3 class="floated" style="float:left"><?php $name ? i18n('i18n_gallery/EDIT_HEADER') : i18n('i18n_gallery/CREATE_HEADER'); ?> </h3>