function addReferalRallyePrices ($rallye, $mode = 'email') {
// Output mode
switch($mode) {
- case 'email': $mode = "\n"; break;
- case 'html' : $mode = "<br />\n"; break;
+ case 'email': $mode = "\n"; break;
+ case 'html' : $mode = '<br />'; break;
} // END - switch
// Load prices
array($rallye), __FUNCTION__, __LINE__);
// Entries found?
- if (SQL_NUMROWS($result_prices) > 0) {
+ if (!SQL_HASZERONUMS($result_prices)) {
// Load prices
if ($mode == "\n") $prices = '{--RALLYE_MEMBER_PRICES_ADDED--}:' . $mode . '------------------------------' . $mode;
// Generate table
$OUT = '';
- $SW = 2;
for ($idx = '0'; $idx < $prices; $idx++) {
// Prepare marking of default (maybe current user's) id
$start = ''; $end = '';
// Prepare content
$content = array(
- 'sw' => $SW,
'idx' => ($idx + 1),
'start' => $start,
'end' => $end,
// Load row template and switch color
$OUT .= loadTemplate('guest_rallye_row', true, $content);
- $SW = 3 - $SW;
} // END - for
// Add min_prices/users
$DATA = getArrayFromReferalRallyeUsers($rallye);
// Generate table
- $OUT = ''; $SW = 2;
+ $OUT = '';
for ($idx = '0'; $idx < $prices; $idx++) {
// Check status
// active = 1: account is still confirmed
// Prepare content
$content = array(
- 'sw' => $SW,
'idx' => ($idx + 1),
'userid' => $DATA['userid'][$idx],
'ref' => $DATA['ref'][$idx],
// Load row template
$OUT .= loadTemplate('guest_rallye_row', true, $content);
- $SW = 3 - $SW;
} // END - for
// Prepare content
`expired`='Y'",
array($EXPIRE), __FUNCTION__, __LINE__);
- if (SQL_NUMROWS($result_rallye) > 0) {
+ if (!SQL_HASZERONUMS($result_rallye)) {
// Init SQLs
initSqls();