X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=inline;f=inc%2Fmodules%2Fadmin%2Fwhat-del_email.php;h=0b514a929483b1353d04c5085d7902e7d41b0ca5;hb=3c311675e341584ad25c561a5a65198f3717125f;hp=a6d57eddf3f7012fd7d9e45ebb197936f534ca54;hpb=4c221b6350439b8f91db58f142f03f79014f2eaf;p=mailer.git
diff --git a/inc/modules/admin/what-del_email.php b/inc/modules/admin/what-del_email.php
index a6d57eddf3..0b514a9294 100644
--- a/inc/modules/admin/what-del_email.php
+++ b/inc/modules/admin/what-del_email.php
@@ -17,7 +17,7 @@
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
* Copyright (c) 2009 - 2011 by Mailer Developer Team *
- * For more information visit: http://www.mxchange.org *
+ * For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@@ -46,10 +46,10 @@ addYouAreHereLink('admin', __FILE__);
// Init counter for deleted mails
$count = '0';
-if (isGetRequestParameterSet('mid')) {
+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",
- array(bigintval(getRequestParameter('mid'))), __FILE__, __LINE__);
+ $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
if (SQL_NUMROWS($result) == 1) {
@@ -67,7 +67,7 @@ if (isGetRequestParameterSet('mid')) {
loadTemplate('admin_delete_email_normal', false, $content);
// Load email template and send the email away
- $message_user = loadEmailTemplate('order-deleted', $content, $content['sender']);
+ $message_user = loadEmailTemplate('member_order_deleted', $content, $content['sender']);
sendEmail($content['sender'], '{--MEMBER_ORDER_DELETED--}', $message_user);
// Fetch right stats_id from pool
@@ -82,7 +82,7 @@ ON
WHERE
s.`pool_id`=%s
LIMIT 1",
- array(bigintval(getRequestParameter('mid'))), __FILE__, __LINE__);
+ array(bigintval(getRequestElement('mid'))), __FILE__, __LINE__);
if (SQL_NUMROWS($result_pool) == 1) {
// Fetch stats id
list($stats_id) = SQL_FETCHROW($result_pool);
@@ -91,7 +91,7 @@ LIMIT 1",
$links = countSumTotalData($stats_id, 'user_links', 'userid', 'stats_id', true);
// Reset sent mails for recipient(s)
- reduceRecipientReceivedMails('stats_id', getRequestParameter('mid'), $links);
+ reduceRecipientReceivedMails('stats_id', getRequestElement('mid'), $links);
// Calc total points and pay them back
$totalPoints = $links * $content['price'];
@@ -109,24 +109,20 @@ LIMIT 1",
} // END - if
// Pay back points
- //* DEBUG: */ debugOutput('PAYBACK:'.$content['sender']);
- addPointsDirectly('mail_deleted', $content['sender'], $totalPoints);
+ initReferalSystem();
+ addPointsThroughReferalSystem('mail_deleted', $content['sender'], $totalPoints);
// Output message
if (getConfig('repay_deleted_mails') == 'REPAY') {
// Repayed
- displayMessage(getMaskedMessage('ADMIN_POINTS_REPAYED',
- '{%pipe,translateComma=' . $totalPoints . '%}'
- ));
+ displayMessage('{%message,ADMIN_POINTS_REPAYED=' . $totalPoints . '%}');
} else {
// To jackpot
- displayMessage(getMaskedMessage('ADMIN_POINTS_TO_JACKPOT',
- '{%pipe,translateComma=' . $totalPoints . '%}'
- ));
+ displayMessage('{%message,ADMIN_POINTS_TO_JACKPOT=' . $totalPoints . '%}');
}
} else {
// Points shredded!
- displayMessage(getMaskedMessage('ADMIN_POINTS_SHREDDED', '{%pipe,translateComma=' . $totalPoints . '%}'));
+ displayMessage('{%message,ADMIN_POINTS_SHREDDED=' . $totalPoints . '%}');
}
// Remove links from DB
@@ -135,7 +131,7 @@ LIMIT 1",
$count += SQL_AFFECTEDROWS();
// Load template for link
- displayMessage('{--ADMIN_REMOVE_STATS_ENTRY--}');
+ displayMessage('{--ADMIN_REMOVE_STATS_ENTRY--}');
} // END - if
// Free the result
@@ -143,11 +139,11 @@ LIMIT 1",
// Delete mail from queue
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_pool` WHERE `id`=%s LIMIT 1",
- array(bigintval(getRequestParameter('mid'))), __FILE__, __LINE__);
+ array(bigintval(getRequestElement('mid'))), __FILE__, __LINE__);
$count += SQL_AFFECTEDROWS();
// Output link for manually removing stats entry
- outputHtml(getMaskedMessage('ADMIN_DELETED_MAILS_COUNT', $count));
+ outputHtml('{%message,ADMIN_DELETED_MAILS_COUNT=' . $count . '%}');
} else {
// Mail already deleted!
displayMessage('{--ADMIN_NORMAL_MAIL_ALREADY_DELETED--}');
@@ -155,17 +151,17 @@ LIMIT 1",
// Free result
SQL_FREERESULT($result);
-} elseif (isGetRequestParameterSet('pid')) {
+} elseif (isGetRequestElementSet('pid')) {
// Remove stats entries
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `pool_id`=%s LIMIT 1",
- array(bigintval(getRequestParameter('pid'))), __FILE__, __LINE__);
+ array(bigintval(getRequestElement('pid'))), __FILE__, __LINE__);
// Output message
displayMessage('{--ADMIN_USER_STATS_REMOVED--}');
-} elseif ((isGetRequestParameterSet('bid')) && (isExtensionActive('bonus'))) {
+} 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",
- array(bigintval(getRequestParameter('bid'))), __FILE__, __LINE__);
+ $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
if (SQL_NUMROWS($result) == 1) {
@@ -173,22 +169,22 @@ LIMIT 1",
$content = SQL_FETCHARRAY($result);
// Reset sent mails for recipient(s)
- reduceRecipientReceivedMails('bonus_id', getRequestParameter('bid'), $content['mails_sent']);
+ reduceRecipientReceivedMails('bonus_id', getRequestElement('bid'), $content['mails_sent']);
// Init counter for deleted mails
$count = '0';
// Delete bonus mail entirely from database
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
- array(bigintval(getRequestParameter('bid'))), __FILE__, __LINE__);
+ array(bigintval(getRequestElement('bid'))), __FILE__, __LINE__);
$count += SQL_AFFECTEDROWS();
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s",
- array(bigintval(getRequestParameter('bid'))), __FILE__, __LINE__);
+ array(bigintval(getRequestElement('bid'))), __FILE__, __LINE__);
$count += SQL_AFFECTEDROWS();
// Prepare data for the template
- $content['timestamp'] = generateDateTime($content['timestamp'], 0);
- $content['cnt'] = $count;
+ $content['timestamp'] = generateDateTime($content['timestamp'], '0');
+ $content['count'] = $count;
// Load template
loadTemplate('admin_delete_email_bonus', false, $content);
@@ -199,10 +195,10 @@ LIMIT 1",
// Free result
SQL_FREERESULT($result);
-} elseif ((isGetRequestParameterSet('nid')) && (isExtensionInstalledAndNewer('bonus', '0.8.7'))) {
+} 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",
- array(bigintval(getRequestParameter('nid'))), __FILE__, __LINE__);
+ $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
if (SQL_NUMROWS($result) == 1) {
@@ -214,15 +210,15 @@ LIMIT 1",
// Delete bonus mail entirely from database
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
- array(bigintval(getRequestParameter('nid'))), __FILE__, __LINE__);
+ array(bigintval(getRequestElement('nid'))), __FILE__, __LINE__);
$count += SQL_AFFECTEDROWS();
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s",
- array(bigintval(getRequestParameter('nid'))), __FILE__, __LINE__);
+ array(bigintval(getRequestElement('nid'))), __FILE__, __LINE__);
$count += SQL_AFFECTEDROWS();
// Prepare data for the template
- $content['timestamp'] = generateDateTime($content['timestamp'], 0);
- $content['cnt'] = $count;
+ $content['timestamp'] = generateDateTime($content['timestamp'], '0');
+ $content['count'] = $count;
// Load template
loadTemplate('admin_delete_email_notify', false, $content);