コード例 #1
0
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
global $edited_EmailBlocked;
// 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,emblk_ID'));
$Form->begin_form('fform', $creating ? T_('New email address') : T_('Email address'));
$Form->add_crumb('email_blocked');
$Form->hidden('action', 'blocked_save');
$Form->hiddens_by_key(get_memorized('action'));
$Form->text_input('emblk_address', $edited_EmailBlocked->get('address'), 50, T_('Email address'), '', array('maxlength' => 255, 'required' => true));
$email_status_icon = '<div id="email_status_icon">' . emblk_get_status_icon($edited_EmailBlocked->get('status')) . '</div>';
$Form->select_input_array('emblk_status', $edited_EmailBlocked->get('status'), emblk_get_status_titles(), 'Status', '', array('force_keys_as_values' => true, 'background_color' => emblk_get_status_colors(), 'required' => true, 'field_suffix' => $email_status_icon));
$Form->info(T_('Last sent date'), mysql2localedatetime_spans($edited_EmailBlocked->get('last_sent_ts'), "M-d"));
$Form->text_input('emblk_sent_count', $edited_EmailBlocked->get('sent_count'), 20, T_('Sent count'), '');
$Form->text_input('emblk_sent_last_returnerror', $edited_EmailBlocked->get('sent_last_returnerror'), 20, T_('Sent count since last error'), '');
$Form->info(T_('Last error date'), mysql2localedatetime_spans($edited_EmailBlocked->get('last_error_ts'), "M-d"));
$Form->text_input('emblk_prmerror_count', $edited_EmailBlocked->get('prmerror_count'), 20, T_('Permanent errors count'), '');
$Form->text_input('emblk_tmperror_count', $edited_EmailBlocked->get('tmperror_count'), 20, T_('Temporary errors count'), '');
$Form->text_input('emblk_spamerror_count', $edited_EmailBlocked->get('spamerror_count'), 20, T_('Spam errors count'), '');
$Form->text_input('emblk_othererror_count', $edited_EmailBlocked->get('othererror_count'), 20, T_('Other errors count'), '');
if ($creating) {
    $Form->end_form(array(array('submit', 'submit', T_('Record'), 'SaveButton'), array('reset', '', T_('Reset'), 'ResetButton')));
} else {
    $Form->end_form(array(array('submit', 'submit', T_('Update'), 'SaveButton'), array('reset', '', T_('Reset'), 'ResetButton')));
}
?>
コード例 #2
0
$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="roundbutton">' . 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' => 100, 'required' => true));
// Get status of email from T_email_blocked table
load_class('tools/model/_emailblocked.class.php', 'EmailBlocked');
$EmailBlockedCache =& get_EmailBlockedCache();
if ($EmailBlocked =& $EmailBlockedCache->get_by_name($edited_User->get('email'), false, false)) {
    // The email of this user is located in the T_email_blocked table
    $email_status = $EmailBlocked->get('status');
} else {
    // There is no email address in the T_email_blocked table
    $email_status = 'unknown';
}
$email_status_icon = '<div id="email_status_icon">' . emblk_get_status_icon($email_status) . '</div>';
$Form->select_input_array('edited_email_status', $email_status, emblk_get_status_titles(), T_('Email status'), '', array('force_keys_as_values' => true, 'background_color' => emblk_get_status_colors(), 'field_suffix' => $email_status_icon));
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) {
    $notifcation_sender_email_note = get_icon('warning_yellow') . ' ' . T_('This is different from the new sender address which is currently:') . ' ' . $default_notification_sender_email;
}
$Form->text_input('notification_sender_email', $notifcation_sender_email, 50, T_('Sender email address'), $notifcation_sender_email_note);
// Display notification sender name setting
$default_notification_sender_name = $Settings->get('notification_sender_name');
$notification_sender_name = $UserSettings->get('notification_sender_name', $edited_User->ID);