X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-del_email.php;h=de084bb7c3c8d9c05654dbb17f05206506b9cc77;hb=cc59ea1cce3e0fafc2cc6c9e36142698cf2b58ef;hp=a032f9a8c37c9bea6fea6b0db06b0bf92443f4ac;hpb=8d20424344cb2fc720cf19dbc170203928f82e84;p=mailer.git
diff --git a/inc/modules/admin/what-del_email.php b/inc/modules/admin/what-del_email.php
index a032f9a8c3..de084bb7c3 100644
--- a/inc/modules/admin/what-del_email.php
+++ b/inc/modules/admin/what-del_email.php
@@ -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
@@ -99,7 +99,7 @@ LIMIT 1",
// Shall we pay the points back to the user?
if ($totalPoints == 0) {
// No points repayed!
- loadTemplate('admin_settings_saved', false, '{--ADMIN_NO_POINTS_REPAYED--}');
+ displayMessage('{--ADMIN_NO_POINTS_REPAYED--}');
} elseif (getConfig('repay_deleted_mails') != 'SHRED') {
//* DEBUG: */ debugOutput($stats_id . ':' . $totalPoints . '/' . $links . '/' . $content['price']);
// Shall we payback to user or jackpot?
@@ -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
- loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_POINTS_REPAYED',
- '{%pipe,translateComma=' . $totalPoints . '%}'
- ));
+ displayMessage('{%message,ADMIN_POINTS_REPAYED=' . $totalPoints . '%}');
} else {
// To jackpot
- loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_POINTS_TO_JACKPOT',
- '{%pipe,translateComma=' . $totalPoints . '%}'
- ));
+ displayMessage('{%message,ADMIN_POINTS_TO_JACKPOT=' . $totalPoints . '%}');
}
} else {
// Points shredded!
- loadTemplate('admin_settings_saved', false, 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
- loadTemplate('admin_settings_saved', false, '{--ADMIN_REMOVE_STATS_ENTRY--}');
+ displayMessage('{--ADMIN_REMOVE_STATS_ENTRY--}');
} // END - if
// Free the result
@@ -147,10 +143,10 @@ LIMIT 1",
$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!
- loadTemplate('admin_settings_saved', false, '{--ADMIN_NORMAL_MAIL_ALREADY_DELETED--}');
+ displayMessage('{--ADMIN_NORMAL_MAIL_ALREADY_DELETED--}');
}
// Free result
@@ -161,7 +157,7 @@ LIMIT 1",
array(bigintval(getRequestParameter('pid'))), __FILE__, __LINE__);
// Output message
- loadTemplate('admin_settings_saved', false, '{--ADMIN_USER_STATS_REMOVED--}');
+ displayMessage('{--ADMIN_USER_STATS_REMOVED--}');
} elseif ((isGetRequestParameterSet('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",
@@ -187,14 +183,14 @@ LIMIT 1",
$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);
} else {
// Mail already deleted!
- loadTemplate('admin_settings_saved', false, '{--ADMIN_BONUS_MAIL_ALREADY_DELETED--}');
+ displayMessage('{--ADMIN_BONUS_MAIL_ALREADY_DELETED--}');
}
// Free result
@@ -221,21 +217,21 @@ LIMIT 1",
$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);
} else {
// Mail already deleted!
- loadTemplate('admin_settings_saved', false, '{--ADMIN_NOTIFY_MAIL_ALREADY_DELETED--}');
+ displayMessage('{--ADMIN_NOTIFY_MAIL_ALREADY_DELETED--}');
}
// Free result
SQL_FREERESULT($result);
} else {
// No mail orders fond
- loadTemplate('admin_settings_saved', false, '{--ADMIN_WRONG_CALL--}');
+ displayMessage('{--ADMIN_WRONG_CALL--}');
}
// [EOF]