]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/payout_functions.php
'order_points' and locked are now displayed, some array elements/language ids renamed
[mailer.git] / inc / libs / payout_functions.php
index bf2c8a6988dd9eb70ccdc0e1a3ed61532f8a18bc..21d89144302c5af4638a7c5e4565e34389c99a23 100644 (file)
@@ -88,6 +88,19 @@ function translatePayoutStatus ($status) {
        $message = '{--PAYOUT_STATUS_' . strtoupper($status) . '--}';
 
        // Return it
+       return $message;
+}
+
+// "Getter" for payoutable user points
+function getPayoutPoints ($userid) {
+       // Do we have cache?
+       if (!isset($GLOBALS[__FUNCTION__][$userid])) {
+               // Determine it
+               $GLOBALS[__FUNCTION__][$userid] = countSumTotalData($userid, 'user_points', 'points') - countSumTotalData($userid, 'user_data', 'used_points');
+       } // END - if
+
+       // Return it
+       return $GLOBALS[__FUNCTION__][$userid];
 }
 
 // [EOF]