* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009, 2010 by Mailer Developer Team *
- * For more information visit: http://www.mxchange.org *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team *
+ * For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
- $adminsList = generateOptionList('admins', 'id', 'login', '', 'email');
- $SW = 2; $rows = '';
- foreach (postRequestParameter('sel') as $template => $sel) {
+ $rows = '';
+ foreach (postRequestElement('sel') as $template => $sel) {
- $result = SQL_QUERY_ESC("SELECT `admin_id`, `id` FROM `{?_MYSQL_PREFIX?}_admins_mails` WHERE `mail_template`='%s' ORDER BY `id` ASC",
+ $result = SQL_QUERY_ESC("SELECT `admin_id`,`id` FROM `{?_MYSQL_PREFIX?}_admins_mails` WHERE `mail_template`='%s' ORDER BY `id` ASC",
array($template), __FILE__, __LINE__);
$OUT = '';
$adminId2 = '0'; $id = '0';
while ($content = SQL_FETCHARRAY($result)) {
// @TODO Can this be rewritten to an API function?
array($template), __FILE__, __LINE__);
$OUT = '';
$adminId2 = '0'; $id = '0';
while ($content = SQL_FETCHARRAY($result)) {
// @TODO Can this be rewritten to an API function?
- if ($content['admin_id'] == '0') $OUT .= ' selected="selected"';
- $OUT .= '>{--ADMINS_ALL_ADMINS--}</option>';
+ if (is_null($content['admin_id'])) {
+ $OUT .= ' selected="selected"';
+ } // END - if
+ $OUT .= '>{--ADMIN_TO_ALL_ADMINS--}</option>';
+
- if ($content['admin_id'] == '-1') $OUT .= ' selected="selected"';
- $OUT .= '>{--ADMINS_TO_USER_EVENTS--}</option>';
- }
+ if ($content['admin_id'] == '-1') {
+ $OUT .= ' selected="selected"';
+ } // END - if
+ $OUT .= '>{--ADMIN_ADMINS_TO_USER_EVENTS--}</option>';
+ } // END - if
+
$OUT .= generateOptionList('admins', 'id', 'login', $content['admin_id'], 'email');
$OUT .= '</select>';
$OUT .= generateOptionList('admins', 'id', 'login', $content['admin_id'], 'email');
$OUT .= '</select>';
array($content['admin_id'], $id), __FILE__, __LINE__, false));
array($content['admin_id'], $id), __FILE__, __LINE__, false));
// Remove any other admin entries
addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admins_mails` WHERE mail_template='%s' AND id != '%s'",
// Remove any other admin entries
addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admins_mails` WHERE mail_template='%s' AND id != '%s'",
- array(postRequestParameter('template', $id), $id), __FILE__, __LINE__, false));
+ array(postRequestElement('template', $id), $id), __FILE__, __LINE__, false));
// Add new admin
addSql(SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admins_mails` (admin_id, mail_template) VALUES ('%s','%s')",
// Add new admin
addSql(SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admins_mails` (admin_id, mail_template) VALUES ('%s','%s')",
- array($content['admin_id'], postRequestParameter('template', $id)), __FILE__, __LINE__, false));
+ array($content['admin_id'], postRequestElement('template', $id)), __FILE__, __LINE__, false));