if (SQL_NUMROWS($result) > 0) {
// List entries
$OUT = ""; $SW = 2;
- while (list($uid, $rid, $points, $time) = SQL_FETCHROW($result)) {
+ while ($content = SQL_FETCHARRAY($result)) {
+ // Rewrite userid/refid only if admin is in
if (IS_ADMIN()) {
// Set links to admin area
- if ($uid > 0) { $uid = ADMIN_USER_PROFILE_LINK($uid); } else { $uid = "---"; }
- if ($rid > 0) { $rid = ADMIN_USER_PROFILE_LINK($rid); } else { $rid = "---"; }
- }
+ if ($content['userid'] > 0) { $content['userid'] = ADMIN_USER_PROFILE_LINK($content['userid']); } else { $content['userid'] = "---"; }
+ if ($content['refid'] > 0) { $content['refid'] = ADMIN_USER_PROFILE_LINK($content['refid']); } else { $content['refid'] = "---"; }
+ } // END - if
// Prepare data for the row template
$content = array(
- 'uid' => $uid,
- 'rid' => $rid,
- 'points' => TRANSLATE_COMMA($points),
- 'stamp' => MAKE_DATETIME($time, $DT_MODE),
+ 'uid' => $content['userid'],
+ 'rid' => $content['refid'],
+ 'points' => TRANSLATE_COMMA($content['points']),
+ 'stamp' => MAKE_DATETIME($content['timemark'], $DT_MODE),
'sw' => $SW,
);