]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/doubler_functions.php
convertSelectionsToEpocheTimeInPostData() is a wrapper and only needs the POST field...
[mailer.git] / inc / libs / doubler_functions.php
index d5e9ba00ed154993d00fdea539c846c0eca026c4..6ca451b69a3fe7d4e567e502d5edf9ba693bb061 100644 (file)
@@ -108,7 +108,7 @@ LIMIT %s",
                        $content['timemark'] = generateDateTime($content['timemark'], $DT_MODE);
 
                        // Load template and switch color
-                       $OUT .= loadTemplate($mode . '_doubler_list_rows', true, $content);
+                       $OUT .= loadTemplate($mode . '_doubler_list_rows', TRUE, $content);
                } // END - while
 
                // Free memory
@@ -117,13 +117,13 @@ LIMIT %s",
                // List no entries
                $OUT = '<tr>
   <td colspan="' . $COLS . '" align="center" class="bottom">
-    ' . displayMessage($message, true) . '
+    ' . displayMessage($message, TRUE) . '
   </td>
 </tr>';
        }
 
        // Return template
-       return loadTemplate($mode . '_doubler_list', true, $OUT);
+       return loadTemplate($mode . '_doubler_list', TRUE, $OUT);
 }
 
 // Get total points left in doubler pot
@@ -133,7 +133,7 @@ function getDoublerTotalPointsLeft() {
 
        if (getConfig('doubler_own') == 'Y') {
                // Take points from doubler's own account
-               $points += getConfig('doubler_points') - getConfig('doubler_used');
+               $points += getDoublerPoints() - getConfig('doubler_used');
        } // END - if
 
        if ((getConfig('doubler_jackpot') == 'Y') && (isExtensionActive('jackpot'))) {
@@ -143,9 +143,9 @@ function getDoublerTotalPointsLeft() {
                if (!empty($jackpot)) $points += $jackpot;
        } // END - if
 
-       if (isValidUserId(getConfig('doubler_userid'))) {
+       if (isValidUserId(getDoublerUserid())) {
                // Get user's points
-               $user = getTotalPoints(getConfig('doubler_userid'));
+               $user = getTotalPoints(getDoublerUserid());
                $points += $user;
        } // END - if
 
@@ -265,5 +265,17 @@ function getDoublerCharge () {
        return $GLOBALS[__FUNCTION__];
 }
 
+// "Getter" for doubler_max_sent
+function getDoublerMaxSent () {
+       // Is there cache?
+       if (!isset($GLOBALS[__FUNCTION__])) {
+               // Determine it
+               $GLOBALS[__FUNCTION__] = getConfig('doubler_max_sent');
+       } // END - if
+
+       // Return cache
+       return $GLOBALS[__FUNCTION__];
+}
+
 // [EOF]
 ?>