- case "NORMAL":
- $result = SQL_QUERY_ESC("SELECT payment_id FROM "._MYSQL_PREFIX."_user_stats WHERE pool_id=%s LIMIT 1",
- array(bigintval($pool)), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 1)
- {
- list($pay) = SQL_FETCHROW($result);
- $time = GET_PAY_POINTS($pay, "time");
- $payment = GET_PAY_POINTS($pay, "payment");
- $VALID = true;
- }
-
- // Free memory
- SQL_FREERESULT($result);
- break;
-
- case "BONUS":
- $result = SQL_QUERY_ESC("SELECT points, time FROM "._MYSQL_PREFIX."_bonus WHERE id=%s LIMIT 1",
- array($url_bid), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 1)
- {
- list($points, $time) = SQL_FETCHROW($result);
- $payment = "0.00000";
- $VALID = true;
- }
-
- // Free memory
- SQL_FREERESULT($result);
- break;
+ case 'NORMAL':
+ $result = SQL_QUERY_ESC("SELECT payment_id FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE pool_id=%s LIMIT 1",
+ array(bigintval($pool)), __FILE__, __LINE__);
+ if (SQL_NUMROWS($result) == 1) {
+ list($pay) = SQL_FETCHROW($result);
+ $time = getPaymentPoints($pay, 'time');
+ $payment = getPaymentPoints($pay, 'payment');
+ $isValid = true;
+ }
+
+ // Free memory
+ SQL_FREERESULT($result);
+ break;
+
+ case 'BONUS':
+ $result = SQL_QUERY_ESC("SELECT points, time FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1",
+ array($url_bid), __FILE__, __LINE__);
+ if (SQL_NUMROWS($result) == 1) {
+ list($points, $time) = SQL_FETCHROW($result);
+ $payment = '0.00000';
+ $isValid = true;
+ }
+
+ // Free memory
+ SQL_FREERESULT($result);
+ break;