X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-list_refs.php;h=0380d171e555c5382ef2c2dc56d0c7010787e4cf;hb=29157685184b9aa2ddbf42e9d2e49141af95f7e2;hp=a763a391b472f96ad04819ec825754d0b76f38aa;hpb=32933a97e4462c232a794fc33bd91f01ff997cb9;p=mailer.git diff --git a/inc/modules/admin/what-list_refs.php b/inc/modules/admin/what-list_refs.php index a763a391b4..0380d171e5 100644 --- a/inc/modules/admin/what-list_refs.php +++ b/inc/modules/admin/what-list_refs.php @@ -73,13 +73,10 @@ ORDER BY `level` ASC", __FILE__, __LINE__); // Are there some levels (VERY BAD IF NONE!) - if (SQL_NUMROWS($result_levels) > 0) { + if (!SQL_HASZERONUMS($result_levels)) { // List all ref levels or entries if no refback is installed - $OUT = ''; $SW = 2; + $OUT = ''; while ($levels = SQL_FETCHARRAY($result_levels)) { - // Insert more data - $levels['sw'] = $SW; - // Is the refback still active? ;-) if (isExtensionActive('refback')) { // Load all refs of this user @@ -88,7 +85,7 @@ ORDER BY //* DEBUG: */ debugOutput($userid.'/'.$levels['level'].'/'.SQL_NUMROWS($result_refs)); // Do we have levels? - if (SQL_NUMROWS($result_refs) > 0) { + if (!SQL_HASZERONUMS($result_refs)) { // Count entries $menge = countSumTotalData($userid, 'user_data', 'userid', 'refid', true); $menge_lck = countSumTotalData($userid, 'user_data', 'userid', 'refid', true, " AND `status` != 'CONFIRMED'"); @@ -97,7 +94,7 @@ ORDER BY $levels['info'] = sprintf(getMessage('ADMIN_USER_TOTAL_REFS'), generateUserProfileLink($userid), $menge, $menge_lck); // Init variables - $OUT_REFS = ''; $SW = 2; + $OUT_REFS = ''; // Load all refs while ($content = SQL_FETCHARRAY($result_refs)) { @@ -109,7 +106,6 @@ ORDER BY // Prepare data for the template // @TODO Try to rewrite some to EL $content = array( - 'sw' => $SW, 'userid' => getUserData('userid'), 'gender' => getUserData('gender'), 'refs_link' => 0, @@ -132,9 +128,6 @@ ORDER BY // Add content $levels['rows'] = $OUT_REFS; - - // Switch colors - $SW = 3 - $SW; } // END - while } else { // Output info message @@ -155,7 +148,6 @@ ORDER BY // Prepare data for the template $content = array( - 'sw' => $SW, 'userid' => $levels['userid'], 'gender' => $levels['gender'], 'refs_link' => 0, @@ -171,9 +163,6 @@ ORDER BY // Load template for level one $OUT .= loadTemplate('admin_list_refs_row', true, $content); - - // Switch colors - $SW = 3 - $SW; } } // END - while @@ -191,10 +180,10 @@ ORDER BY } } elseif (isExtensionActive('refback')) { // No levels found, very bad! - loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NO_REF_LEVELS')); + loadTemplate('admin_settings_saved', false, '{--ADMIN_NO_REFERAL_LEVELS--}'); } else { // No refs made so far - loadTemplate('admin_settings_saved', false, getMessage('USER_REF_404')); + loadTemplate('admin_settings_saved', false, '{--USER_REFERAL_404--}'); } // Free result