* svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
}
// Add random confirmed if extension version matches
-if (getExtensionVersion('user') >= '0.3.4') {
+if (isExtensionInstalledAndNewer('user', '0.3.4')) {
// Add it...
$MORE .= ", `rand_confirmed`";
// Add lock reason?
- if (getExtensionVersion('user') >= '0.3.5') {
+ if (isExtensionInstalledAndNewer('user', '0.3.5')) {
// Add them...
$MORE .= ", `lock_reason`, UNIX_TIMESTAMP(`lock_timestamp`) AS lock_timestamp";
} // END - if
// Prepare data for template
$content['admin_links'] = generateMemberAdminActionLinks($userid, $content['status']);
- $content['gender'] = translateGender($content['gender']);
$content['email_link'] = generateEmailLink($content['email'], 'user_data');
- $content['status'] = translateUserStatus($content['status']);
$content['last_online'] = generateDateTime($content['last_online'], 0);
- $content['used_points'] = translateComma($content['used_points']);
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);
}
// Is the user extension newer?
- if (getExtensionVersion('user') >= '0.3.4') {
+ if (isExtensionInstalledAndNewer('user', '0.3.4')) {
// Then "translate" the number
$content['rand_confirmed'] = translateComma($content['rand_confirmed']);
} // END - if
$content['click_rate'] = translateComma($content['mails_confirmed'] / $content['emails_received'] * 100);
} // END - if
- // "Translate" more data
- $content['mails_confirmed'] = translateComma($content['mails_confirmed']);
- $content['emails_received'] = translateComma($content['emails_received']);
-
// Is the extension 'country' installed?
if (isExtensionActive('country')) {
// Then overwrite country information
if (!isGetRequestParameterSet('offset')) setGetRequestParameter('offset', getConfig('user_limit'));
// Add limitation to SQL string and run him again
- $sql .= " LIMIT ".(getRequestParameter('offset') * getRequestParameter('page') - getRequestParameter('offset')).", ".getRequestParameter('offset');
+ $sql .= ' LIMIT ' . (getRequestParameter('offset') * getRequestParameter('page') - getRequestParameter('offset')) . ', ' . getRequestParameter('offset');
$result = SQL_QUERY($sql, __FILE__, __LINE__);
- // Count all confirmed users
- $user_count = countSumTotalData('CONFIRMED','user_data','userid','status',true);
-
// 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();
// Sorting links
- 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', '');
- }
+ $templateContent['page_nav'] = addPageNavigation($PAGES, getConfig('user_limit'), true, $colspan, true);
+ } // END - if
// Column with nickname when nickname extension is present
- // @TODO Rewrite this into a filter
+ // @TODO Rewrite this into a filter
+ $templateContent['nickname_th'] = '';
if (isExtensionActive('nickname')) {
// Nickname extension found
- 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
// Load all users
$OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
+ // Merge more data in
+ $content = merge_array($content, $templateContent);
+
// Set refid link
if ($content['refid'] > 0) $content['refid'] = generateUserProfileLink($content['refid']);
$content['sw'] = $SW;
$content['userid_link'] = generateUserProfileLink($content['userid']);
$content['gender'] = translateGender($content['gender']);
- $content['email'] = '[<a href="' . generateEmailLink($content['email'], 'user_data') . '%}">' . $content['email'] . '</a>]';
+ $content['email'] = '[<a href="' . generateEmailLink($content['email'], 'user_data') . '">' . $content['email'] . '</a>]';
$content['alinks'] = generateMemberAdminActionLinks($content['userid'], $content['status']);
$content['points'] = translateComma($content['points']);
$content['rate'] = translateComma($content['rate']);
$content['title'] = getMessage(sprintf("ADMIN_LIST_MODE_%s_ACCOUNTS", strtoupper(getRequestParameter('mode'))));
}
+ // Merge more data again
+ $content = merge_array($content, $templateContent);
+
// Load main template
loadTemplate('admin_list_user', false, $content);
} else {