LIMIT %d", array($DOUBLER_POINTS, $min, getConfig('doubler_max_sent')), __FILE__, __LINE__);
// Do we have entries found?
LIMIT %d", array($DOUBLER_POINTS, $min, getConfig('doubler_max_sent')), __FILE__, __LINE__);
// Do we have entries found?
// Switch to matching SQL resource
$result_load = $result_main;
if ((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == "Y")) $result_load = $result_total;
// Switch to matching SQL resource
$result_load = $result_main;
if ((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == "Y")) $result_load = $result_total;
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_doubler` SET completed='Y' WHERE id=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_doubler` SET completed='Y' WHERE id=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
// Check for jackpot inclusion in doubling process
if (($jackpot > 0) && ($jackpot >= $points) && (getConfig('doubler_jackpot') == "Y")) {
// Subtract points from jackpot
// Check for jackpot inclusion in doubling process
if (($jackpot > 0) && ($jackpot >= $points) && (getConfig('doubler_jackpot') == "Y")) {
// Subtract points from jackpot
// Add points to used points
SUB_POINTS("doubler_payout", getConfig('doubler_uid'), $points);
// Okay, done!
// Add points to used points
SUB_POINTS("doubler_payout", getConfig('doubler_uid'), $points);
// Okay, done!
// Add points to used doubler points
UPDATE_CONFIG("doubler_used", $points, "+");
} // END - if
// Add points to used doubler points
UPDATE_CONFIG("doubler_used", $points, "+");
} // END - if
// Load mail template and send mail away...
$msg = LOAD_EMAIL_TEMPLATE("member_doubler", $content, $uid);
// Load mail template and send mail away...
$msg = LOAD_EMAIL_TEMPLATE("member_doubler", $content, $uid);