X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-list_user.php;h=53e8a7c6579596445c0874cd80a63d755c7f0100;hb=39e23cf756c4bfac9bd692e4d98609c5c2a8f066;hp=b8ce9527871867eb46d178d62a55612f51cfb3c6;hpb=f2aeaab0cd313b2eeb151642455ed558f6b186dc;p=mailer.git
diff --git a/inc/modules/admin/what-list_user.php b/inc/modules/admin/what-list_user.php
index b8ce952787..53e8a7c657 100644
--- a/inc/modules/admin/what-list_user.php
+++ b/inc/modules/admin/what-list_user.php
@@ -86,9 +86,9 @@ if (isExtensionActive('country')) {
}
// Init unset data
-if (!isGetRequestParameterSet('letter')) { setGetRequestParameter('letter', getMessage('_ALL2')); }
-if (!isGetRequestParameterSet('sortby')) { setGetRequestParameter('sortby', 'userid'); }
-if (!isGetRequestParameterSet('page')) { setGetRequestParameter('page' , 1); }
+if (!isGetRequestParameterSet('letter')) { setGetRequestParameter('letter', ''); }
+if (!isGetRequestParameterSet('sortby')) { setGetRequestParameter('sortby', 'userid'); }
+if (!isGetRequestParameterSet('page')) { setGetRequestParameter('page' , 1); }
// Set base URL
$base = '[ 0) $content['refs'] = $base . '&what=list_refs&userid=' . $userid . '%}">' . translateComma($content['refs']) . ']';
if ($content['cats'] > 0) $content['cats'] = $base . '&what=list_cats&userid=' . $userid . '%}">' . translateComma($content['cats']) . ']';
- // Fix empty module
- if (empty($content['last_module'])) $content['last_module'] = '---';
-
// Calculate timestamp for birthday
$stamp = mktime(0, 0, 0, $content['birth_month'], $content['birth_day'], $content['birth_year']);
@@ -148,19 +145,11 @@ LIMIT 1",
$content['total'] = countSumTotalData($userid, 'user_points', 'points');
$content['locked'] = countSumTotalData($userid, 'user_points', 'locked_points');
$content['lock_timestamp'] = generateDateTime($content['lock_timestamp'], 2);
-
- // Is the lock reason not set?
- if (!isset($content['lock_reason'])) $content['lock_reason'] = '---';
+ $content['nickname'] = '{--EXT_NICKNAME_404--}';
// Nickname inclusion?
// @TODO Rewrite these to filters
- if (isExtensionActive('nickname')) {
- // Nickname not set or invalid? Then
- if ((empty($content['nickname'])) || ($content['nickname'] == $userid)) $content['nickname'] = '---';
- } else {
- // Extension not found
- $content['nickname'] = '{--EXT_NICKNAME_404--}';
- }
+ if (isExtensionInstalled('nickname')) $content['nickname'] = getNickname($content['userid']);
// Clickrate
$content['click_rate'] = '0';
@@ -191,13 +180,13 @@ LIMIT 1",
SQL_FREERESULT($result_user);
} else {
$whereStatement = '';
- if ((getRequestParameter('letter') != getMessage('_ALL2')) && (getRequestParameter('letter') != getMessage('_OTHERS')) && (isGetRequestParameterSet('letter'))) {
+ if (isGetRequestParameterSet('letter')) {
// List only persons w
- $whereStatement = " WHERE `family` LIKE '".getRequestParameter('letter') . "%'";
+ $whereStatement = " WHERE `family` LIKE '".getRequestParameter('letter') . "%%'";
} // END - if
// Parse the status or mode parameter
- if (isGetRequestParameterSet(('status'))) {
+ if (isGetRequestParameterSet('status')) {
// Is a WHERE statement already there?
if (!empty($whereStatement)) {
// Then append the status column
@@ -250,7 +239,7 @@ LIMIT 1",
$result = SQL_QUERY($sql, __FILE__, __LINE__);
// Are there some entries?
- if (SQL_NUMROWS($result_master) > 0) {
+ if (!SQL_HASZERONUMS($result_master)) {
// We have some (new?) registrations!
$templateContent['colspan2'] = ($colspan + 2);
$templateContent['user_count'] = getTotalConfirmedUser();
@@ -273,7 +262,7 @@ LIMIT 1",
} // END - if
// Load all users
- $OUT = ''; $SW = 2;
+ $OUT = '';
while ($content = SQL_FETCHARRAY($result)) {
// Merge more data in
$content = merge_array($content, $templateContent);
@@ -286,10 +275,11 @@ LIMIT 1",
if ($content['emails_sent'] > 0) $content['emails_sent'] = $base . '&what=email_details&userid=' . $content['userid'] . '%}">' . translateComma($content['emails_sent']) . ']';
// Add nickname
- if ((empty($content['nickname'])) || ($content['nickname'] == $content['userid'])) $content['nickname'] = '---';
+ $content['nickname'] = '{--EXT_NICKNAME_404--}';
+ if (isExtensionInstalled('nickname')) $content['nickname'] = getNickname($content['userid']);
// Calculate total points
- $content['points'] = countSumTotalData($content['userid'], 'user_points', 'points') - countSumTotalData($content['userid'], 'user_data', 'used_points');
+ $content['points'] = getTotalPoints($content['userid']);
// Clickrate
$content['rate'] = '0';
@@ -298,7 +288,6 @@ LIMIT 1",
} // END - if
// Transfer data to array
- $content['sw'] = $SW;
$content['email'] = '[' . $content['email'] . ']';
$content['lock_timestamp'] = generateDateTime($content['lock_timestamp'], 2);
$content['refs'] = countSumTotalData($content['userid'], 'user_refs', 'id', 'userid', true);
@@ -307,9 +296,6 @@ LIMIT 1",
// If we have at least one referal, make it clickable to referal list
if ($content['refs'] > 0) $content['refs'] = $base . '&what=list_refs&userid=' . $content['userid'] . '%}">' . translateComma($content['refs']) . ']';
- // Is the lock reason not set?
- if (!isset($content['lock_reason'])) $content['lock_reason'] = '---';
-
// Is the extension 'country' installed?
// @TODO Rewrite this into a filter
if (isExtensionActive('country')) {
@@ -322,7 +308,6 @@ LIMIT 1",
// Load row template and switch colors
$OUT .= loadTemplate('admin_list_user_row', true, $content);
- $SW = 3 - $SW;
} // END - while
// Free memory
@@ -336,12 +321,12 @@ LIMIT 1",
// Init title with "all accounts"
$content['title'] = '{--ADMIN_ALL_ACCOUNTS--}';
- if (isGetRequestParameterSet(('status'))) {
+ if (isGetRequestParameterSet('status')) {
// Set title according to the 'status'
- $content['title'] = getMessage(sprintf("ADMIN_LIST_STATUS_%s_ACCOUNTS", strtoupper(getRequestParameter(('status')))));
+ $content['title'] = sprintf("{--ADMIN_LIST_STATUS_%s_ACCOUNTS--}", strtoupper(getRequestParameter('status')));
} elseif (isGetRequestParameterSet('mode')) {
// Set title according to the "mode"
- $content['title'] = getMessage(sprintf("ADMIN_LIST_MODE_%s_ACCOUNTS", strtoupper(getRequestParameter('mode'))));
+ $content['title'] = sprintf("{--ADMIN_LIST_MODE_%s_ACCOUNTS--}", strtoupper(getRequestParameter('mode')));
}
// Merge more data again