switch (getRequestElement('activate')) {
case '1': // Activate
addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET `is_active`='Y' WHERE `id`=%s AND `is_active`='N' LIMIT 1",
- array(bigintval(getRequestElement('rallye_id'))), __FILE__, __LINE__, false)
+ array(bigintval(getRequestElement('rallye_id'))), __FILE__, __LINE__, FALSE)
);
break;
case '0': // Deactivate
addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET `is_active`='N' WHERE `id`=%s AND `is_active`='Y' LIMIT 1",
- array(bigintval(getRequestElement('rallye_id'))), __FILE__, __LINE__, false)
+ array(bigintval(getRequestElement('rallye_id'))), __FILE__, __LINE__, FALSE)
);
break;
} // END - switch
switch (getRequestElement('notify')) {
case '1': // Activate
addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET `send_notify`='Y' WHERE `id`=%s AND `send_notify`='N' LIMIT 1",
- array(bigintval(getRequestElement('rallye_id'))), __FILE__, __LINE__, false)
+ array(bigintval(getRequestElement('rallye_id'))), __FILE__, __LINE__, FALSE)
);
break;
case '0': // Deactivate
addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET `send_notify`='N' WHERE `id`=%s AND `send_notify`='Y' LIMIT 1",
- array(bigintval(getRequestElement('rallye_id'))), __FILE__, __LINE__, false)
+ array(bigintval(getRequestElement('rallye_id'))), __FILE__, __LINE__, FALSE)
);
break;
} // END - switch
switch (getRequestElement('auto')) {
case '1': // Activate
addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET `auto_add_new_user`='Y' WHERE `id`=%s AND `auto_add_new_user`='N' LIMIT 1",
- array(bigintval(getRequestElement('rallye_id'))), __FILE__, __LINE__, false)
+ array(bigintval(getRequestElement('rallye_id'))), __FILE__, __LINE__, FALSE)
);
break;
case '0': // Deactivate
addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET `auto_add_new_user`='N' WHERE `id`=%s AND `auto_add_new_user`='Y' LIMIT 1",
- array(bigintval(getRequestElement('rallye_id'))), __FILE__, __LINE__, false)
+ array(bigintval(getRequestElement('rallye_id'))), __FILE__, __LINE__, FALSE)
);
break;
} // END - switch
foreach (postRequestElement('sel') as $id => $selected) {
// Remove selected rallye entirely...
addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_rallye_data` WHERE `id`=%s LIMIT 1",
- array(bigintval($id)), __FILE__, __LINE__, false));
+ array(bigintval($id)), __FILE__, __LINE__, FALSE));
addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE `rallye_id`=%s",
- array(bigintval($id)), __FILE__, __LINE__, false));
+ array(bigintval($id)), __FILE__, __LINE__, FALSE));
addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_rallye_users` WHERE `rallye_id`=%s",
- array(bigintval($id)), __FILE__, __LINE__, false));
+ array(bigintval($id)), __FILE__, __LINE__, FALSE));
} // END - foreach
// Run SQLS
bigintval(postRequestElement('min_users', $id)),
bigintval(postRequestElement('min_prices', $id)),
$id
- ), __FILE__, __LINE__, false));
+ ), __FILE__, __LINE__, FALSE));
}
// Run SQLS
$content['rallye_id'] = bigintval($id);
// Output row
- $OUT .= loadTemplate('admin_' . $mode . '_rallyes_row', true, $content);
+ $OUT .= loadTemplate('admin_' . $mode . '_rallyes_row', TRUE, $content);
} // END - foreach
// Load final template
- loadTemplate('admin_' . $mode . '_rallyes', false, $OUT);
+ loadTemplate('admin_' . $mode . '_rallyes', FALSE, $OUT);
} else {
// Nothing selected to edit
displayMessage('{--ADMIN_RALLYE_NO_RALLYES_SELECTED--}');
} // END - if
// Get user points
- $points = countSumTotalData($row['userid'], 'user_points', 'points', 'userid', false, " AND `ref_depth`=1");
+ $points = countSumTotalData($row['userid'], 'user_points', 'points', 'userid', FALSE, " AND `ref_depth`=1");
//* DEBUG: */ debugOutput(basename(__FILE__).':userid='.$row['userid'].',points='.$points.',opoints='.$row['curr_points']);
// Prepare content
);
// Load row template and switch color
- $OUT .= loadTemplate('admin_list_rallye_usr_row', true, $row);
+ $OUT .= loadTemplate('admin_list_rallye_usr_row', TRUE, $row);
} // END - while
// Remember rows
SQL_FREERESULT($result);
// Load template
- loadTemplate('admin_list_rallye_usr', false, $content);
+ loadTemplate('admin_list_rallye_usr', FALSE, $content);
} else {
// No entries found?
displayMessage('{--ADMIN_RALLYE_USERS_404--}');
$OUT = '';
while ($data = SQL_FETCHARRAY($result)) {
// Count joined userids
- $users = countSumTotalData($data['rallye_id'], 'rallye_users', 'rallye_id', 'rallye_id', true);
+ $users = countSumTotalData($data['rallye_id'], 'rallye_users', 'rallye_id', 'rallye_id', TRUE);
// Did some users joined this rallye?
if ($users > 0) {
'send_notify' => $data['send_notify'],
'auto_add_new_user' => $data['auto_add_new_user'],
'notified' => $data['notified'],
- 'prices_cnt' => countSumTotalData($data['rallye_id'], 'rallye_prices', 'rallye_id', 'rallye_id', true),
+ 'prices_cnt' => countSumTotalData($data['rallye_id'], 'rallye_prices', 'rallye_id', 'rallye_id', TRUE),
'descr' => $data['descr'],
'min_users' => $data['min_users'],
'min_prices' => $data['min_prices'],
} // END - switch
// Output row
- $OUT .= loadTemplate('admin_list_rallyes_row', true, $row);
+ $OUT .= loadTemplate('admin_list_rallyes_row', TRUE, $row);
} // END - while
// Free memory
$content['rows'] = $OUT;
// Load template
- loadTemplate('admin_list_rallyes', false, $content);
+ loadTemplate('admin_list_rallyes', FALSE, $content);
} else {
// No rallyes setup so far
displayMessage('{--ADMIN_RALLYE_NO_RALLYES_SETUP--}');