loadTemplate('admin_settings_saved', false, $content);
} elseif ((isFormSent('del')) && (countPostSelection() > 0)) {
// Delete entries here
- $OUT = ''; $SW = 2;
+ $OUT = '';
foreach (postRequestParameter('sel') as $id => $value) {
$result = SQL_QUERY_ESC("SELECT time, mail_title FROM `{?_MYSQL_PREFIX?}_payments` WHERE `id`=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
// Prepare array for the row template
$content = array(
- 'sw' => $SW,
'id' => $id,
'time' => $time,
'title' => $title,
// Load row template and switch colors
$OUT .= loadTemplate('admin_del_payments_row', true, $content);
- $SW = 3 - $SW;
- }
+ } // END - foreach
// Load main template
loadTemplate('admin_del_payments', false, $OUT);
} elseif ((isFormSent('edit')) && (countPostSelection() > 0)) {
// Edit entries
- $OUT = ''; $SW = 2;
+ $OUT = '';
foreach (postRequestParameter('sel') as $id => $value) {
$result = SQL_QUERY_ESC("SELECT time, payment, mail_title, price FROM `{?_MYSQL_PREFIX?}_payments` WHERE `id`=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
// Prepare array for the row template
$content = array(
- 'sw' => $SW,
'id' => $id,
'time' => $time,
'title' => $title,
// Load row template and switch colors
$OUT .= loadTemplate('admin_edit_payments_row', true, $content);
- $SW = 3 - $SW;
- }
+ } // END - foreach
// Load main template
loadTemplate('admin_edit_payments', false, $OUT);
$result = SQL_QUERY("SELECT `id`, `time`, `payment`, `mail_title`, `price` FROM `{?_MYSQL_PREFIX?}_payments` ORDER BY `time` ASC", __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Make referal levels editable and deletable
- $OUT = ''; $SW = 2;
+ $OUT = '';
// List already existing categories for editing
while ($content = SQL_FETCHARRAY($result)) {
// Prepare array for the row template
// @TODO Rewritings: title->mail_title in template
$content = array(
- 'sw' => $SW,
'id' => $content['id'],
'time' => $content['time'],
'title' => $content['mail_title'],
// Load row template and switch colors
$OUT .= loadTemplate('admin_payments_list_row', true, $content);
- $SW = 3 - $SW;
} // END - switch
// Free memory