function addReferralRallyePrices ($rallye, $mode = 'email') {
// Output mode
switch($mode) {
- case 'email': $mode = chr(10); break;
+ case 'email': $mode = PHP_EOL; break;
case 'html' : $mode = '<br />'; break;
} // END - switch
if (!SQL_HASZERONUMS($result_prices)) {
// Load prices
$prices = '';
- if ($mode == chr(10)) {
+ if ($mode == PHP_EOL) {
$prices = '{--RALLYE_MEMBER_PRICES_ADDED--}:' . $mode . '------------------------------' . $mode;
} // END - if
}
// Add last line for email mode
- if ($mode == chr(10)) {
+ if ($mode == PHP_EOL) {
$prices .= '------------------------------';
} // END - if
// Allow valid and active users with at least one ref
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'rallyeId=' . $rallyeId . ',userid=' . $userid . ',ref=' . $prices['ref'][$key] . ',cpoints=' . $prices['cpoints'][$key]);
- if ((isValidUserId($userid)) && ($prices['ref'][$key] > 0) && ($active == 1) && ($prices['cpoints'][$key] > 0)) {
+ if ((isValidId($userid)) && ($prices['ref'][$key] > 0) && ($active == 1) && ($prices['cpoints'][$key] > 0)) {
$GLOBALS[__FUNCTION__][$rallyeId]++;
} // END - if
} // END - foreach
$prices['active'][$key] = $active;
// Allow valid and active users with at least one ref to get points
- if ((isValidUserId($userid)) && ($prices['ref'][$key] > 0) && ($active == 1) && ($prices['cpoints'][$key] > 0)) {
+ if ((isValidId($userid)) && ($prices['ref'][$key] > 0) && ($active == 1) && ($prices['cpoints'][$key] > 0)) {
$total++;
} // END - if
} // END - foreach
// Run array through (by userid is the most important 2nd-level-array)
foreach ($prices['userid'] as $key => $userid) {
// Allow valid and active users with at least one ref to get points
- if ((isValidUserId($userid)) && ($prices['ref'][$key] > 0) && ($prices['active'][$key] == 1) && ($prices['cpoints'][$key] > 0)) {
+ if ((isValidId($userid)) && ($prices['ref'][$key] > 0) && ($prices['active'][$key] == 1) && ($prices['cpoints'][$key] > 0)) {
// Transfer data to array for the mail template
$content['level'] = $prices['level'][$key];
$content['points'] = $prices['points'][$key];