X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fdoubler_functions.php;h=ba8b2902d08c525c4ed4d16c25da045b5e5b4f19;hb=9bc2a494fae1a98f0873a6f3bd8c878b09124b9f;hp=8a455f6ea04a2ff609cc791fa2dd8ed7e390e0e1;hpb=f2aeaab0cd313b2eeb151642455ed558f6b186dc;p=mailer.git diff --git a/inc/libs/doubler_functions.php b/inc/libs/doubler_functions.php index 8a455f6ea0..ba8b2902d0 100644 --- a/inc/libs/doubler_functions.php +++ b/inc/libs/doubler_functions.php @@ -88,14 +88,18 @@ LIMIT %s", if (SQL_NUMROWS($result) > 0) { // List entries - $OUT = ''; $SW = 2; + $OUT = ''; while ($content = SQL_FETCHARRAY($result)) { // Rewrite userid/refid only if admin is in // @TODO Can't this be moved into EL? if (isAdmin()) { + // Set empty userid/refid + $content['userid'] = '---'; + $content['refid'] = '---'; + // Set links to admin area - if (isValidUserId($content['userid'])) { $content['userid'] = generateUserProfileLink($content['userid']); } else { $content['userid'] = '---'; } - if (isValidUserId($content['refid'])) { $content['refid'] = generateUserProfileLink($content['refid']); } else { $content['refid'] = '---'; } + if (isValidUserId($content['userid'])) $content['userid'] = generateUserProfileLink($content['userid']); + if (isValidUserId($content['refid'])) $content['refid'] = generateUserProfileLink($content['refid']); } // END - if // Prepare data for the row template @@ -104,12 +108,10 @@ LIMIT %s", 'rid' => $content['refid'], 'points' => $content['points'], 'timemark' => generateDateTime($content['timemark'], $DT_MODE), - 'sw' => $SW, ); // Load template and switch color $OUT .= loadTemplate($mode . '_doubler_list_rows', true, $content); - $SW = 3 - $SW; } // END - while // Free memory