// Add description as navigation point
addMenuDescription('admin', __FILE__);
-// Init variable
-$SEL = '0';
-
// Some sanity-check
if ((!isPostRequestElementSet('url')) || (!isPostRequestElementSet(('alternate')))) {
unsetPostRequestElement('ok');
}
-// Check selection count
-if (isPostRequestElementSet('sel')) $SEL = countPostSelection();
-
if (isFormSent()) {
// Fix older calls from add-new-banner-form
if (!isGetRequestElementSet('mode')) setRequestGetElement('mode', 'add');
$content = "<span class=\"admin_failed\">{--SETTINGS_NOT_SAVED--}</span>";
}
loadTemplate('admin_settings_saved', false, $content);
-} elseif (($SEL > 0) && (isPostRequestElementSet('edit'))) {
+} elseif ((countPostSelection() > 0) && (isPostRequestElementSet('edit'))) {
// Edit banner
$SW = 2; $OUT = '';
foreach (postRequestElement('sel') as $id => $sel) {
// Load main template
loadTemplate('admin_refbanner_edit', false, $OUT);
} else {
- if (($SEL > 0) && (isPostRequestElementSet('del'))) {
+ if ((countPostSelection() > 0) && (isPostRequestElementSet('del'))) {
// Delete banner
foreach (postRequestElement('sel') as $id => $sel) {
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_refbanner` WHERE `id`=%s LIMIT 1",