]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-edit_emails.php
Filters for configurable userid exclusion added:
[mailer.git] / inc / modules / admin / what-edit_emails.php
index 887262cb61f4c47886aeab6332f3e82472f7ba3b..9e42da8f8846a28cadab4936624ed8ada44808ae 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -50,13 +50,17 @@ if ((isFormSent()) && (!isPostRequestElementSet('id'))) {
 // Form sent or anything else? ;-)
 if ((isFormSent()) && (isPostRequestElementSet('mid'))) {
        // Make mail editable...
-       $result = SQL_QUERY_ESC("SELECT
-       `id`,`sender` AS `userid`,`subject`,`text`,`url`
+       $result = SQL_QUERY_ESC('SELECT
+       `id`,
+       `sender` AS `userid`,
+       `subject`,
+       `text`,
+       `url`
 FROM
        `{?_MYSQL_PREFIX?}_pool`
 WHERE
        `id`=%s
-LIMIT 1",
+LIMIT 1',
                array(bigintval(postRequestElement('mid'))), __FILE__, __LINE__);
 
        // Fetch row
@@ -66,16 +70,20 @@ LIMIT 1",
        SQL_FREERESULT($result);
 
        // Load template
-       loadTemplate('admin_edit_email', false, $content);
+       loadTemplate('admin_edit_email', FALSE, $content);
 } elseif (isGetRequestElementSet('mid')) {
        // Make also this email editable
-       $result = SQL_QUERY_ESC("SELECT
-       `id`,`sender` AS `userid`,`subject`,`text`,`url`
+       $result = SQL_QUERY_ESC('SELECT
+       `id`,
+       `sender` AS `userid`,
+       `subject`,
+       `text`,
+       `url`
 FROM
        `{?_MYSQL_PREFIX?}_pool`
 WHERE
        `id`=%s
-LIMIT 1",
+LIMIT 1',
                array(bigintval(getRequestElement('mid'))), __FILE__, __LINE__);
 
        // Fetch row
@@ -85,16 +93,19 @@ LIMIT 1",
        SQL_FREERESULT($result);
 
        // Load template
-       loadTemplate('admin_edit_email', false, $content);
+       loadTemplate('admin_edit_email', FALSE, $content);
 } elseif (isGetRequestElementSet('bid')) {
                // Make also this email editable
-               $result = SQL_QUERY_ESC("SELECT
-       `id`,`subject`,`text`,`url`
+               $result = SQL_QUERY_ESC('SELECT
+       `id`,
+       `subject`,
+       `text`,
+       `url`
 FROM
        `{?_MYSQL_PREFIX?}_bonus`
 WHERE
        `id`=%s
-LIMIT 1",
+LIMIT 1',
                array(bigintval(getRequestElement('bid'))), __FILE__, __LINE__);
 
        // Fetch row
@@ -104,8 +115,8 @@ LIMIT 1",
        SQL_FREERESULT($result);
 
        // Load template
-       loadTemplate('admin_edit_bonus_email', false, $content);
-} elseif (isFormSent('save')) {
+       loadTemplate('admin_edit_bonus_email', FALSE, $content);
+} elseif (isFormSent('do_edit')) {
        // Save changes
        if (isPostRequestElementSet('mid')) {
                // Update pool
@@ -163,7 +174,11 @@ LIMIT 1",
 } else {
        // Query the pool
        $result = SQL_QUERY('SELECT
-       `id`,`sender` AS `userid`,`subject`,`payment_id`,`cat_id`
+       `id`,
+       `sender` AS `userid`,
+       `subject`,
+       `payment_id`,
+       `cat_id`
 FROM
        `{?_MYSQL_PREFIX?}_pool`
 ORDER BY
@@ -175,14 +190,14 @@ ORDER BY
                $OUT = '';
                while ($content = SQL_FETCHARRAY($result)) {
                        // Load row template and switch colors
-                       $OUT .= loadTemplate('admin_edit_email_row', true, $content);
+                       $OUT .= loadTemplate('admin_edit_email_row', TRUE, $content);
                } // END - while
 
                // Free memory
                SQL_FREERESULT($result);
 
                // Load email template
-               loadTemplate('admin_edit_email_select', false, $OUT);
+               loadTemplate('admin_edit_email_select', FALSE, $OUT);
        } else {
                // No mail orders left in pool
                displayMessage('{--ADMIN_NO_MAILS_IN_POOL--}');