break;
case 'BONUS':
- $result_mailid = SQL_QUERY_ESC("SELECT `is_notify` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
+ $result_mailid = SQL_QUERY_ESC("SELECT `id` AS `pool_id`, `is_notify` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
array($urlId), __FILE__, __LINE__);
break;
// Set sender to 0 when we have a bonus mail
if ($data['link_type'] == 'BONUS') {
- $data['sender'] = '0';
+ $data['sender'] = NULL;
} // END - if
// Is the user id valid?
// Entry found?
if (SQL_NUMROWS($result) == 1) {
- list($pay) = SQL_FETCHROW($result);
- $time = getPaymentData($pay, 'time');
- $payment = getPaymentData($pay, 'payment');
+ list($paymentId) = SQL_FETCHROW($result);
+ $time = getPaymentData($paymentId, 'time');
+ $payment = getPaymentData($paymentId, 'payment');
$isValid = TRUE;
} // END - if
// Is this entry valid?
if ($isValid === TRUE) {
+ // Run at least one second
if (($time == '0') && ($payment > 0)) $time = 1;
+
+ // Is time and payment set?
if (($time > 0) && ($payment > 0)) {
$realCode = '0';
if (!empty($code)) {