New function isValidUserid() introduced, more rewrites to EL:
[mailer.git] / inc / modules / admin / what-list_bonus.php
index 38c8ee8f842e209b8014d4afa9a08c51825b5a86..021a2e86384e6ea80c4cca1668b48f2d6dd05541 100644 (file)
@@ -78,11 +78,19 @@ if (getConfig('bonus_active') == 'Y') {
        }
 
        // Check if at least one is in the active rallye
-       $result = SQL_QUERY_ESC("SELECT `userid`, `email`, `gender`, `surname`, `family`, ".$USE." AS points, `last_online`
-FROM `{?_MYSQL_PREFIX?}_user_data`
-WHERE `status`='CONFIRMED' AND ".$USE." > 0".$lastOnline."
-ORDER BY `points` DESC, `last_online` DESC, `userid` ASC",
-       array($ONLINE), __FILE__, __LINE__);
+       $result = SQL_QUERY_ESC("SELECT
+       `userid`, `email`, `gender`, `surname`, `family`, ".$USE." AS points, `last_online`
+FROM
+       `{?_MYSQL_PREFIX?}_user_data`
+WHERE
+       `status`='CONFIRMED' AND
+       ".$USE." > 0
+       ".$lastOnline."
+ORDER BY
+       `points` DESC,
+       `last_online` DESC,
+       `userid` ASC",
+               array($ONLINE), __FILE__, __LINE__);
 
        if (SQL_NUMROWS($result) > 0) {
                // List users
@@ -100,10 +108,7 @@ ORDER BY `points` DESC, `last_online` DESC, `userid` ASC",
                        } // END - if
 
                        // Prepare content
-                       $content['userid']      = generateUserProfileLink($content['userid']);
                        $content['email']       = generateEmailLink($content['email'], 'user_data');
-                       $content['gender']      = translateGender($content['gender']);
-                       $content['points']      = translateComma($content['points']);
                        $content['last_online'] = generateDateTime($content['last_online'], 2);
                        $content['sw']     = $SW;
                        $content['win1']   = $WIN1;