コード例 #1
0
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
global $admin_url, $tab;
global $users_numbers, $edited_EmailCampaign;
$Form = new Form(NULL, 'campaign_form');
$Form->begin_form('fform');
$Form->add_crumb('campaign');
$Form->hidden('ctrl', 'campaigns');
$Form->hidden('current_tab', $tab);
$Form->hidden('ecmp_ID', $edited_EmailCampaign->ID);
$Form->begin_fieldset(T_('Campaign info') . get_manual_link('creating-an-email-campaign'));
$Form->text_input('ecmp_name', $edited_EmailCampaign->get('name'), 60, T_('Name'), '', array('maxlength' => 255, 'required' => true));
$Form->text_input('ecmp_email_title', $edited_EmailCampaign->get('email_title'), 60, T_('Email title'), '', array('maxlength' => 255, 'required' => true));
$Form->info(T_('Campaign created'), mysql2localedatetime_spans($edited_EmailCampaign->get('date_ts'), 'M-d'));
$Form->info(T_('Last sent'), $edited_EmailCampaign->get('sent_ts') ? mysql2localedatetime_spans($edited_EmailCampaign->get('sent_ts'), 'M-d') : T_('Not sent yet'));
$Form->end_fieldset();
$Form->begin_fieldset(T_('Newsletter recipients'));
if (!empty($users_numbers)) {
    // We know this data only one time after selecting users
    $Form->info(T_('Number of accounts in filterset'), $users_numbers['all']);
    $Form->info(T_('Number of active accounts in filterset'), $users_numbers['active']);
}
$Form->info(T_('Currently selected recipients'), $edited_EmailCampaign->get_users_count(), '(' . T_('Accounts which accept newsletter emails') . ') - <a href="' . $admin_url . '?ctrl=campaigns&amp;action=change_users&amp;ecmp_ID=' . $edited_EmailCampaign->ID . '">' . T_('Change selection') . ' &gt;&gt;</a>');
$Form->info(T_('Already received'), $edited_EmailCampaign->get_users_count('accept'), '(' . T_('Accounts which have already been sent this newsletter') . ')');
$Form->info(T_('Ready to send'), $edited_EmailCampaign->get_users_count('wait'), '(' . T_('Accounts which have not been sent this newsletter yet') . ')');
$Form->end_fieldset();
$buttons = array();
if ($current_User->check_perm('emails', 'edit')) {
    // User must has a permission to edit emails
    $buttons[] = array('submit', 'actionArray[save]', T_('Save info'), 'SaveButton');
コード例 #2
0
 *
 * {@internal License choice
 * - If you have received this file as part of a package, please find the license.txt file in
 *   the same folder or the closest folder above for complete license terms.
 * - If you have received this file individually (e-g: from http://evocms.cvs.sourceforge.net/)
 *   then you must choose one of the following licenses before using the file:
 *   - GNU General Public License 2 (GPL) - http://www.opensource.org/licenses/gpl-license.php
 *   - Mozilla Public License 1.1 (MPL) - http://www.opensource.org/licenses/mozilla1.1.php
 * }}
 *
 * {@internal Open Source relicensing agreement:
 * }}
 *
 * @package admin
 *
 * @version $Id: _email_sent_details.view.php 349 2011-11-18 11:18:14Z yura $
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
global $MailReturn;
$Form = new Form(NULL, 'mail_returns', 'post', 'compact');
$Form->global_icon(T_('Cancel viewing!'), 'close', regenerate_url('blog'));
$Form->begin_form('fform', sprintf(T_('Returned mail ID#%s'), $MailReturn->emret_ID));
$Form->info(T_('Date'), mysql2localedatetime_spans($MailReturn->emret_timestamp, 'Y-m-d', 'H:i:sP'));
$Form->info(T_('Error Type'), dre_decode_error_type($MailReturn->emret_errtype));
$Form->info(T_('Address'), '<pre class="email_log"><span>' . htmlspecialchars($MailReturn->emret_address) . '</span></pre>');
$Form->info(T_('Error'), '<pre class="email_log"><span>' . htmlspecialchars($MailReturn->emret_errormsg) . '</span></pre>');
$Form->info(T_('Headers'), '<pre class="email_log_scroll"><span>' . htmlspecialchars($MailReturn->emret_headers) . '</span></pre>');
$Form->info(T_('Message'), '<pre class="email_log_scroll"><span>' . htmlspecialchars($MailReturn->emret_message) . '</span></pre>');
$Form->end_form();
コード例 #3
0
// 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();
foreach ($email_status_icons as $status => $icon) {
    // Init js array with email status icons
    ?>
email_status_icons['<?php 
    echo $status;
コード例 #4
0
/**
 * Show affected comments
 *
 * @param array affected Comment list, all comments in this list must have the same status
 * @param string Comment visibility status in this list
 * @param string ban keyword
 * @param integer The number of corresponding comments on which current user has no permission
 */
function echo_affected_comments($affected_comments, $status, $keyword, $noperms_count)
{
    global $current_User;
    $num_comments = count($affected_comments);
    if ($num_comments == 0) {
        if ($noperms_count == 0) {
            // There isn't any affected comment witch corresponding status
            printf('<p>' . T_('No %s comments match the keyword [%s].') . '</p>', '<strong>' . $status . '</strong>', htmlspecialchars($keyword));
        } else {
            // There are affected comment witch corresponding status, but current user has no permission
            printf('<p>' . T_('There are %d matching %s comments, but you have no permission to edit them.') . '</p>', $noperms_count, '<strong>' . $status . '</strong>');
        }
        return;
    }
    echo '<p>';
    if ($current_User->check_perm('blogs', 'editall', false)) {
        // current User has rights to permanently delete comments
        $checkbox_status = 'checked="checked"';
    } else {
        // current User doesn't have rights to permanently delete comments, so disable delete checkbox
        $checkbox_status = 'disabled="disabled"';
    }
    echo '<input type="checkbox" name="del' . $status . '" id="del' . $status . '_cb" value="1" ' . $checkbox_status . '/>';
    echo '<label for="del' . $status . '_cb"> ';
    echo sprintf(T_('Delete the following %s %s comments:'), $num_comments == 500 ? '500+' : $num_comments, '<strong>' . $status . '</strong>');
    echo '</label>';
    echo '</p>';
    echo '<table class="grouped" cellspacing="0">';
    echo '<thead><tr>';
    echo '<th class="firstcol">' . T_('Date') . '</th>';
    echo '<th class="center">' . T_('Auth. IP') . '</th>';
    echo '<th>' . T_('Author') . '</th>';
    echo '<th>' . T_('Auth. URL') . '</th>';
    echo '<th>' . T_('Content starts with...') . '</th>';
    echo '<th class="shrinkwrap">' . T_('Action') . '</th>';
    echo '</tr></thead>';
    $count = 0;
    foreach ($affected_comments as $Comment) {
        echo '<tr class="' . ($count % 2 == 1 ? 'odd' : 'even') . '">';
        echo '<td class="firstcol timestamp">' . mysql2localedatetime_spans($Comment->get('date')) . '</td>';
        echo '<td class="center">' . $Comment->get('author_IP') . '</td>';
        echo '<td>' . $Comment->get_author_name() . '</td>';
        echo '<td>';
        disp_url($Comment->get_author_url(), 50);
        echo '</td>';
        echo '<td>' . strmaxlen(strip_tags($Comment->get_content('raw_text')), 71) . '</td>';
        // no permission check, because affected_comments contains current user editable comments
        echo '<td class="shrinkwrap">' . action_icon(T_('Edit...'), 'edit', '?ctrl=comments&amp;action=edit&amp;comment_ID=' . $Comment->ID) . '</td>';
        echo '</tr>';
        $count++;
    }
    echo "</tbody></table>";
}
コード例 #5
0
 * {@internal Open Source relicensing agreement:
 * }}
 *
 * @package admin
 *
 * @version $Id: _email_sent_details.view.php 349 2011-11-18 11:18:14Z yura $
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
global $MailLog;
$Form = new Form(NULL, 'mail_log', 'post', 'compact');
$Form->global_icon(T_('Cancel viewing!'), 'close', regenerate_url('blog'));
$Form->begin_form('fform', sprintf(T_('Mail log ID#%s'), $MailLog->emlog_ID));
$Form->info(T_('Result'), emlog_result_info($MailLog->emlog_result));
$Form->info(T_('Date'), mysql2localedatetime_spans($MailLog->emlog_timestamp, 'Y-m-d', 'H:i:sP'));
$deleted_user_note = '';
if ($MailLog->emlog_user_ID > 0) {
    $UserCache =& get_UserCache();
    if ($User = $UserCache->get_by_ID($MailLog->emlog_user_ID, false)) {
        $Form->info(T_('To User'), $User->get_identity_link());
    } else {
        $deleted_user_note = '( ' . T_('Deleted user') . ' )';
    }
}
$Form->info(T_('To'), '<pre class="email_log"><span>' . htmlspecialchars($MailLog->emlog_to) . $deleted_user_note . '</span></pre>');
$Form->info(T_('Subject'), '<pre class="email_log"><span>' . htmlspecialchars($MailLog->emlog_subject) . '</span></pre>');
$Form->info(T_('Headers'), '<pre class="email_log"><span>' . htmlspecialchars($MailLog->emlog_headers) . '</span></pre>');
$mail_contents = mail_log_parse_message($MailLog->emlog_headers, $MailLog->emlog_message);
if (!empty($mail_contents)) {
    if (!empty($mail_contents['text'])) {
コード例 #6
0
ファイル: _user.funcs.php プロジェクト: Ariflaw/b2evolution
/**
 * Display message depending on user email status
 *
 * @param integer User ID
 */
function display_user_email_status_message($user_ID = 0)
{
    global $Messages, $current_User, $Blog, $disp;
    if (!is_logged_in() || $user_ID != 0 && $user_ID != $current_User->ID) {
        // User must be logged in AND only for current User
        return;
    }
    $email_status = $current_User->get_email_status();
    if (empty($email_status) || !in_array($email_status, array('redemption', 'warning', 'suspicious1', 'suspicious2', 'suspicious3', 'prmerror'))) {
        // No message for current email status
        return;
    }
    $EmailAddressCache =& get_EmailAddressCache();
    $EmailAddress =& $EmailAddressCache->get_by_name($current_User->get('email'), false, false);
    $is_admin_page = is_admin_page() || empty($Blog);
    if (check_user_status('is_validated')) {
        // Url to user profile page
        $url_change_email = get_user_settings_url('subs');
    } else {
        // Url to activate email address
        $url_change_email = get_activate_info_url(NULL, '&amp;');
    }
    // Url to change status
    if ($is_admin_page) {
        global $admin_url;
        $user_tab_param = get_param('user_tab') != '' ? '&amp;user_tab=' . get_param('user_tab') : '';
        $url_change_status = $admin_url . '?ctrl=user&amp;action=redemption&amp;user_ID=' . $current_User->ID . $user_tab_param . '&amp;' . url_crumb('user');
    } else {
        $user_tab_param = empty($disp) ? 'profile' : $disp;
        $url_change_status = get_secure_htsrv_url() . 'profile_update.php?action=redemption&amp;user_tab=' . $user_tab_param . '&amp;blog=' . $Blog->ID . '&amp;' . url_crumb('user');
    }
    // Display info about last error only when such data exists
    $email_last_sent_ts = empty($EmailAddress) ? '' : $EmailAddress->get('last_sent_ts');
    $last_error_info = empty($email_last_sent_ts) ? '' : ' ' . sprintf(T_('(last error was detected on %s)'), mysql2localedatetime_spans($email_last_sent_ts, 'M-d'));
    switch ($email_status) {
        case 'warning':
        case 'suspicious1':
        case 'suspicious2':
        case 'suspicious3':
            $Messages->add(sprintf(T_('We have detected some delivery problems to your email account %s%s. Please add our email: %s to your address book. If you still don\'t receive our emails, try using a different email address instead of %s for your account.<br /><a %s>Click here to use a different email address</a>.<br /><a %s>Click here to discard this message once you receive our emails again</a>.'), '<b>' . $current_User->get('email') . '</b>', $last_error_info, '<b>' . user_get_notification_sender($current_User->ID, 'email') . '</b>', '<b>' . $current_User->get('email') . '</b>', 'href="' . $url_change_email . '"', 'href="' . $url_change_status . '"'), 'error');
            break;
        case 'prmerror':
            $Messages->add(sprintf(T_('Your email address: %s does not seem to work or is refusing our emails%s. Please check your email address carefully. If it\'s incorrect, <a %s>change your email address</a>. If it\'s correct, please add our email: %s to your address book, then <a %s>click here to try again</a>!'), '<b>' . $current_User->get('email') . '</b>', $last_error_info, 'href="' . $url_change_email . '"', '<b>' . user_get_notification_sender($current_User->ID, 'email') . '</b>', 'href="' . $url_change_status . '"'), 'error');
            break;
        case 'redemption':
            $Messages->add(sprintf(T_('We are currently trying to send email to your address: %s again.'), '<b>' . $current_User->get('email') . '</b>'), 'note');
            break;
    }
}