X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fmember%2Fwhat-reflist.php;h=cc34322a0320c6aa8e00632a17d3b4f01260af2a;hb=34db702d004b245e5528b0ba20c6de441f61820a;hp=6e573f79356028b8351d3706125eaf0d7b46aa83;hpb=d495bd859975d08ee459d03c9b1cd51dd9b9304d;p=mailer.git diff --git a/inc/modules/member/what-reflist.php b/inc/modules/member/what-reflist.php index 6e573f7935..cc34322a03 100644 --- a/inc/modules/member/what-reflist.php +++ b/inc/modules/member/what-reflist.php @@ -1,7 +1,7 @@ 0 -ORDER BY r.level ASC", -array(getMemberId()), __FILE__, __LINE__); +$result = SQL_QUERY('SELECT + `level`, `percents` +FROM + `{?_MYSQL_PREFIX?}_refdepths` +WHERE + `level` > 0 +ORDER BY + `level` ASC', __FILE__, __LINE__); // Are there some entries? (Shall be!) -if (SQL_NUMROWS($result) > 0) { +if (!SQL_HASZERONUMS($result)) { // List all levels $OUT = ''; while ($content = SQL_FETCHARRAY($result)) { // Init variables $rows = ''; $counter = '0'; - $SW = 2; // Check for users ref in this level foreach (getUserReferalPoints(getMemberId(), $content['level']) as $refRow) { // Add/"translate" more content - $refRow['sw'] = $SW; - $refRow['points'] = translateComma($refRow['points']); - $refRow['status'] = translateUserStatus($refRow['status']); - $refRow['unconfirmed'] = translateComma($refRow['unconfirmed']); $refRow['clickrate'] = translateComma($refRow['clickrate'], true, 1); - if (empty($refRow['nickname'])) $refRow['nickname'] = '---'; // Load row template $rows .= loadTemplate('member_ref_list_row', true, $refRow); // Count this ref and switch color $counter++; - $SW = 3 - $SW; } // END - foreach // Remember the content - $content['counter'] = translateComma($counter); + $content['counter'] = $counter; $content['percents'] = translateComma($content['percents'], true, 1); $content['rows'] = $rows; @@ -95,11 +92,11 @@ if (SQL_NUMROWS($result) > 0) { loadTemplate('member_ref_list', false, $OUT); } else { // No entries - loadTemplate('admin_settings_saved', false, getMessage('MEMBER_REFBACK_NO_ENTRIES')); + loadTemplate('admin_settings_saved', false, '{--MEMBER_REFBACK_NO_ENTRIES--}'); } // Free result SQL_FREERESULT($result); -// +// [EOF] ?>