]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_unconfirmed.php
Checking new member registrations is now done with list_user (was: chk_regs) and...
[mailer.git] / inc / modules / admin / what-list_unconfirmed.php
index 420a0852c41cbb42d6ceec3076a51158223770f1..5add439d216a3b14b34a89f42ee5faad3cac5b00 100644 (file)
@@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 addYouAreHereLink('admin', __FILE__);
 
 if (!isExtensionActive('mailid')) {
-       loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('mailid'));
+       displayMessage(generateExtensionInactiveNotInstalledMessage('mailid'));
        return;
 } // END - if
 
@@ -72,10 +72,14 @@ LIMIT 1",
        );
 
        // Column, type and id for member's mail
-       $col = 'stats_id'; $type = 'NORMAL'; $ID = '-1';
+       $col = 'stats_id';
+       $type = 'NORMAL';
+       $ID = -1;
 
        // Load admin_list_unconfirmed template
-       $listed = true; $DATA = getRequestParameter('mid'); $mailType = 'mailid';
+       $listed = true;
+       $DATA = getRequestParameter('mid');
+       $mailType = 'mailid';
 } elseif ((isGetRequestParameterSet('bid')) && (isExtensionActive('bonus'))) {
        // @TODO This constant might be unused? define('__LIST_UNCON_TITLE', '{--ADMIN_LIST_UNCONFIRMED_BONUS_LINKS--}');
 
@@ -91,13 +95,17 @@ LIMIT 1",
        );
 
        // Column, type and id for member's mail
-       $col = 'bonus_id'; $type = 'BONUS'; $ID = getRequestParameter('bid');
+       $col = 'bonus_id';
+       $type = 'BONUS';
+       $ID = getRequestParameter('bid');
 
        // Load admin_list_unconfirmed template
-       $listed = true; $DATA = $ID; $mailType = 'bonusid';
+       $listed = true;
+       $DATA = $ID;
+       $mailType = 'bonusid';
 } else {
        // @TODO "Please do not call me directly." Should be rewritten to a nice selection depending on ext-bonus
-       loadTemplate('admin_settings_saved', false, '{--ADMIN_CALL_NOT_DIRECTLY--}');
+       displayMessage('{--ADMIN_CALL_NOT_DIRECTLY--}');
 }
 
 // Shall I display links or not?
@@ -154,7 +162,7 @@ LIMIT %s",
                                                'userid' => $row['userid'],
                                                'link'   => $mailType,
                                                'id'     => $ID,
-                                               'email'  => '<a href="' . generateEmailLink($row['email'], 'user_data') . '">' . translateGender($row['gender']) . ' ' . $row['surname'] . ' ' . $row['family'] . '</a>',
+                                               'email'  => '<a href="' . generateEmailLink($row['email'], 'user_data') . '">{%pipe,translateGender=' . $row['gender'] . '%} ' . $row['surname'] . ' ' . $row['family'] . '</a>',
                                                'status' => $row['status'],
                                        );
 
@@ -170,7 +178,7 @@ LIMIT %s",
                        $OUT = loadTemplate('admin_list_unconfirmed_list', true, $OUT);
                } else {
                        // All links are confirmed... strange, you shall normally not get a link to this place in this scenario... hmmm.
-                       $OUT = loadTemplate('admin_settings_saved', true, '{--ADMIN_UNCONFIRMED_NO_LINK_LEFT--}');
+                       $OUT = displayMessage('{--ADMIN_UNCONFIRMED_NO_LINK_LEFT--}', true);
                }
 
                // Prepare content
@@ -188,17 +196,17 @@ LIMIT %s",
                // Data in pool or in user_stats not found, so let's find out where data is missing
                if (countSumTotalData(bigintval($ID), 'pool', 'id', 'id', true) == 1) {
                        // pool table
-                       loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_UNCONFIRMED_POOL_MISSING', $ID));
+                       displayMessage('{%message,ADMIN_UNCONFIRMED_POOL_MISSING=' . $ID . '%}');
                } elseif (countSumTotalData(bigintval($ID), 'user_stats', 'id', 'pool_id', true) == 1) {
                        // user_stats table
-                       loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_UNCONFIRMED_STATS_MISSING', $ID));
+                       displayMessage('{%message,ADMIN_UNCONFIRMED_STATS_MISSING=' . $ID . '%}');
                } else {
                        // both or link is invalid
-                       loadTemplate('admin_settings_saved', false, '{--ADMIN_UNCONFIRMED_INVALID_LINK--}');
+                       displayMessage('{--ADMIN_UNCONFIRMED_INVALID_LINK--}');
                }
        } elseif (isGetRequestParameterSet('bid')) {
                // Data in bonus table not found
-               loadTemplate('admin_settings_saved', false, '{--ADMIN_UNCONFIRMED_INVALID_LINK--}');
+               displayMessage('{--ADMIN_UNCONFIRMED_INVALID_LINK--}');
        }
 
        // Free result