runFilterChain('run_sqls');
} elseif (isFormSent('remove')) {
// Delete rallyes
- if (countPostSelection() > 0) {
+ if (ifPostContainsSelections()) {
// Init SQLs
initSqls();
}
} elseif (isFormSent('change')) {
// Change rallye
- if (countSelection(postRequestParameter('title')) > 0) {
+ if (ifPostContainsSelections('title')) {
// Init SQLs
initSqls();
if (isFormSent('edit')) {
// Check for selections
- if (countPostSelection() > 0) {
+ if (ifPostContainsSelections()) {
// Make all selected and deactivated rallyes editable
$OUT = '';
foreach (postRequestParameter('sel') as $id => $selected) {
$content['id'] = $id;
// Output row
- $OUT .= loadTemplate('admin_edit_rallyes_row', true, $content);
+ $OUT .= loadTemplate('form_submit_rallyes_row', true, $content);
} // END - foreach
// Load final template
- loadTemplate('admin_edit_rallyes', false, $OUT);
+ loadTemplate('form_submit_rallyes', false, $OUT);
} else {
// Nothing selected to edit
loadTemplate('admin_settings_saved', false, '{--RALLYE_NO_RALLYES_SELECTED--}');
ORDER BY
`userid` ASC",
array(bigintval(getRequestParameter('rallye'))), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) > 0) {
+ if (!SQL_HASZERONUMS($result)) {
$OUT = '';
$content['rallye'] = getRequestParameter('rallye');
while ($row = SQL_FETCHARRAY($result)) {
$br = '';
// Output row
- if (($row['curr_points'] > 0) && ($cnt > 0)) { $bl = '<strong>'; $br = '</strong>'; }
+ if (($row['curr_points'] > 0) && ($cnt > 0)) {
+ $bl = '<strong>';
+ $br = '</strong>';
+ } // END - if
// Get user points
$points = countSumTotalData($row['userid'], 'user_points', 'points', 'userid', false, " AND `ref_depth`=1 LIMIT 1");
'userid' => $row['userid'],
'bold_l' => $bl ,
'bold_r' => $br ,
- 'rews' => $row['refs'],
+ 'refs' => $row['refs'],
'cnt' => $cnt,
'opoints' => ($points - $row['curr_points']),
);
`start_time` DESC", __FILE__, __LINE__);
// Records found?
- if (SQL_NUMROWS($result) > 0) {
+ if (!SQL_HASZERONUMS($result)) {
// List found rallyes
$OUT = '';
while ($data = SQL_FETCHARRAY($result)) {
// Transfer data into array for the template
$row = array(
- 'select' => '<input type="checkbox" name="sel[' . $data['id'] . ']" class="admin_normal" value="1" />',
+ 'select' => '<input type="checkbox" name="sel[' . $data['id'] . ']" class="form_field" value="1" />',
'admin_id' => $data['admin_id'],
'login' => $data['login'],
'id' => $data['id'],