LOAD_TEMPLATE("admin_settings_saved", false, $content);
} elseif ((REQUEST_ISSET_POST('del')) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) {
// Delete entries here
- $SW = 2; $OUT = "";
+ $OUT = ""; $SW = 2;
foreach (REQUEST_POST('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__);
LOAD_TEMPLATE("admin_del_payments");
} elseif ((REQUEST_ISSET_POST('edit')) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) {
// Edit entries
- $SW = 2; $OUT = "";
+ $OUT = ""; $SW = 2;
foreach (REQUEST_POST('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__);
$result = SQL_QUERY("SELECT id, time, payment, mail_title, price FROM `{!_MYSQL_PREFIX!}_payments` ORDER BY time", __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Make referal levels editable and deletable
- $SW = 2; $OUT = "";
+ $OUT = ""; $SW = 2;
// List already existing categories for editing
- while (list($id, $time, $pay, $title, $price) = SQL_FETCHROW($result)) {
- $pay = TRANSLATE_COMMA($pay);
- $price = TRANSLATE_COMMA($price);
-
+ while ($content = SQL_FETCHARRAY($result)) {
// Prepare array for the row template
+ // @TODO Rewritings: title->mail_title, pay->payment in template
$content = array(
'sw' => $SW,
- 'id' => $id,
- 'time' => $time,
- 'title' => $title,
- 'pay' => $pay,
- 'price' => $price,
+ 'id' => $content['id'],
+ 'time' => $content['time'],
+ 'title' => $content['mail_title'],
+ 'pay' => TRANSLATE_COMMA($content['payment']),
+ 'price' => TRANSLATE_COMMA($content['price'])
);
// Load row template and switch colors