}
} elseif ((REQUEST_ISSET_POST('del')) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) {
// Delete entries
- $SW = 2; $OUT = "";
+ $OUT = ""; $SW = 2;
foreach (REQUEST_POST('sel') as $id => $value)
{
// Load data
LOAD_TEMPLATE("admin_config_email_del");
} 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) {
// Load data
$result = SQL_QUERY_ESC("SELECT value, comment FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE id=%s LIMIT 1",
// Load main template
LOAD_TEMPLATE("admin_config_email_edit");
} else {
- $result = SQL_QUERY("SELECT id, value, comment FROM `{!_MYSQL_PREFIX!}_max_receive` ORDER BY value", __FILE__, __LINE__);
+ $result = SQL_QUERY("SELECT id, value, comment FROM `{!_MYSQL_PREFIX!}_max_receive` ORDER BY value",
+ __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// List already existing entries for editing
- $SW = 2; $OUT = "";
- while (list($id, $value, $comment) = SQL_FETCHROW($result)) {
+ $OUT = ""; $SW = 2;
+ while ($content = SQL_FETCHARRAY($result)) {
// Prepare data for the row template
- $content = array(
- 'sw' => $SW,
- 'id' => $id,
- 'value' => $value,
- 'comment' => $comment,
- );
+ $content['sw'] = $SW;
// Load row template and switch color
$OUT .= LOAD_TEMPLATE("admin_config_email_row", true, $content);
$SW = 3 - $SW;
- }
+ } // END - while
// Free memory
SQL_FREERESULT($result);
// Load main template
LOAD_TEMPLATE("admin_config_email");
- }
+ } // END - if
// Display form
LOAD_TEMPLATE("admin_add_max");