// Yes, then do some sanity-checks
switch (getRequestParameter('sub')) {
case 'points':
- if ((!isPostRequestParameterSet(('points_register'))) || (!isPostRequestParameterSet(('points_ref')))) {
+ if ((!isPostRequestParameterSet('points_register')) || (!isPostRequestParameterSet('points_ref'))) {
unsetPostRequestParameter('ok');
- }
+ } // END - if
break;
case 'ref':
if (isGetRequestParameterSet('do')) {
- if (((!isPostRequestParameterSet(('level'))) || (!isPostRequestParameterSet(('percents')))) && (getRequestParameter('do') == 'add')) {
+ if (((!isPostRequestParameterSet('level')) || (!isPostRequestParameterSet('percents'))) && (getRequestParameter('do') == 'add')) {
unsetPostRequestParameter('ok');
}
}
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_refdepths` SET `level`=%s, `percents`=%s WHERE `id`=%s LIMIT 1",
array(bigintval($value), convertCommaToDot(postRequestParameter('percents', $id)), $id), __FILE__, __LINE__);
}
- $message = '{--REF_DEPTHS_SAVED--}';
+ $message = '{--ADMIN_REFERAL_DEPTHS_SAVED--}';
break;
case 'del':
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_refdepths` WHERE `id`=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
}
- $message = '{--REF_DEPTHS_DELETED--}';
+ $message = '{--ADMIN_REFERAL_DEPTHS_DELETED--}';
break;
}
if ((getConfig('ref_payout') == '0') && (postRequestParameter('ref_payout') > 0)) {
// Update account's ref_payout for "must-confirm"
addSql(sprintf("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ref_payout`=(%s - `mails_confirmed`)
-WHERE `mails_confirmed` < %s", $REF, $REF));
+WHERE
+ `mails_confirmed` < %s", $REF, $REF));
} elseif ((getConfig('ref_payout') > 0) && (postRequestParameter('ref_payout') == '0')) {
// Update account's ref_payout for "not-must-confirm"
addSql("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ref_payout`=0 WHERE `ref_payout` > 0");
SQL_FREERESULT($result);
// Load row template and switch color
- $OUT .= loadTemplate('admin_points_del_row', true, $content);
+ $OUT .= loadTemplate('admin_del_points_row', true, $content);
} // END - foreach
// Load main template
- loadTemplate('admin_points_del', false, $OUT);
+ loadTemplate('admin_del_points', false, $OUT);
} elseif ((isFormSent('edit')) && (isPostRequestParameterSet('sel')) && (ifPostContainsSelections())) {
// Edit entries
$OUT = '';
SQL_FREERESULT($result);
// Load row template and switch color
- $OUT .= loadTemplate('admin_points_edit_row', true, $content);
+ $OUT .= loadTemplate('admin_edit_points_row', true, $content);
} // END - foreach
// Load main template
- loadTemplate('admin_points_edit', false, $OUT);
+ loadTemplate('admin_edit_points', false, $OUT);
} else {
// Referal levels
$result = SQL_QUERY("SELECT `id`, `level`, `percents` FROM `{?_MYSQL_PREFIX?}_refdepths` ORDER BY `level` ASC", __FILE__, __LINE__);