예제 #1
0
?>
" />
<input type="hidden" name="account_id" value="<?php 
echo $account['id'];
?>
" />
<?php 
if ($account) {
    if ($mail->open($account['host'], $account['type'], $account['port'], $account['username'], $GO_CRYPTO->decrypt($account['password']), $mailbox, 0, $account['use_ssl'], $account['novalidate_cert'])) {
        //block email to spam folder
        if (isset($_REQUEST['spam_uid']) && $_REQUEST['spam_uid'] > 0) {
            $spam_folder = $account['spam'];
            if ($_REQUEST['spam_address'] != '' && $spam_folder != '') {
                $email->add_filter($account['id'], "sender", smart_addslashes($_REQUEST['spam_address']), addslashes($spam_folder));
                $messages[] = $_REQUEST['spam_uid'];
                $mail->move($spam_folder, $messages);
            }
        }
    } else {
        echo '<p class="Error">' . $ml_connect_failed . ' \'' . $account['host'] . '\' ' . $ml_at_port . ': ' . $account['port'] . '</p>';
        echo '<p class="Error">' . imap_last_error() . '</p>';
        require $GO_THEME->theme_path . 'footer.inc';
        exit;
    }
    require "navigation.inc";
} else {
    echo '<br /><h3>' . $ml_no_accounts . '</h3><p class="normal">' . $ml_text . '</p>';
}
echo '</form>';
$mail->close();
require $GO_THEME->theme_path . "footer.inc";
예제 #2
0
$uid = isset($_REQUEST['uid']) ? $_REQUEST['uid'] : 0;
$max_rows = isset($_REQUEST['max_rows']) ? $_REQUEST['max_rows'] : $_SESSION['GO_SESSION']['max_rows_list'];
$first_row = isset($_REQUEST['first_row']) ? $_REQUEST['first_row'] : 0;
$table_tabindex = isset($_REQUEST['table_tabindex']) ? $_REQUEST['table_tabindex'] : null;
$return_to = isset($_REQUEST['return_to']) && $_REQUEST['return_to'] != '' ? $_REQUEST['return_to'] : null;
$link_back = isset($_REQUEST['link_back']) && $_REQUEST['link_back'] != '' ? $_REQUEST['link_back'] : $_SERVER['REQUEST_URI'];
$task = isset($_REQUEST['task']) && $_REQUEST['task'] != '' ? $_REQUEST['task'] : '';
$print = isset($_REQUEST['print']) ? true : false;
$part = isset($_REQUEST['part']) ? $_REQUEST['part'] : '';
$query = isset($_REQUEST['query']) ? $_REQUEST['query'] : '';
$account = $email->get_account($account_id);
if ($account && $mail->open($account['host'], $account['type'], $account['port'], $account['username'], $GO_CRYPTO->decrypt($account['password']), $mailbox, 0, $account['use_ssl'], $account['novalidate_cert'])) {
    if ($task == 'move_mail') {
        $messages = array($uid);
        $move_to_mailbox = smartstrip($_REQUEST['move_to_mailbox']);
        if ($mail->move($move_to_mailbox, $messages) && $mail->reopen($move_to_mailbox)) {
            header('Location: ' . $GO_MODULES->url . 'index.php?account_id=' . $account_id . '&mailbox=' . $mailbox);
            exit;
        }
    }
    //sort messages for determination of previous and next message
    if ($query != '') {
        $mail->search($em_settings['sort_field'], $em_settings['sort_order'], base64_decode($query));
    } else {
        $mail->sort($em_settings['sort_field'], $em_settings['sort_order']);
    }
    $content = $mail->get_message($uid, 'html', $part);
    $subject = !empty($content["subject"]) ? $content["subject"] : $ml_no_subject;
} else {
    require $GO_THEME->theme_path . 'header.inc';
    echo '<table border="0" cellpadding="10" width="100%"><tr><td>';
예제 #3
0
    $image_string = '<img src="' . $GO_THEME->images['arrow_down'] . '" border="0" />';
    $new_sort_order = 0;
} else {
    $image_string = '<img src="' . $GO_THEME->images['arrow_up'] . '" border="0" />';
    $new_sort_order = 1;
}
if ($_SERVER['REQUEST_METHOD'] == "POST" && isset($_POST['messages'])) {
    switch ($_POST['form_action']) {
        case 'delete':
            if ($mailbox == $account['trash'] || $account['type'] == 'pop3' || $account['trash'] == '') {
                $mail->delete($_POST['messages']);
                //set this var so we can check if unseen messages were deleted
                //if so, the auto mail checker must now too.
                $unseen_state_changed = true;
            } else {
                $mail->move($account['trash'], $_POST['messages']);
            }
            break;
        case 'move':
            $mail->move(smartstrip($_POST['folder']), $_POST['messages']);
            break;
        case 'set_flag':
            switch ($_POST['flag']) {
                case 'read':
                    //set this var so we can check if unseen messages were deleted
                    //if so, the auto mail checker must now too.
                    $unseen_state_changed = true;
                    $mail->set_message_flag($mailbox, $_POST['messages'], "\\Seen");
                    break;
                case 'unread':
                    //set this var so we can check if unseen messages were deleted