]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-del_email.php
Code style changed, ext-user continued:
[mailer.git] / inc / modules / admin / what-del_email.php
index 0b514a929483b1353d04c5085d7902e7d41b0ca5..6afb0abc4fd894c53991e31e8b4fc57fc6799ca2 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 *
@@ -48,7 +48,7 @@ $count = '0';
 
 if (isGetRequestElementSet('mid')) {
        // Load email data
-       $result = SQL_QUERY_ESC("SELECT `id`,`sender`,`subject`,`url`,`timestamp`,`cat_id`,`payment_id` FROM `{?_MYSQL_PREFIX?}_pool` WHERE `id`=%s LIMIT 1",
+       $result = SQL_QUERY_ESC("SELECT `id`, `sender`, `subject`, `url`, `timestamp`, `cat_id`, `payment_id` FROM `{?_MYSQL_PREFIX?}_pool` WHERE `id`=%s LIMIT 1",
                array(bigintval(getRequestElement('mid'))), __FILE__, __LINE__);
 
        // Delete mail only once
@@ -57,14 +57,14 @@ if (isGetRequestElementSet('mid')) {
                $content = SQL_FETCHARRAY($result);
 
                // Get points we shall pay back per mail
-               $content['price'] = getPaymentPoints($content['payment_id'], 'price');
+               $content['price'] = getPaymentData($content['payment_id'], 'price');
                // @TODO Unused: cat_id, payment_id
 
                // Prepare data for the template
                $content['timestamp'] = generateDateTime($content['timestamp'], 0);
 
                // Load template
-               loadTemplate('admin_delete_email_normal', false, $content);
+               loadTemplate('admin_delete_email_normal', FALSE, $content);
 
                // Load email template and send the email away
                $message_user = loadEmailTemplate('member_order_deleted', $content, $content['sender']);
@@ -88,7 +88,7 @@ LIMIT 1",
                        list($stats_id) = SQL_FETCHROW($result_pool);
 
                        // Get all user links
-                       $links = countSumTotalData($stats_id, 'user_links', 'userid', 'stats_id', true);
+                       $links = countSumTotalData($stats_id, 'user_links', 'userid', 'stats_id', TRUE);
 
                        // Reset sent mails for recipient(s)
                        reduceRecipientReceivedMails('stats_id', getRequestElement('mid'), $links);
@@ -109,8 +109,8 @@ LIMIT 1",
                                } // END - if
 
                                // Pay back points
-                               initReferalSystem();
-                               addPointsThroughReferalSystem('mail_deleted', $content['sender'], $totalPoints);
+                               initReferralSystem();
+                               addPointsThroughReferralSystem('mail_deleted', $content['sender'], $totalPoints);
 
                                // Output message
                                if (getConfig('repay_deleted_mails') == 'REPAY') {
@@ -160,7 +160,7 @@ LIMIT 1",
        displayMessage('{--ADMIN_USER_STATS_REMOVED--}');
 } elseif ((isGetRequestElementSet('bid')) && (isExtensionActive('bonus'))) {
        // Load data from bonus mail
-       $result = SQL_QUERY_ESC("SELECT `id`,`subject`,`url`,`timestamp`,`mails_sent` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
+       $result = SQL_QUERY_ESC("SELECT `id`, `subject`, `url`, `timestamp`, `mails_sent` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
                array(bigintval(getRequestElement('bid'))), __FILE__, __LINE__);
 
        // Delete mail only once
@@ -187,7 +187,7 @@ LIMIT 1",
                $content['count']     = $count;
 
                // Load template
-               loadTemplate('admin_delete_email_bonus', false, $content);
+               loadTemplate('admin_delete_email_bonus', FALSE, $content);
        } else {
                // Mail already deleted!
                displayMessage('{--ADMIN_BONUS_MAIL_ALREADY_DELETED--}');
@@ -197,7 +197,7 @@ LIMIT 1",
        SQL_FREERESULT($result);
 } elseif ((isGetRequestElementSet('nid')) && (isExtensionInstalledAndNewer('bonus', '0.8.7'))) {
        // Load data from bonus mail
-       $result = SQL_QUERY_ESC("SELECT `id`,`subject`,`url`,`timestamp` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
+       $result = SQL_QUERY_ESC("SELECT `id`, `subject`, `url`, `timestamp` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
                array(bigintval(getRequestElement('nid'))), __FILE__, __LINE__);
 
        // Delete mail only once
@@ -221,7 +221,7 @@ LIMIT 1",
                $content['count']     = $count;
 
                // Load template
-               loadTemplate('admin_delete_email_notify', false, $content);
+               loadTemplate('admin_delete_email_notify', FALSE, $content);
        } else {
                // Mail already deleted!
                displayMessage('{--ADMIN_NOTIFY_MAIL_ALREADY_DELETED--}');