if (!isGetRequestParameterSet('sortby')) { setGetRequestParameter('sortby', 'userid'); }
if (!isGetRequestParameterSet('page')) { setGetRequestParameter('page' , 1); }
if (!isGetRequestParameterSet('sortby')) { setGetRequestParameter('sortby', 'userid'); }
if (!isGetRequestParameterSet('page')) { setGetRequestParameter('page' , 1); }
// Add links to the numbers
if ($content['links'] > 0) $content['links'] = $base . '&what=list_links&userid=' . $userid . '%}">' . $content['links'] . '</a>]';
// Add links to the numbers
if ($content['links'] > 0) $content['links'] = $base . '&what=list_links&userid=' . $userid . '%}">' . $content['links'] . '</a>]';
- if ($content['refid'] > 0) $content['refid'] = $base . '&what=list_user&userid=' . $content['refid'] . '%}">'.$content['refid'] . '</a>]';
- if ($content['refs'] > 0) $content['refs'] = $base . '&what=list_refs&userid=' . $userid . '%}">' . $content['refs'] . '</a>]';
- if ($content['cats'] > 0) $content['cats'] = $base . '&what=list_cats&userid=' . $userid . '%}">' . $content['cats'] . '</a>]';
+ if (isValidUserId($content['refid'])) $content['refid'] = $base . '&what=list_user&userid=' . $content['refid'] . '%}">'.$content['refid'] . '</a>]';
+ if ($content['refs'] > 0) $content['refs'] = $base . '&what=list_refs&userid=' . $userid . '%}">' . translateComma($content['refs']) . '</a>]';
+ if ($content['cats'] > 0) $content['cats'] = $base . '&what=list_cats&userid=' . $userid . '%}">' . translateComma($content['cats']) . '</a>]';
if ($content['emails_sent'] > 0) $content['emails_sent'] = $base . '&what=email_details&userid=' . $userid . '%}">' . translateComma($content['emails_sent']) . '</a>]';
$content['joined'] = generateDateTime($content['joined'], 0);
$content['last_update'] = generateDateTime($content['last_update'], 0);
$content['last_profile_sent'] = generateDateTime($content['last_profile_sent'], 0);
if ($content['emails_sent'] > 0) $content['emails_sent'] = $base . '&what=email_details&userid=' . $userid . '%}">' . translateComma($content['emails_sent']) . '</a>]';
$content['joined'] = generateDateTime($content['joined'], 0);
$content['last_update'] = generateDateTime($content['last_update'], 0);
$content['last_profile_sent'] = generateDateTime($content['last_profile_sent'], 0);
- $content['total'] = translateComma(countSumTotalData($userid, 'user_points', 'points'));
- $content['locked'] = translateComma(countSumTotalData($userid, 'user_points', 'locked_points'));
+ $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?
$content['lock_timestamp'] = generateDateTime($content['lock_timestamp'], 2);
// Is the lock reason not set?
- // Is the user extension newer?
- if (isExtensionInstalledAndNewer('user', '0.3.4')) {
- // Then "translate" the number
- $content['rand_confirmed'] = translateComma($content['rand_confirmed']);
- } // END - if
-
// Is the extension 'country' installed?
if (isExtensionActive('country')) {
// Then overwrite country information
// Is the extension 'country' installed?
if (isExtensionActive('country')) {
// Then overwrite country information
// Calculate page count (0.5 fixes a bug with page count)
if (getConfig('user_limit') == '0') {
setConfigEntry('user_limit', 100);
// Calculate page count (0.5 fixes a bug with page count)
if (getConfig('user_limit') == '0') {
setConfigEntry('user_limit', 100);
if (!isGetRequestParameterSet('page')) setGetRequestParameter('page' , 1);
if (!isGetRequestParameterSet('offset')) setGetRequestParameter('offset', getConfig('user_limit'));
// Add limitation to SQL string and run him again
if (!isGetRequestParameterSet('page')) setGetRequestParameter('page' , 1);
if (!isGetRequestParameterSet('offset')) setGetRequestParameter('offset', getConfig('user_limit'));
// Add limitation to SQL string and run him again
// Are there some entries?
if (SQL_NUMROWS($result_master) > 0) {
// We have some (new?) registrations!
// Are there some entries?
if (SQL_NUMROWS($result_master) > 0) {
// We have some (new?) registrations!
- define('__COLSPAN2' , ($colspan + 2));
- define('__USER_CNT' , $user_count);
+ $templateContent['colspan2'] = ($colspan + 2);
+ $templateContent['user_count'] = getTotalConfirmedUser();
- define('__ALPHA_SORT', alpha(getRequestParameter('sortby'), $colspan, true));
- define('__SORT_LINKS', addSortLinks(getRequestParameter('letter'), getRequestParameter('sortby'), $colspan, true));
+ $templateContent['alpha_sort'] = alpha(getRequestParameter('sortby'), ($colspan + 1), true);
+ $templateContent['sort_links'] = addSortLinks(getRequestParameter('letter'), getRequestParameter('sortby'), ($colspan + 1), true);
+ $templateContent['page_nav'] = '';
- if ($PAGES > 1) {
- define('__PAGE_NAV', addPageNavigation($PAGES, getConfig('user_limit'), true, $colspan, true));
- } else {
- // No page navigation is required
- define('__PAGE_NAV', '');
- }
+ if ($numPages > 1) {
+ $templateContent['page_nav'] = addPageNavigation($numPages, getConfig('user_limit'), true, $colspan, true);
+ } // END - if
- define('__NICKNAME_TH', " <td class=\"header_column bottom\" align=\"center\">{--NICKNAME--}</td>");
- } else {
- // Not found
- define('__NICKNAME_TH', '');
- }
+ $templateContent['nickname_th'] = '<td class="header_column bottom" align="center">{--NICKNAME--}</td>';
+ } // END - if
// Get number of unconfirmed mails
$content['links'] = countSumTotalData($content['userid'], 'user_links', 'id', 'userid', true);
// Get number of unconfirmed mails
$content['links'] = countSumTotalData($content['userid'], 'user_links', 'id', 'userid', true);
- $content['alinks'] = generateMemberAdminActionLinks($content['userid'], $content['status']);
- $content['points'] = translateComma($content['points']);
- $content['rate'] = translateComma($content['rate']);
- $content['locked'] = translateComma(countSumTotalData($content['userid'], 'user_points', 'locked_points'));
$content['refs'] = countSumTotalData($content['userid'], 'user_refs', 'id', 'userid', true);
$content['refs'] = countSumTotalData($content['userid'], 'user_refs', 'id', 'userid', true);
if (isGetRequestParameterSet(('status'))) {
// Set title according to the 'status'
$content['title'] = getMessage(sprintf("ADMIN_LIST_STATUS_%s_ACCOUNTS", strtoupper(getRequestParameter(('status')))));
if (isGetRequestParameterSet(('status'))) {
// Set title according to the 'status'
$content['title'] = getMessage(sprintf("ADMIN_LIST_STATUS_%s_ACCOUNTS", strtoupper(getRequestParameter(('status')))));
// Load main template
loadTemplate('admin_list_user', false, $content);
} else {
// No one as registered so far! :-(
// Load main template
loadTemplate('admin_list_user', false, $content);
} else {
// No one as registered so far! :-(