if ($DOUBLER_POINTS == 0) {
// Exit here to prevent some SQL errors (SQL_QUERY_ESC doen't insert zeros! We need to fix this...)
return;
-}
+} // END - if
// If not currently doubled set it to zero
unset($_GET['DOUBLER_UID']);
ORDER BY d.timemark
LIMIT %d", array($DOUBLER_POINTS, $min, $_CONFIG['doubler_max_sent']), __FILE__, __LINE__);
+// Do we have entries found?
if (((SQL_NUMROWS($result_total) > 0) && ($_CONFIG['doubler_sent_all'] == "Y")) || ((SQL_NUMROWS($result_main) == $_CONFIG['doubler_group_sent']) && ($_CONFIG['doubler_sent_all'] == "N"))) {
// Switch to matching SQL resource
$result_load = $result_main;
if (!$OK) {
// Add points to used doubler points
UPDATE_CONFIG("doubler_used", $points, "+");
- }
+ } // END - if
// Update variables to prevent errors
$_CONFIG['doubler_used'] += $points;
// Load mail template and send mail away...
$msg = LOAD_EMAIL_TEMPLATE("member_doubler", $content, $uid);
SEND_EMAIL($uid, DOUBLER_MEMBER_SUBJECT, $msg);
- }
- }
-}
+ } // END - if
+ } // END - while
+} // END - if
// Free memory
SQL_FREERESULT($result_total);