if ($points > 0) {
// Pay this out!
$result = SQL_QUERY_ESC("SELECT
- `id`, `type`, `rate`, `min_points`
+ `id`,`type`,`rate`,`min_points`
FROM
`{?_MYSQL_PREFIX?}_payout_types`
WHERE
$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]