// Transfer all neccessary data to the $DATA array
$DATA['userid_cnt'] = countSumTotalData('CONFIRMED','user_data','userid','status',true);
- $DATA['start'] = generateDateTime($start, '2');
- $DATA['end'] = generateDateTime($end , '2');
- $DATA['now_t'] = generateDateTime(time(), '2');
+ $DATA['start'] = generateDateTime($start, 2);
+ $DATA['end'] = generateDateTime($end , 2);
+ $DATA['now_t'] = generateDateTime(time(), 2);
$DATA['title'] = $title;
$DATA['id'] = $id; // ID for the rallye details link
if ($notify == 'Y') $templ = 'admin_rallye_notify';
// Send email to admin
- sendAdminNotification(sprintf(getMessage('RALLYE_ADMIN_NOTIFY'), $title), $templ, $prices, '0');
+ sendAdminNotification(sprintf(getMessage('RALLYE_ADMIN_NOTIFY'), $title), $templ, $prices, 0);
// Free memory
SQL_FREERESULT($result_user);
if (SQL_NUMROWS($result) == 0) {
// Add userid and his ref count to table
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_rallye_users` (`rallye_id`, `userid`, `refs`)
-VALUES ('%s','%s','0')",
+VALUES ('%s','%s',0)",
array(bigintval($id), bigintval($userid)), __FUNCTION__, __LINE__);
} // END - if
if ($notify == 'Y') {
// Transfer all neccessary data to the global $DATA array
- $DATA['start'] = generateDateTime($start, '2');
- $DATA['end'] = generateDateTime($end , '2');
- $DATA['now_t'] = generateDateTime(time(), '2');
+ $DATA['start'] = generateDateTime($start, 2);
+ $DATA['end'] = generateDateTime($end , 2);
+ $DATA['now_t'] = generateDateTime(time(), 2);
$DATA['title'] = $title;
$DATA['id'] = $id; // ID for the rallye details link
$DATA['ref'] = 0;
$DATA = array(); $cnt = 0;
$users = array();
$DATA['title'] = $title;
- $DATA['start'] = generateDateTime($start, '1');
- $DATA['end'] = generateDateTime($end , '1');
- $DATA['now_t'] = generateDateTime(time(), '1');
+ $DATA['start'] = generateDateTime($start, 1);
+ $DATA['end'] = generateDateTime($end , 1);
+ $DATA['now_t'] = generateDateTime(time(), 1);
// Just count...
$total = 0;
//
function getArrayFromReferalRallyeUsers ($rallye) {
// Fix zero points to 0.00000
- if (getConfig('ref_payout') == '0') setConfigEntry('ref_payout', '0.00000');
+ if (getConfig('ref_payout') == 0) setConfigEntry('ref_payout', '0.00000');
// Init multi array
$users = array(
$active = countSumTotalData($DATA['userid'][$idx], 'user_data', 'userid', 'userid', true, " AND `status`='CONFIRMED'");
if (empty($DATA['userid'][$idx])) $DATA['userid'][$idx] = '---';
- if ((empty($DATA['ref'][$idx])) || ($DATA['ref'][$idx] == 0) || ($active == 0) || ("".round($DATA['cpoints'][$idx])."" == '0') || (empty($DATA['cpoints'][$idx]))) {
+ if ((empty($DATA['ref'][$idx])) || ($DATA['ref'][$idx] == 0) || ($active == 0) || ("".round($DATA['cpoints'][$idx])."" == 0) || (empty($DATA['cpoints'][$idx]))) {
// Allow valid and active users with at least one ref to get points
$DATA['ref'][$idx] = '---';
$DATA['userid'][$idx] = '---';
// Expire found rallyes and notify admin
while ($content = SQL_FETCHARRAY($result_rallye)) {
// Prepare data for mail template
- $content['start_time'] = generateDateTime($content['start_time'], '1');
- $content['end_time'] = generateDateTime($content['end_time'] , '1');
- $content['now_time'] = generateDateTime(time(), '1');
+ $content['start_time'] = generateDateTime($content['start_time'], 1);
+ $content['end_time'] = generateDateTime($content['end_time'] , 1);
+ $content['now_time'] = generateDateTime(time(), 1);
// Send mail to admin
sendAdminNotification(sprintf(getMessage('RALLYE_ADMIN_PURGED_SUBJ'), $content['title']), 'admin_rallye_purged', $content, 0);