* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
* Copyright (c) 2009 - 2011 by Mailer Developer Team *
- * For more information visit: http://www.mxchange.org *
+ * 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 *
// Check if entires are checked
if (ifPostContainsSelections()) {
// Add option for events
- $adminsList = generateOptionList('admins', 'id', 'login', '', 'email');
$rows = '';
foreach (postRequestElement('sel') as $template => $sel) {
// First of all load data from DB
// @TODO Can this be rewritten to an API function?
$OUT .= '<select name="admin_id[' . $content['id'] . ']" size="1" class="form_select">
<option value="0"';
- if ($content['admin_id'] == '0') $OUT .= ' selected="selected"';
+ if (is_null($content['admin_id'])) {
+ $OUT .= ' selected="selected"';
+ } // END - if
$OUT .= '>{--ADMIN_TO_ALL_ADMINS--}</option>';
+
if (isExtensionActive('events')) {
$OUT .= '<option value="-1"';
- if ($content['admin_id'] == '-1') $OUT .= ' selected="selected"';
+ 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>';
// Prepare content
$content['id'] = $id;
$content['mail_template'] = $template;
- $content['admins'] = $adminsList;
+ $content['admins'] = generateOptionList('admins', 'id', 'login', '', 'email');;
if ($adminId2 > 0) {
// Add form for an additional admin