$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>'; 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; } //update notified mail state if ($content["new"] == '1') {
echo '<tr><td>' . $ml_answered . ':</td><td>'; $radio_list = new radio_list('answered', $answered); $radio_list->add_option('', $ml_doesnt_matter); $radio_list->add_option('ANSWERED', $cmdYes); $radio_list->add_option('UNANSWERED', $cmdNo); echo '</td></tr>'; echo '</table>'; echo '</td></tr>'; echo '<tr><td colspan="2">'; $button = new button($cmdSearch, 'javascript:document.forms[0].submit();'); echo '</td></tr>'; echo '</table>'; $tabtable->print_foot(); if ($query != '') { $messages_display = ''; $msg_count = $mail->search($em_settings['sort_field'], $em_settings['sort_order'], $query); $mail->get_messages($first_row, $max_rows); $filters = array(); //if there are new messages get the filters $email->get_filters($account['id']); while ($email->next_record()) { $filter["field"] = $email->f("field"); $filter["folder"] = $email->f("folder"); $filter["keyword"] = $email->f("keyword"); $filters[] = $filter; } while ($mail->next_message(true)) { $continue = false; //check if message is new and apply users filters to new messages only in the inbox folder. if ($mail->f('new') == 1) { if (strtolower($mailbox) == "inbox") {