]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-refbanner.php
New functions introduced, several rewrites:
[mailer.git] / inc / modules / admin / what-refbanner.php
index a157c80fd4bc1232abb7992a50a43261a81cd376..e9d142bede30f9cda41b8cdd2e2b7eabaf193bae 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 10/19/2003 *
- * ===============                              Last change: 07/13/2004 *
+ * Mailer v0.2.1-FINAL                                Start: 10/19/2003 *
+ * ===================                          Last change: 07/13/2004 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : what-refbanner.php                               *
@@ -44,17 +44,11 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 // 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');
@@ -98,7 +92,7 @@ VALUES ('%s','%s','%s')",
                $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) {
@@ -125,7 +119,7 @@ VALUES ('%s','%s','%s')",
        // 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",