Exemplo n.º 1
0
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
global $edited_EmailAddress;
// Determine if we are creating or updating...
global $action;
$creating = $action == 'blocked_new';
$Form = new Form(NULL, 'slug_checkchanges', 'post', 'compact');
$Form->global_icon(T_('Cancel editing!'), 'close', regenerate_url('action,emadr_ID'));
$Form->begin_form('fform', ($creating ? T_('New email address') : T_('Email address')) . get_manual_link('email-addresses'));
$Form->add_crumb('email_blocked');
$Form->hidden('action', 'blocked_save');
$Form->hiddens_by_key(get_memorized('action'));
$Form->text_input('emadr_address', $edited_EmailAddress->get('address'), 50, T_('Email address'), '', array('maxlength' => 255, 'required' => true));
$email_status_icon = '<div id="email_status_icon" class="status_icon">' . emadr_get_status_icon($edited_EmailAddress->get('status')) . '</div>';
$Form->select_input_array('emadr_status', $edited_EmailAddress->get('status'), emadr_get_status_titles(), 'Status', '', array('force_keys_as_values' => true, 'background_color' => emadr_get_status_colors(), 'required' => true, 'field_suffix' => $email_status_icon));
$Form->info(T_('Last sent date'), mysql2localedatetime_spans($edited_EmailAddress->get('last_sent_ts'), "M-d"));
$Form->text_input('emadr_sent_count', $edited_EmailAddress->get('sent_count'), 20, T_('Sent count'), '');
$Form->text_input('emadr_sent_last_returnerror', $edited_EmailAddress->get('sent_last_returnerror'), 20, T_('Sent count since last error'), '');
$Form->info(T_('Last error date'), mysql2localedatetime_spans($edited_EmailAddress->get('last_error_ts'), "M-d"));
$Form->text_input('emadr_prmerror_count', $edited_EmailAddress->get('prmerror_count'), 20, T_('Permanent errors count'), '');
$Form->text_input('emadr_tmperror_count', $edited_EmailAddress->get('tmperror_count'), 20, T_('Temporary errors count'), '');
$Form->text_input('emadr_spamerror_count', $edited_EmailAddress->get('spamerror_count'), 20, T_('Spam errors count'), '');
$Form->text_input('emadr_othererror_count', $edited_EmailAddress->get('othererror_count'), 20, T_('Other errors count'), '');
$Form->end_form(array(array('submit', 'submit', $creating ? T_('Record') : T_('Save Changes!'), 'SaveButton')));
?>
<script type="text/javascript">
var email_status_icons = new Array;
<?php 
$email_status_icons = emadr_get_status_icons();
Exemplo n.º 2
0
    if (!$current_User->check_perm('users', 'edit')) {
        // Show the limited list for moderators
        $GroupCache->clear();
        $GroupCache->load_where('grp_level < ' . $current_User->get_Group()->get('level'));
        $GroupCache->all_loaded = true;
    }
    $Form->select_object('edited_user_grp_ID', $edited_User->grp_ID, $GroupCache, T_('User group'));
    $Form->text_input('edited_user_level', $edited_User->get('level'), 2, T_('User level'), $level_fieldnote, array('required' => true));
}
$Form->end_fieldset();
// user permissions
$Form->begin_fieldset(T_('Email') . get_manual_link('user-admin-email'));
$email_fieldnote = '<a href="mailto:' . $edited_User->get('email') . '" class="' . button_class() . '">' . get_icon('email', 'imgtag', array('title' => T_('Send an email'))) . '</a>';
$Form->text_input('edited_user_email', $edited_User->get('email'), 30, T_('Email'), $email_fieldnote, array('maxlength' => 255, 'required' => true));
$email_status = $edited_User->get_email_status();
$email_status_icon = '<div id="email_status_icon" class="status_icon">' . emadr_get_status_icon($email_status) . '</div>';
if ($current_User->check_perm('users', 'edit')) {
    $Form->select_input_array('edited_email_status', $email_status, emadr_get_status_titles(), T_('Email status'), '', array('force_keys_as_values' => true, 'background_color' => emadr_get_status_colors(), 'field_suffix' => $email_status_icon));
} else {
    // Moderators can only view the email status
    $email_status_titles = emadr_get_status_titles();
    $Form->info(T_('Email status'), $email_status_icon . $email_status_titles[$email_status]);
}
global $UserSettings;
// Display notification sender email adderss setting
$default_notification_sender_email = $Settings->get('notification_sender_email');
$notifcation_sender_email = $UserSettings->get('notification_sender_email', $edited_User->ID);
$notifcation_sender_email_note = '';
if (empty($notifcation_sender_email)) {
    $notifcation_sender_email_note = T_('Will use the default sender address which is:') . ' ' . $default_notification_sender_email;
} elseif ($default_notification_sender_email != $notifcation_sender_email) {