// Now, if we are good little boys and girls Santa left us some user-ids.
// We can now send mails to them...
foreach ($RECEIVERS as $key => $userid) {
- // Lookup user ID
+ // Lookup user id
$result_user = SQL_QUERY_ESC("SELECT gender, surname, family, email FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1",
array(bigintval($userid)), __FILE__, __LINE__);
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_stats` (`pool_id` , `userid`, `cat_id`, `payment_id`, `subject`, `url` , `max_rec` , `timestamp_ordered`, `timestamp_sstart`) VALUES ('%s','%s','%s','%s','%s','%s','%s','%s' , UNIX_TIMESTAMP())",
array(bigintval($DATA['id']), bigintval($DATA['sender']), bigintval($DATA['cat_id']), bigintval($DATA['payment_id']), $DATA['subject'], $DATA['url'], $DATA['target_send'], bigintval($DATA['timestamp'])), __FILE__, __LINE__);
- // Receive it's ID for the links table
+ // Receive it's id for the links table
$result_stats = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `pool_id`=%s AND `userid`=%s AND timestamp_ordered='%s' LIMIT 1",
array(bigintval($DATA['id']), bigintval($DATA['sender']), bigintval($DATA['timestamp'])), __FILE__, __LINE__);
} // END - if
if ((count($pointsBack) > 0) && (!empty($pointsBack[0]))) {
// Walk through all points
foreach ($pointsBack as $userid => $PB) {
- // Add points only when we have points left to add and a valid user ID
+ // Add points only when we have points left to add and a valid user id
if (($PB > 0) && ($userid > 0)) {
// Prepare content
$content = array(