]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/bonus_functions.php
Functions renamed
[mailer.git] / inc / libs / bonus_functions.php
index 155196386b1743194dacf46a1c0588440a6c615e..286a79e3ee117ec9ed933d41dad273967c8d1545 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                    *
@@ -150,11 +148,8 @@ function addBonusRanks ($data, $type, $userid) {
        $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_bonus_turbo` WHERE `%s`=%s ORDER BY `level` ASC LIMIT {?bonus_lines?}",
                array($type, $data), __FUNCTION__, __LINE__);
        if (!SQL_HASZERONUMS($result)) {
-               // Start generating the ranking list
-               $max = SQL_NUMROWS($result);
-
                // Output all ranks (levels)
-               for ($rank = 1; $rank <= $max; $rank++) {
+               for ($rank = 1; $rank <= SQL_NUMROWS($result); $rank++) {
                        // Load data
                        $result_users = SQL_QUERY_ESC("SELECT
        `userid`, `points`
@@ -204,7 +199,7 @@ LIMIT 1",
                // @TODO Move this HTML to a template
                $OUT = '<tr>
   <td colspan="3" align="center" height="30" class="bottom">
-    <div class="guest_failed">' . getMaskedMessage('MEMBER_BONUS_NO_RANKS', $data) . '</div>
+    <div class="notice">' . getMaskedMessage('MEMBER_BONUS_NO_RANKS', $data) . '</div>
   </td>
 </tr>';
        }
@@ -308,7 +303,7 @@ LIMIT 1',
                $GLOBALS['message'] .= '<div class="tiny">{--MEMBER_BONUS_LOGIN_BONUS_ADDED--}</div>';
        } elseif (isExtensionActive('bonus')) {
                // No login bonus added!
-               $GLOBALS['message'] .= '<div class="member_failed">{--MEMBER_BONUS_LOGIN_BONUS_NOT_ADDED--}</div>';
+               $GLOBALS['message'] .= '<div class="notice">{--MEMBER_BONUS_LOGIN_BONUS_NOT_ADDED--}</div>';
        }
 }
 
@@ -340,5 +335,17 @@ function isBonusNewMemberNotifyEnabled () {
        return $GLOBALS['bonus_new_member_notify_active'];
 }
 
+// Getter for bonus_timeout
+function getBonusTimeout () {
+       // Do we have cache?
+       if (!isset($GLOBALS[__FUNCTION__])) {
+               // Determine it
+               $GLOBALS[__FUNCTION__] = getConfig('bonus_timeout');
+       } // END - if
+
+       // Return cache
+       return $GLOBALS[__FUNCTION__];
+}
+
 // [EOF]
 ?>