]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-bonus.php
More wrapper functions used, removed bigintval() which caused a lot trouble
[mailer.git] / inc / modules / member / what-bonus.php
index 0125ce192d1327cb17828e55d3e1386545f476cf..7d878dc980dc56eb764db84f49ab90b452734a8b 100644 (file)
@@ -14,8 +14,6 @@
  * $Date::                                                            $ *
  * $Tag:: 0.2.1-FINAL                                                 $ *
  * $Author::                                                          $ *
- * Needs to be in all Files and every File needs "svn propset           *
- * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
  * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
@@ -71,8 +69,7 @@ if (isExtensionInstalledAndNewer('bonus', '0.6.9')) {
 $lastOnline = '%s'; $ONLINE = '';
 if (isExtensionActive('autopurge')) {
        // Use last online timestamp to keep inactive members away from here
-       $lastOnline   = " AND `last_online` >= (UNIX_TIMESTAMP() - %s)";
-       $ONLINE = getConfig('ap_inactive_since');
+       $lastOnline   = " AND `last_online` >= (UNIX_TIMESTAMP() - {?ap_inactive_since?})";
 } // END - if
 
 // Let's check if there are some points left we can 'pay'...
@@ -95,24 +92,19 @@ LIMIT {?bonus_ranks?}",
 
 // Reset temporary variable and check for users
 $OUT = '';
-if (SQL_NUMROWS($result) > 0) {
+if (!SQL_HASZERONUMS($result)) {
        // Load our winners...
-       $SW = 2; $cnt = 1;
+       $cnt = 1;
        while ($content = SQL_FETCHARRAY($result)) {
                // Prepare data for the template
-               $content = array(
-                       'sw'          => $SW,
-                       'cnt'         => $cnt,
-                       'userid'      => $content['userid'],
-                       'points'      => $content['points'],
-                       'last_online' => generateDateTime($content['last_online'], 2)
-               );
+               $content['cnt']         = $cnt;
+               $content['last_online'] = generateDateTime($content['last_online'], 2);
 
                // Load row template
                $OUT .= loadTemplate('member_bonus_row', true, $content);
 
-               // Count one up and switch colors
-               $cnt++; $SW = 3 - $SW;
+               // Count one up
+               $cnt++;
        } // END - while
 } else {
        // No one is interested in our "active rallye" ! :-(