]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/bonus_functions.php
A lot more nice improvements!
[mailer.git] / inc / libs / bonus_functions.php
index e6d3f69dd59e756881d2773af51a09296378bfca..3d3a648ebc49bc03874a3bf6242aded6e87fdbd3 100644 (file)
@@ -206,28 +206,23 @@ function BONUS_POINTS_HANDLER($MODE)
        switch ($_CONFIG['bonus_mode'])
        {
        case "JACKPOT": // ... jackpot
-               if ((SUB_JACKPOT($points) == -1) && ($_CONFIG['bonus_uid'] > 0))
-               {
+               if ((SUB_JACKPOT($points) == -1) && ($_CONFIG['bonus_uid'] > 0)) {
                        // Check points amount first...
                        $TOTAL = GET_TOTAL_DATA($_CONFIG['bonus_uid'], "user_points", "points") - GET_TOTAL_DATA($_CONFIG['bonus_uid'], "user_data", "used_points");
-                       if ($TOTAL >= $points)
-                       {
+                       if ($TOTAL >= $points) {
                                // Subtract points from userid's account
-                               SUB_POINTS($_CONFIG['bonus_uid'], $points);
-                       }
-               }
+                               SUB_POINTS("bonus_payout_jackpot", $_CONFIG['bonus_uid'], $points);
+                       } // END - if
+               } // END - if
                break;
 
        case "UID": // ... userid's account
                // Check his amount first
                $TOTAL = GET_TOTAL_DATA($_CONFIG['bonus_uid'], "user_points", "points") - GET_TOTAL_DATA($_CONFIG['bonus_uid'], "user_data", "used_points");
-               if ($TOTAL >= $points)
-               {
+               if ($TOTAL >= $points) {
                        // Subtract points from userid's account
-                       SUB_POINTS($_CONFIG['bonus_uid'], $points);
-               }
-                else
-               {
+                       SUB_POINTS("bonus_payout_uid", $_CONFIG['bonus_uid'], $points);
+               } else {
                        // Try to subtract from jackpot
                        $dummy = SUB_JACKPOT($points);
                }