./inc/functions.php:156:// @TODO Rewrite this to an extension 'smtp'
./inc/functions.php:1921: // @TODO Find a way to cache this
./inc/functions.php:2022: // @TODO This is still very static, rewrite it somehow
-./inc/functions.php:2202: // @TODO Rename column data_type to e.g. mail_status
+./inc/functions.php:2214: // @TODO Rename column data_type to e.g. mail_status
./inc/gen_sql_patches.php:95:// @TODO Rewrite this to a filter
./inc/install-functions.php:57: // @TODO DEACTIVATED: changeDataInLocalConfigurationFile('OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestParameter('omode'), 0);
./inc/language/de.php:1063: // @TODO Rewrite these two constants
'ADMIN_MAX_VALUE' => "Maximal zu empfangene Mails",
'ADMIN_MAX_COMMENT' => "Hinweis zum Maximal-Wert",
'NO_MAX_VALUES' => "Derzeit klappt die Anmeldung nicht, da Sie keine maximal zu empfangenen Mails einstellen können.",
- 'MAX_PER_DAY' => "Maximale Mitgliedermails/Tag",
+ 'MAX_PER_DAY' => "Maximale Anzahl an Klick-Mails pro Tag",
'PER_DAY' => "Mails",
'REFID_BY' => "Sie wurden geworben von",
'TERMS_OF_USAGE' => "AGBs zustimmen und absenden",
'MEMBER_MAIL_BONUS_CONFIRMED_ON' => "Sie haben diese Bonusmail <span class=\"data\">%s</span> bestätigt.",
'MEMBER_MAIL_BONUS_CONFIRMED_UNKNOWN' => "Es konnte nicht festgestellt werden, wann Sie die Bonus-Mail <span class=\"data\">%s</span> bestätigt hatten.",
- 'MEMBER_MAIL_NORMAL_CONFIRMED_ON' => "Sie haben diese Klickmail <span class=\"data\">%s</span> bestätigt.",
- 'MEMBER_MAIL_NORMAL_CONFIRMED_UNKNOWN' => "Es konnte nicht festgestellt werden, wann Sie die Klickmail <span class=\"data\">%s</span> bestätigt hatten.",
+ 'MEMBER_MAIL_NORMAL_CONFIRMED_ON' => "Sie haben diese Klick-Mail <span class=\"data\">%s</span> bestätigt.",
+ 'MEMBER_MAIL_NORMAL_CONFIRMED_UNKNOWN' => "Es konnte nicht festgestellt werden, wann Sie die Klick-Mail <span class=\"data\">%s</span> bestätigt hatten.",
// @TODO Rewrite these two constants
- 'MEMBER_MAIL_NORMAL_DETAILS_TITLE' => "Details zur Klickmail <span class=\"data\">%s</span>:",
+ 'MEMBER_MAIL_NORMAL_DETAILS_TITLE' => "Details zur Klick-Mail <span class=\"data\">%s</span>:",
// Email status
'EMAIL_STATUS_ACTIVE' => "Wird gerade versendet",
array(bigintval($sel)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Entry found so we load the stuff...
- $data = SQL_FETCHARRAY($result);
+ $content = SQL_FETCHARRAY($result);
// Prepare data for the row template
- $data = array(
- 'action' => adminAddMenuSelectionBox('admin', 'action', 'sel_action[' . $sel . ']', $data['action']),
- 'what' => adminAddMenuSelectionBox('admin', 'what' , 'sel_what[' . $sel . ']', $data['what']),
+ $content = array(
+ 'action' => adminAddMenuSelectionBox('admin', 'action', 'sel_action[' . $sel . ']', $content['action']),
+ 'what' => adminAddMenuSelectionBox('admin', 'what' , 'sel_what[' . $sel . ']', $content['what']),
'sel' => $sel,
- 'menu' => $data['title'],
- 'descr' => $data['descr'],
- 'cnt' => $count,
+ 'menu' => $content['title'],
+ 'descr' => $content['descr'],
+ 'count' => $count,
);
// Load row template
- $OUT .= loadTemplate('admin_edit_admin_menu_row', true, $data);
+ $OUT .= loadTemplate('admin_edit_admin_menu_row', true, $content);
} else {
// Entry not found?
- $data = array(
+ $content = array(
'sel' => $sel
);
// Load row template
- $OUT .= loadTemplate('admin_menu_404_row', true, $data);
+ $OUT .= loadTemplate('admin_menu_404_row', true, $content);
}
// Free result and switch color
} // END - foreach
$content['rows'] = $OUT;
- $content['cnt'] = $count;
+ $content['count'] = $count;
// Load template
loadTemplate('admin_edit_admin_menu_form', false, $content);
array(bigintval($sel)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Entry found so we load the stuff...
- $data = SQL_FETCHARRAY($result);
+ $content = SQL_FETCHARRAY($result);
// Prepare data for the row template
- $data = array(
- 'menu' => $data['title'],
- 'cnt' => $count,
- 'sel' => $sel,
+ $content = array(
+ 'menu' => $content['title'],
+ 'count' => $count,
+ 'sel' => $sel,
);
- $OUT .= loadTemplate('admin_delete_admin_menu_row', true, $data);
+ $OUT .= loadTemplate('admin_delete_admin_menu_row', true, $content);
} else {
// Entry not found?
- $data = array(
+ $content = array(
'sel' => $sel
);
- $OUT .= loadTemplate('admin_menu_404_row', true, $data);
+ $OUT .= loadTemplate('admin_menu_404_row', true, $content);
}
SQL_FREERESULT($result);
} // END - if
} // END - switch
$content['rows'] = $OUT;
- $content['cnt'] = $count;
+ $content['count'] = $count;
// Load template
loadTemplate('admin_delete_admin_menu', false, $content);
$count = '0';
// Process all entries
- while ($data = SQL_FETCHARRAY($result)) {
+ while ($content = SQL_FETCHARRAY($result)) {
// Count this entry
$count++;
// Init navigation variable
- $data['navi'] = '';
- if (($data['sort'] == '0') || (($data['sort'] == 1) && (!empty($SUB)))) {
+ $content['navi'] = '';
+ if (($content['sort'] == '0') || (($content['sort'] == 1) && (!empty($SUB)))) {
// Is highest position
- $data['navi'] = '<a href="{%url=modules.php?module=admin&what=adminedit&sub=' . $content['sub'] . '&act=' . $data['action'] . '&w=' . $data['what'] . '&tid=' . ($data['sort']+1) . '&fid=' . $data['sort'] . '%}">{--LOWER--}</a>';
+ $content['navi'] = '<a href="{%url=modules.php?module=admin&what=adminedit&sub=' . $content['sub'] . '&act=' . $content['action'] . '&w=' . $content['what'] . '&tid=' . ($content['sort']+1) . '&fid=' . $content['sort'] . '%}">{--LOWER--}</a>';
} elseif ($count == SQL_NUMROWS($result)) {
// Is lowest position
- $data['navi'] = '<a href="{%url=modules.php?module=admin&what=adminedit&sub=' . $content['sub'] . '&act=' . $data['action'] . '&w=' . $data['what'] . '&tid=' . ($data['sort']-1) . '&fid=' . $data['sort'] . '%}">{--HIGHER--}</a>';
- } elseif ($data['sort'] > 0) {
+ $content['navi'] = '<a href="{%url=modules.php?module=admin&what=adminedit&sub=' . $content['sub'] . '&act=' . $content['action'] . '&w=' . $content['what'] . '&tid=' . ($content['sort']-1) . '&fid=' . $content['sort'] . '%}">{--HIGHER--}</a>';
+ } elseif ($content['sort'] > 0) {
// Anything else between highest and lowest
- $data['navi'] = '<a href="{%url=modules.php?module=admin&what=adminedit&sub=' . $content['sub'] . '&act=' . $data['action'] . '&w=' . $data['what'] . '&tid=' . ($data['sort']-1) . '&fid=' . $data['sort'] . '%}">{--HIGHER--}</a>|<a href="{%url=modules.php?module=admin&what=adminedit&sub=' . $content['sub'] . '&act=' . $data['action'] . '&w=' . $data['what'] . '&tid=' . ($data['sort']+1) . '&fid=' . $data['sort'] . '%}">{--LOWER--}</a>';
+ $content['navi'] = '<a href="{%url=modules.php?module=admin&what=adminedit&sub=' . $content['sub'] . '&act=' . $content['action'] . '&w=' . $content['what'] . '&tid=' . ($content['sort']-1) . '&fid=' . $content['sort'] . '%}">{--HIGHER--}</a>|<a href="{%url=modules.php?module=admin&what=adminedit&sub=' . $content['sub'] . '&act=' . $content['action'] . '&w=' . $content['what'] . '&tid=' . ($content['sort']+1) . '&fid=' . $content['sort'] . '%}">{--LOWER--}</a>';
}
- // Add more data to $data
- $data['mode'] = 'admin';
+ // Add more data to $content
+ $content['mode'] = 'admin';
// Load row template and switch colors
- $OUT .= loadTemplate('admin_menu_overview_row', true, $data);
+ $OUT .= loadTemplate('admin_menu_overview_row', true, $content);
} // END - switch
// Remember all rows
array(bigintval($sel)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Entry found so we load the stuff...
- $DATA = SQL_FETCHARRAY($result);
+ $content = SQL_FETCHARRAY($result);
// Prepapre content
- $DATA = array(
- 'cnt' => $count,
+ $content = array(
+ 'count' => $count,
'sel' => $sel,
- 'action' => adminAddMenuSelectionBox('guest', 'action', 'sel_action[' . $sel . ']', $DATA['action']),
- 'what' => adminAddMenuSelectionBox('guest', 'what' , 'sel_what[' . $sel . ']', $DATA['what']),
- 'menu' => $DATA['title'],
+ 'action' => adminAddMenuSelectionBox('guest', 'action', 'sel_action[' . $sel . ']', $content['action']),
+ 'what' => adminAddMenuSelectionBox('guest', 'what' , 'sel_what[' . $sel . ']', $content['what']),
+ 'menu' => $content['title'],
);
// Load row template
- $OUT .= loadTemplate('admin_edit_guest_menu_row', true, $DATA);
+ $OUT .= loadTemplate('admin_edit_guest_menu_row', true, $content);
} else {
// Entry not found
- $DATA = array(
+ $content = array(
'sel' => $sel
);
- $OUT .= loadTemplate('admin_menu_404_row', true, $DATA);
+ $OUT .= loadTemplate('admin_menu_404_row', true, $content);
}
// Free result and switch color
} // END - foreach
$content['rows'] = $OUT;
- $content['cnt'] = $count;
+ $content['count'] = $count;
// Load template
loadTemplate('admin_edit_guest_menu_form', false, $content);
array(bigintval($sel)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Entry found so we load the stuff...
- $DATA = SQL_FETCHARRAY($result);
- $DATA = array(
- 'cnt' => $count,
- 'menu' => $DATA['title'],
- 'sel' => $sel,
+ $content = SQL_FETCHARRAY($result);
+ $content = array(
+ 'count' => $count,
+ 'menu' => $content['title'],
+ 'sel' => $sel,
);
- $OUT .= loadTemplate('admin_delete_guest_menu_row', true, $DATA);
+ $OUT .= loadTemplate('admin_delete_guest_menu_row', true, $content);
} else {
// Entry not found?
- $DATA = array(
+ $content = array(
'sel' => $sel
);
- $OUT .= loadTemplate('admin_menu_404_row', true, $DATA);
+ $OUT .= loadTemplate('admin_menu_404_row', true, $content);
}
SQL_FREERESULT($result);
} // END - if
} // END - foreach
$content['rows'] = $OUT;
- $content['cnt'] = $count;
+ $content['count'] = $count;
// Load template
loadTemplate('admin_delete_guest_menu', false, $content);
array(bigintval($sel)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Entry found so we load the stuff...
- $data = SQL_FETCHARRAY($result);
- $data = array(
- 'cnt' => $count,
- 'menu' => $data['title'],
+ $content = SQL_FETCHARRAY($result);
+ $content = array(
+ 'count' => $count,
+ 'menu' => $content['title'],
'sel' => $sel,
- 'visible' => addSelectionBox('yn', $data['visible'], 'visible', $sel),
- 'locked' => addSelectionBox('yn', $data['locked'] , 'locked' , $sel),
+ 'visible' => addSelectionBox('yn', $content['visible'], 'visible', $sel),
+ 'locked' => addSelectionBox('yn', $content['locked'] , 'locked' , $sel),
);
// Load template
- $OUT .= loadTemplate('admin_menu_status_row', true, $data);
+ $OUT .= loadTemplate('admin_menu_status_row', true, $content);
} else {
// Entry not found?
- $data = array(
+ $content = array(
'sel' => $sel
);
- $OUT .= loadTemplate('admin_menu_404_row', true, $data);
+ $OUT .= loadTemplate('admin_menu_404_row', true, $content);
}
SQL_FREERESULT($result);
} // END - if
} // END - foreach
- $content['cnt'] = $count;
+ $content['count'] = $count;
$content['rows'] = $OUT;
// Load template
$OUT = '';
// Process all menu entries
- while ($data = SQL_FETCHARRAY($result)) {
+ while ($content = SQL_FETCHARRAY($result)) {
$count++;
- if (($data['sort'] == '0') || (($data['sort'] == 1) && (!empty($subMenu)))) {
+ if (($content['sort'] == '0') || (($content['sort'] == 1) && (!empty($subMenu)))) {
// Is highest position
- $NAVI = '<a href="{%url=modules.php?module=admin&what=guestedit&sub=' . $content['sub'] . '&act=' . $data['action'] . '&w=' . $data['what'] . '&tid=' . ($data['sort']+1) . '&fid=' . $data['sort'] . '%}">{--LOWER--}</a>';
+ $NAVI = '<a href="{%url=modules.php?module=admin&what=guestedit&sub=' . $content['sub'] . '&act=' . $content['action'] . '&w=' . $content['what'] . '&tid=' . ($content['sort']+1) . '&fid=' . $content['sort'] . '%}">{--LOWER--}</a>';
} elseif ($count == SQL_NUMROWS($result)) {
// Is lowest position
- $NAVI = '<a href="{%url=modules.php?module=admin&what=guestedit&sub=' . $content['sub'] . '&act=' . $data['action'] . '&w=' . $data['what'] . '&tid=' . ($data['sort']-1) . '&fid=' . $data['sort'] . '%}">{--HIGHER--}</a>';
- } elseif ($data['sort'] > 0) {
+ $NAVI = '<a href="{%url=modules.php?module=admin&what=guestedit&sub=' . $content['sub'] . '&act=' . $content['action'] . '&w=' . $content['what'] . '&tid=' . ($content['sort']-1) . '&fid=' . $content['sort'] . '%}">{--HIGHER--}</a>';
+ } elseif ($content['sort'] > 0) {
// Anything else between highest and lowest
- $NAVI = '<a href="{%url=modules.php?module=admin&what=guestedit&sub=' . $content['sub'] . '&act=' . $data['action'] . '&w=' . $data['what'] . '&tid=' . ($data['sort']-1) . '&fid=' . $data['sort'] . '%}">{--HIGHER--}</a>|<a href=\"{%url=modules.php?module=admin&what=guestedit&sub=' . $content['sub'] . '&act=' . $data['action'] . '&w=' . $data['what'] . '&tid=' . ($data['sort']+1) . '&fid=' . $data['sort'] . '%}">{--LOWER--}</a>';
+ $NAVI = '<a href="{%url=modules.php?module=admin&what=guestedit&sub=' . $content['sub'] . '&act=' . $content['action'] . '&w=' . $content['what'] . '&tid=' . ($content['sort']-1) . '&fid=' . $content['sort'] . '%}">{--HIGHER--}</a>|<a href=\"{%url=modules.php?module=admin&what=guestedit&sub=' . $content['sub'] . '&act=' . $content['action'] . '&w=' . $content['what'] . '&tid=' . ($content['sort']+1) . '&fid=' . $content['sort'] . '%}">{--LOWER--}</a>';
}
// Prepapre content
- $row = array(
- 'id' => $data['id'],
- 'action' => $data['action'],
- 'what' => $data['what'],
- 'title' => $data['title'],
+ $content = array(
+ 'id' => $content['id'],
+ 'action' => $content['action'],
+ 'what' => $content['what'],
+ 'title' => $content['title'],
'navi' => $NAVI,
'mode' => 'guest'
);
// Load row template
- $OUT .= loadTemplate('admin_menu_overview_row', true, $row);
+ $OUT .= loadTemplate('admin_menu_overview_row', true, $content);
} // END - while
// Add rows
// Add lock reason?
if (isExtensionInstalledAndNewer('user', '0.3.5')) {
// Add them...
- $MORE .= ", UNIX_TIMESTAMP(`lock_timestamp`) AS `lock_timestamp`";
+ $MORE .= ', UNIX_TIMESTAMP(`lock_timestamp`) AS `lock_timestamp`';
} // END - if
// Is the extension 'country' installed?
if (isExtensionActive('country')) {
// Add country code
- $MORE .= ", `country_code`";
+ $MORE .= ', `country_code`';
} else {
// Add direct value
- $MORE .= ", `country`";
+ $MORE .= ', `country`';
}
// Init unset data
$content = SQL_FETCHARRAY($result_user);
// Get count/sum of refs, selected categories, unconfirmed mails
- $content['refs'] = countSumTotalData($userid, 'refsystem' , 'counter');
- $content['cats'] = countSumTotalData($userid, 'user_cats' , 'id', 'userid', true);
- $content['links'] = countSumTotalData($userid, 'user_links', 'id', 'userid', true);
+ $content['refs'] = countSumTotalData($userid, 'refsystem', 'counter');
+ $content['cats'] = countSumTotalData($userid, 'user_cats', 'id', 'userid', true);
+ $content['links'] = getTotalUnconfirmedMails($userid);
// Add links to the numbers
if ($content['links'] > 0) $content['links'] = $base . '&what=list_links&userid=' . $userid . '%}">' . $content['links'] . '</a>]';
// Is this above zero?
if ($stamp > 0) {
// Then use it
- $content['birthday'] = generateDateTime($stamp, 3);
+ $content['birthday'] = generateDateTime($stamp, '3');
} else {
// Zero or below so set zero!
- $content['birthday'] = generateDateTime(0, 3);
+ $content['birthday'] = generateDateTime(0, '3');
}
// Prepare data for template
$content['email_link'] = generateEmailLink($content['email'], 'user_data');
- $content['last_online'] = generateDateTime($content['last_online'], 0);
- $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['last_online'] = generateDateTime($content['last_online'], '0');
+ $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_points'] = getTotalPoints($content['userid']);
$content['locked_points'] = countSumTotalData($content['userid'], 'user_points', 'locked_points') + countSumTotalData($content['userid'], 'user_points', 'locked_order_points');
$data = runFilterChain('get_own_points', $data);
// Add more data
- $content['own_points'] = $data['points'];
- $content['lock_timestamp'] = generateDateTime($content['lock_timestamp'], 2);
+ $content['own_points'] = $data['points'];
+ $content['lock_timestamp'] = generateDateTime($content['lock_timestamp'], 2);
// Link to email_details if some are sent
if ($content['emails_sent'] > 0) {
$content = merge_array($content, $templateContent);
// Get number of unconfirmed mails
- $content['links'] = countSumTotalData($content['userid'], 'user_links', 'id', 'userid', true);
+ $content['links'] = getTotalUnconfirmedMails($content['userid']);
if ($content['links'] > 0) {
$content['links'] = $base . '&what=list_links&userid=' . $content['userid'] . '%}">{%pipe,translateComma=' . $content['links'] . '%}</a>]';
} // END - if
$content['emails_sent'] = $base . '&what=email_details&userid=' . $content['userid'] . '%}">{%pipe,translateComma=' . $content['emails_sent'] . '%}</a>]';
} // END - if
- // Clickrate
- $content['rate'] = '0';
+ // Click rate
+ $content['click_rate'] = '0';
if ($content['emails_received'] > 0) {
- $content['rate'] = $content['mails_confirmed'] / $content['emails_received'] * 100;
+ $content['click_rate'] = $content['mails_confirmed'] / $content['emails_received'] * 100;
} // END - if
// Transfer data to array
array(bigintval($sel)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Entry found so we load the stuff...
- $data = SQL_FETCHARRAY($result);
- $data = array(
- 'cnt' => $count,
+ $content = SQL_FETCHARRAY($result);
+ $content = array(
+ 'count' => $count,
'sel' => $sel,
- 'menu' => $data['title'],
- 'action' => adminAddMenuSelectionBox('member', 'action', 'sel_action[' . $sel . ']', $data['action']),
- 'what' => adminAddMenuSelectionBox('member', 'what' , 'sel_what[' . $sel . ']', $data['what']),
+ 'menu' => $content['title'],
+ 'action' => adminAddMenuSelectionBox('member', 'action', 'sel_action[' . $sel . ']', $content['action']),
+ 'what' => adminAddMenuSelectionBox('member', 'what' , 'sel_what[' . $sel . ']', $content['what']),
);
// Load template
- $OUT .= loadTemplate('admin_edit_member_menu_row', true, $data);
+ $OUT .= loadTemplate('admin_edit_member_menu_row', true, $content);
} else {
// Entry not found?
- $data = array(
+ $content = array(
'sel' => $sel
);
// Load template
- $OUT .= loadTemplate('admin_menu_404_row', true, $data);
+ $OUT .= loadTemplate('admin_menu_404_row', true, $content);
}
SQL_FREERESULT($result);
} // END - if
// Add row content and current counter
$content['rows'] = $OUT;
- $content['cnt'] = $count;
+ $content['count'] = $count;
// Load template
loadTemplate('admin_edit_member_menu', false, $content);
// Entry found so we load the stuff...
list($title) = SQL_FETCHROW($result);
$content = array(
- 'cnt' => $count,
+ 'count' => $count,
'sel' => $sel,
'title' => $title
);
} // END - if
} // END - foreach
$content['rows'] = $OUT;
- $content['cnt'] = $count;
+ $content['count'] = $count;
// Load template
loadTemplate('admin_delete_member_menu', false, $content);
array(bigintval($sel)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Entry found so we load the stuff...
- $data = SQL_FETCHARRAY($result);
- $data = array(
- 'cnt' => $count,
- 'menu' => $data['title'],
+ $content = SQL_FETCHARRAY($result);
+ $content = array(
+ 'count' => $count,
+ 'menu' => $content['title'],
'sel' => $sel,
- 'visible' => addSelectionBox('yn', $data['visible'], 'visible', $sel),
- 'locked' => addSelectionBox('yn', $data['locked'] , 'locked' , $sel),
+ 'visible' => addSelectionBox('yn', $content['visible'], 'visible', $sel),
+ 'locked' => addSelectionBox('yn', $content['locked'] , 'locked' , $sel),
);
// Load template
- $OUT .= loadTemplate('admin_menu_status_row', true, $data);
+ $OUT .= loadTemplate('admin_menu_status_row', true, $content);
} else {
// Entry not found?
- $data = array(
+ $content = array(
'sel' => $sel
);
// Load template
- $OUT .= loadTemplate('admin_menu_404_row', true, $data);
+ $OUT .= loadTemplate('admin_menu_404_row', true, $content);
}
SQL_FREERESULT($result);
} // END - if
} // END - foreach
$content['rows'] = $OUT;
- $content['cnt'] = $count;
+ $content['count'] = $count;
// Load template
loadTemplate('admin_member_menu_status', false, $content);
$content['sub'] = $subMenu;
$count = '0'; $OUT = '';
- while ($data = SQL_FETCHARRAY($result)) {
+ while ($content = SQL_FETCHARRAY($result)) {
// Init navigation
- $data['navi'] = '';
+ $content['navi'] = '';
$count++;
- if (($data['sort'] == '0') || (($data['sort'] == 1) && (!empty($subMenu)))) {
+ if (($content['sort'] == '0') || (($content['sort'] == 1) && (!empty($subMenu)))) {
// Is highest position
- $data['navi'] = '<a href="{%url=modules.php?module=admin&what=memedit&sub=' . $content['sub'] . '&act=' . $data['action'] . '&w=' . $data['what'] . '&tid=' . ($data['sort']+1) . '&fid=' . $data['sort'] . '%}">{--LOWER--}</a>';
+ $content['navi'] = '<a href="{%url=modules.php?module=admin&what=memedit&sub=' . $content['sub'] . '&act=' . $content['action'] . '&w=' . $content['what'] . '&tid=' . ($content['sort']+1) . '&fid=' . $content['sort'] . '%}">{--LOWER--}</a>';
} elseif ($count == SQL_NUMROWS($result)) {
// Is lowest position
- $data['navi'] = '<a href="{%url=modules.php?module=admin&what=memedit&sub=' . $content['sub'] . '&act=' . $data['action'] . '&w=' . $data['what'] . '&tid=' . ($data['sort']-1) . '&fid=' . $data['sort'] . '%}">{--HIGHER--}</a>';
- } elseif ($data['sort'] > 0) {
+ $content['navi'] = '<a href="{%url=modules.php?module=admin&what=memedit&sub=' . $content['sub'] . '&act=' . $content['action'] . '&w=' . $content['what'] . '&tid=' . ($content['sort']-1) . '&fid=' . $content['sort'] . '%}">{--HIGHER--}</a>';
+ } elseif ($content['sort'] > 0) {
// Anything else between highest and lowest
- $data['navi'] = '<a href="{%url=modules.php?module=admin&what=memedit&sub=' . $content['sub'] . '&act=' . $data['action'] . '&w=' . $data['what'] . '&tid=' . ($data['sort']-1) . '&fid=' . $data['sort'] . '%}">{--HIGHER--}</a>|<a href="{%url=modules.php?module=admin&what=memedit&sub=' . $content['sub'] . '&act=' . $data['action'] . '&w=' . $data['what'] . '&tid=' . ($data['sort']+1) . '&fid=' . $data['sort'] . '%}">{--LOWER--}</a>';
+ $content['navi'] = '<a href="{%url=modules.php?module=admin&what=memedit&sub=' . $content['sub'] . '&act=' . $content['action'] . '&w=' . $content['what'] . '&tid=' . ($content['sort']-1) . '&fid=' . $content['sort'] . '%}">{--HIGHER--}</a>|<a href="{%url=modules.php?module=admin&what=memedit&sub=' . $content['sub'] . '&act=' . $content['action'] . '&w=' . $content['what'] . '&tid=' . ($content['sort']+1) . '&fid=' . $content['sort'] . '%}">{--LOWER--}</a>';
}
// Add more entries
- $data['mode'] = 'mem';
+ $content['mode'] = 'mem';
// Load row template and switch color
- $OUT .= loadTemplate('admin_menu_overview_row', true, $data);
+ $OUT .= loadTemplate('admin_menu_overview_row', true, $content);
} // END - while
// Free memory
'm_descr' => $GLOBALS['month_descr'][$month],
'r_class' => $r,
'r2_class' => $r2,
- 'cnt' => $count
+ 'count' => $count
);
// Load row template
foreach ($cat_cnt as $id => $count) {
// Prepare data for the template
$data = array(
- 'cat' => $cats[$id],
- 'cnt' => $count,
+ 'cat' => $cats[$id],
+ 'count' => $count,
);
// Load row template and switch colors
while ($content = SQL_FETCHARRAY($result)) {
// Prepare data for template
$content = array(
- 'cnt' => $count,
+ 'count' => $count,
'userid' => $content['userid'],
'last_online' => generateDateTime($content['last_online'], '3'),
);
$OUT = ''; $count = 1;
while ($content = SQL_FETCHARRAY($result)) {
// Prepare data for template
- $content['cnt'] = $count;
+ $content['count'] = $count;
$content['last_online'] = generateDateTime($content['last_online'], '3');
// Load row template
while ($content = SQL_FETCHARRAY($result)) {
// Prepare data for template
$content = array(
- 'cnt' => $count,
+ 'count' => $count,
'userid' => $content['userid'],
'refs' => $content['refs'],
'last_online' => generateDateTime($content['last_online'], '3')
$count = 1;
while ($content = SQL_FETCHARRAY($result)) {
// Prepare data for the template
- $content['cnt'] = $count;
- $content['last_online'] = generateDateTime($content['last_online'], 2);
+ $content['count'] = $count;
+ $content['last_online'] = generateDateTime($content['last_online'], '2');
// Load row template
$OUT .= loadTemplate('member_list_beg_row', true, $content);
$count = 1;
while ($content = SQL_FETCHARRAY($result)) {
// Prepare data for the template
- $content['cnt'] = $count;
- $content['last_online'] = generateDateTime($content['last_online'], 2);
+ $content['count'] = $count;
+ $content['last_online'] = generateDateTime($content['last_online'], '2');
// Load row template
$OUT .= loadTemplate('member_bonus_row', true, $content);
$url = ''; $id = '0';
// Count unconfirmed mails
-$links = countSumTotalData(getMemberId(), 'user_links', 'id', 'userid', true);
+$links = getTotalUnconfirmedMails(getMemberId());
$ALLOWED = getUserData('receive_mails') - getUserData('mail_orders');
if (getConfig('order_max_full') == 'MAX') $ALLOWED = getUserData('receive_mails');
$row['points'] = getTotalPoints($row['refid']);
// Get unconfirmed mails
- $row['unconfirmed'] = countSumTotalData($row['refid'], 'user_links', 'id', 'userid', true);
+ $row['unconfirmed'] = getTotalUnconfirmedMails($row['refid']);
// Init click rate with zero
$row['click_rate'] = '0';
return $numRows;
}
+// Wrapper "getter" to get total unconfirmed mails for given userid
+function getTotalUnconfirmedMails ($userid) {
+ // Do we have cache?
+ if (!isset($GLOBALS[__FUNCTION__][$userid])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__][$userid] = countSumTotalData($userid, 'user_links', 'id', 'userid', true);
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__][$userid];
+}
+
//-----------------------------------------------------------------------------
// Configuration wrapper
//-----------------------------------------------------------------------------
<tr>
<td colspan="2" class="table_footer">
<input type="hidden" name="ok" value="delete" />
- <input type="hidden" name="chk" value="$content[chk]_$content[cnt]" />
+ <input type="hidden" name="chk" value="$content[chk]_$content[count]" />
<input type="submit" class="form_delete submit" name="submit" value="{--DEL_ENTRIES--}" />
</td>
</tr>
<tr>
<td class="{%template,ColorSwitch%} bottom" align="right">
- $content[cnt]. {--ADMIN_ENTRY_DELETE--}:
+ {%pipe,translateComma=$content[count]%}. {--ADMIN_ENTRY_DELETE--}:
</td>
<td class="{%template,ColorSwitch%} bottom">
$content[menu]
<tr>
<td colspan="2" class="table_footer">
<input type="hidden" name="ok" value="delete" />
- <input type="hidden" name="chk" value="$content[chk]_$content[cnt]" />
+ <input type="hidden" name="chk" value="$content[chk]_$content[count]" />
<input type="submit" class="form_delete" name="submit" value="{--DEL_ENTRIES--}" />
</td>
</tr>
<tr>
<td class="bottom {%template,ColorSwitch%}" align="right">
- $content[cnt]. {--ADMIN_ENTRY_DELETE--}:
+ {%pipe,translateComma=$content[count]%}. {--ADMIN_ENTRY_DELETE--}:
</td>
<td class="bottom {%template,ColorSwitch%}">
$content[menu]
<tr>
<td colspan="2" class="table_footer">
<input type="hidden" name="ok" value="delete" />
- <input type="hidden" name="chk" value="$content[chk]_$content[cnt]" />
+ <input type="hidden" name="chk" value="$content[chk]_$content[count]" />
<input type="submit" class="form_delete" name="submit" value="{--DEL_ENTRIES--}" />
</td>
</tr>
<tr>
<td align="right">
- $content[cnt]. {--ADMIN_ENTRY_DELETE--}:
+ {%pipe,translateComma=$content[count]%}. {--ADMIN_ENTRY_DELETE--}:
</td>
<td>
$content[title] <input type="hidden" name="sel[$content[sel]]" value="1" />
<tr>
<td colspan="2" class="table_footer">
<input type="hidden" name="ok" value="edit" />
- <input type="hidden" name="chk" value="$content[chk]_$content[cnt]" />
+ <input type="hidden" name="chk" value="$content[chk]_$content[count]" />
<input type="reset" class="form_reset" value="{--CLEAR_FORM--}" />
<input type="submit" class="form_submit" name="submit" value="{--SUBMIT_CHANGES--}" />
</td>
<tr>
<td colspan="2" class="form_submit {%template,ColorSwitch%}">
- $content[cnt]. {--ADMIN_ENTRY_MODIFY--}:
+ {%pipe,translateComma=$content[count]%}. {--ADMIN_ENTRY_MODIFY--}:
</td>
</tr>
<tr>
<tr>
<td class="table_footer" colspan="2">
<input type="hidden" name="ok" value="edit" />
- <input type="hidden" name="chk" value="$content[chk]_$content[cnt]" />
+ <input type="hidden" name="chk" value="$content[chk]_$content[count]" />
<input type="reset" class="form_reset" value="{--CLEAR_FORM--}" />
<input type="submit" class="form_submit" name="submit" value="{--SUBMIT_CHANGES--}" />
</td>
<tr>
<td colspan="2" class="form_submit {%template,ColorSwitch%}">
- $content[cnt]. {--ADMIN_ENTRY_MODIFY--}:
+ {%pipe,translateComma=$content[count]%}. {--ADMIN_ENTRY_MODIFY--}:
</td>
</tr>
<tr>
<tr>
<td align="center" colspan="2" class="table_footer">
<input type="hidden" name="ok" value="edit" />
- <input type="hidden" name="chk" value="$content[chk]_$content[cnt]" />
+ <input type="hidden" name="chk" value="$content[chk]_$content[count]" />
<input type="reset" class="form_reset" value="{--CLEAR_FORM--}" />
<input type="submit" class="form_submit" name="submit" value="{--SUBMIT_CHANGES--}" />
</td>
<tr>
<td class="{%template,ColorSwitch%}" colspan="2">
- $content[cnt]. {--ADMIN_ENTRY_MODIFY--}:
+ {%pipe,translateComma=$content[count]%}. {--ADMIN_ENTRY_MODIFY--}:
</td>
</tr>
<tr>
<tr>
<td colspan="4" align="center" class="table_footer">
<input type="hidden" name="ok" value="status" />
- <input type="hidden" name="chk" value="$content[chk]_$content[cnt]" />
+ <input type="hidden" name="chk" value="$content[chk]_$content[count]" />
<input type="reset" class="form_reset" value="{--UNDO_SELECTIONS--}" />
<input type="submit" class="form_submit" name="submit" value="{--ADMIN_CHANGE_ENTRIES--}" />
</td>
<tr>
<td align="center" class="right {%template,ColorSwitch%} bottom">{%pipe,getTotalPoints,translateComma=$content[userid]%} {?POINTS?}</td>
<td align="center" class="right {%template,ColorSwitch%} bottom">$content[emails_sent]</td>
- <td align="center" class="right {%template,ColorSwitch%} bottom">{%pipe,translateComma=$content[rate]%}%</td>
+ <td align="center" class="right {%template,ColorSwitch%} bottom">{%pipe,translateComma=$content[click_rate]%}%</td>
<td align="center" class="right {%template,ColorSwitch%} bottom">{%pipe,translateComma=$content[locked_points]%} {?POINTS?}</td>
<td align="center" class="{%template,ColorSwitch%} bottom">$content[refs]</td>
</tr>
<tr>
<td colspan="4" align="center" height="40" class="table_footer">
<input type="hidden" name="ok" value="status" />
- <input type="hidden" name="chk" value="$content[chk]_$content[cnt]" />
+ <input type="hidden" name="chk" value="$content[chk]_$content[count]" />
<input type="reset" class="form_reset" value="{--UNDO_SELECTIONS--}" />
<input type="submit" class="form_submit" name="submit" value="{--ADMIN_CHANGE_ENTRIES--}" />
</td>
<tr>
<td width="25%" align="right" class="{%template,ColorSwitch%} bottom">
- $content[cnt]. {--ADMIN_ENTRY_MODIFY--}:
+ {%pipe,translateComma=$content[count]%}. {--ADMIN_ENTRY_MODIFY--}:
</td>
<td width="25%" class="{%template,ColorSwitch%} bottom">
$content[menu]
<tr>
<td class="{%template,ColorSwitch%} guest_stats_l bottom" colspan="3">$content[cat]</td>
- <td class="{%template,ColorSwitch%} guest_stats_r bottom">$content[cnt]</td>
+ <td class="{%template,ColorSwitch%} guest_stats_r bottom">{%pipe,translateComma=$content[count]%}</td>
</tr>
</tr>
<tr>
<td class="guest_stats_l bottom">{--USERS_TOTAL--}:</td>
- <td class="guest_stats_r bottom right">$content[total_users]</td>
+ <td class="guest_stats_r bottom right">{%pipe,translateComma=$content[total_users]%}</td>
<td class="guest_stats_l bottom">{--UNCONFIRMED_USERIDS--}:</td>
- <td class="guest_stats_r bottom">$content[unconfirmed]</td>
+ <td class="guest_stats_r bottom">{%pipe,translateComma=$content[unconfirmed]%}</td>
</tr>
<tr>
<td class="guest_stats_l bottom">{--GUEST_STATS_MALES--}:</td>
- <td class="guest_stats_r bottom right">$content[total_males]</td>
+ <td class="guest_stats_r bottom right">{%pipe,translateComma=$content[total_males]%}</td>
<td class="guest_stats_l bottom">{--GUEST_STATS_FEMALES--}:</td>
- <td class="guest_stats_r bottom">$content[total_females]</td>
+ <td class="guest_stats_r bottom">{%pipe,translateComma=$content[total_females]%}</td>
</tr>
<!--
@TODO We have to fix these counters.
<tr>
<td class="guest_stats_l bottom">{--GUEST_STATS_TONLINE--}:</td>
- <td class="guest_stats_r bottom right">$content[tmem_count]</td>
+ <td class="guest_stats_r bottom right">{%pipe,translateComma=$content[tmem_count]%}</td>
<td class="guest_stats_l bottom">{--GUEST_STATS_YONLINE--}:</td>
- <td class="guest_stats_r bottom">$content[ymem_count]</td>
+ <td class="guest_stats_r bottom">{%pipe,translateComma=$content[ymem_count]%}</td>
</tr>
//-->
<tr>
<td class="guest_stats_l bottom">{--GUEST_STATS_TREGISTER--}:</td>
- <td class="guest_stats_r bottom right">$content[treg_count]</td>
+ <td class="guest_stats_r bottom right">{%pipe,translateComma=$content[treg_count]%}</td>
<td class="guest_stats_l bottom">{--GUEST_STATS_YREGISTER--}:</td>
- <td class="guest_stats_r bottom">$content[yreg_count]</td>
+ <td class="guest_stats_r bottom">{%pipe,translateComma=$content[yreg_count]%}</td>
</tr>
<tr>
<td align="center" class="table_header bottom" colspan="4">
<!-- VORSICHT----! KEINE <tr> UND </tr> HIER EINSETZEN----! //-->
-<td class="guest_stats_$content[l_class] bottom">$content[m_descr]:</td>
-<td class="guest_stats_$content[r_class] bottom$content[r2_class]">$content[cnt]</td>
+<td class="guest_stats_$content[l_class] bottom">
+ $content[m_descr]:
+</td>
+<td class="guest_stats_$content[r_class] bottom$content[r2_class]">
+ {%pipe,translateComma=$content[count]%}
+</td>
<tr>
<td class="{%template,ColorSwitch%} bottom right" align="right" width="250">$content[title]</td>
- <td class="{%template,ColorSwitch%} bottom" width="50">$content[counter]</td>
+ <td class="{%template,ColorSwitch%} bottom" width="50">{%pipe,translateComma=$content[counter]%}</td>
</tr>
<tr>
- <td class="top10_row1 {%template,ColorSwitch%} bottom right" align="center">$content[cnt]</td>
+ <td class="top10_row1 {%template,ColorSwitch%} bottom right" align="center">{%pipe,translateComma=$content[count]%}</td>
<td class="top10_row2 {%template,ColorSwitch%} bottom right">$content[userid] ({%user,nickname,fixEmptyContentToDashes=$content[userid]%})</td>
<td class="top10_row3 {%template,ColorSwitch%} bottom right">{%pipe,translateComma=$content[points]%}</td>
<td class="top10_row5 {%template,ColorSwitch%} bottom">$content[last_online]</td>
<tr>
- <td class="top10_row1 {%template,ColorSwitch%} bottom right" align="center">$content[cnt]</td>
+ <td class="top10_row1 {%template,ColorSwitch%} bottom right" align="center">{%pipe,translateComma=$content[count]%}</td>
<td class="top10_row2 {%template,ColorSwitch%} bottom right">$content[userid] ({%user,nickname,fixEmptyContentToDashes=$content[userid]%})</td>
<td class="top10_row3 {%template,ColorSwitch%} bottom right">{%user,total_logins,translateComma=$content[userid]%}</td>
<td class="top10_row4 {%template,ColorSwitch%} bottom right">{%pipe,getTotalPoints,translateComma=$content[userid]%}</td>
<tr>
- <td class="top10_row1 {%template,ColorSwitch%} bottom right" align="center">$content[cnt]</td>
+ <td class="top10_row1 {%template,ColorSwitch%} bottom right" align="center">{%pipe,translateComma=$content[count]%}</td>
<td class="top10_row2 {%template,ColorSwitch%} bottom right">$content[userid] ({%user,nickname,fixEmptyContentToDashes=$content[userid]%})</td>
<td class="top10_row3 {%template,ColorSwitch%} bottom right">{%pipe,translateComma=$content[refs]%}</td>
<td class="top10_row4 {%template,ColorSwitch%} bottom right">{%pipe,getTotalPoints,translateComma=$content[userid]%}</td>
<tr>
- <td align="center" class="{%template,ColorSwitch%} bottom">$content[cnt]</td>
+ <td align="center" class="{%template,ColorSwitch%} bottom">{%pipe,translateComma=$content[count]%}</td>
<td align="center" class="{%template,ColorSwitch%} bottom">$content[userid]</td>
<td align="center" class="{%template,ColorSwitch%} bottom">{%pipe,translateComma=$content[points]%}</td>
<td align="center" class="{%template,ColorSwitch%} bottom">$content[last_online]</td>
<tr>
<td align="center" class="{%template,ColorSwitch%} bottom">
- $content[cnt]
+ {%pipe,translateComma=$content[count]%}
</td>
<td align="center" class="{%template,ColorSwitch%} bottom">
$content[userid]
<div align="center">
<table border="0" cellspacing="0" cellpadding="0" width="400" class="table dashed">
<tr>
- <td align="right" height="40" class="register_left">
- <strong>{--MAX_PER_DAY--}:</strong>
+ <td align="right" height="40" class="register_left" style="margin-right:3px">
+ {--MAX_PER_DAY--}:
</td>
<td class="register_right">
<select name="max_mails" size="1" class="form_select">