+ list($stats_id) = SQL_FETCHROW($result_pool);
+
+ // Get all user links
+ $links = countSumTotalData($stats_id, 'user_links', 'userid', 'stats_id', true);
+
+ // Reset sent mails for recipient(s)
+ reduceRecipientReceivedMails('stats_id', getRequestParameter('mid'), $links);
+
+ // Calc total points and pay them back
+ $totalPoints = $links * $content['price'];
+
+ // Shall we pay the points back to the user?
+ if ($totalPoints == 0) {
+ // 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?
+ if (getConfig('repay_deleted_mails') == 'JACKPOT') {
+ // Set jackpot
+ $content['sender'] = '0';
+ } // END - if
+
+ // Pay back points
+ //* DEBUG: */ debugOutput('PAYBACK:'.$content['sender']);
+ addPointsDirectly('mail_deleted', $content['sender'], $totalPoints);
+
+ // Output message
+ if (getConfig('repay_deleted_mails') == 'REPAY') {
+ // Repayed
+ displayMessage(getMaskedMessage('ADMIN_POINTS_REPAYED',
+ '{%pipe,translateComma=' . $totalPoints . '%}'
+ ));
+ } else {
+ // To jackpot
+ displayMessage(getMaskedMessage('ADMIN_POINTS_TO_JACKPOT',
+ '{%pipe,translateComma=' . $totalPoints . '%}'
+ ));
+ }
+ } else {
+ // Points shredded!
+ displayMessage(getMaskedMessage('ADMIN_POINTS_SHREDDED', '{%pipe,translateComma=' . $totalPoints . '%}'));
+ }