* @package squirrelmail
*/
+/** This is the read_body page */
+define('PAGE_NAME', 'read_body');
+
/**
* Include the SquirrelMail initialization file.
*/
}
function SendMDN ( $mailbox, $passed_id, $message, $imapConnection) {
- global $username, $attachment_dir, $color,
- $squirrelmail_language, $default_charset,
+ global $squirrelmail_language, $default_charset,
$languages, $useSendmail, $domain, $sent_folder;
sqgetGlobalVar('SERVER_NAME', $SERVER_NAME, SQ_SERVER);
}
$rfc822_header->content_type = $content_type;
$rfc822_header->to[] = $header->dnt;
- $rfc822_header->subject = _("Read:") . ' ' . encodeHeader($header->subject);
+ $rfc822_header->subject = _("Read:") . ' ' . decodeHeader($header->subject,true,false);
$idents = get_identities();
$needles = array();
_("Server replied:") . ' ' . $deliver->dlv_ret_nr . ' ' .
nl2br(htmlspecialchars($deliver->dlv_server_msg));
}
- plain_error_message($msg, $color);
+ plain_error_message($msg);
} else {
unset ($deliver);
if (sqimap_mailbox_exists ($imapConnection, $sent_folder)) {
}
function formatRecipientString($recipients, $item ) {
- global $show_more_cc, $show_more, $show_more_bcc,
+ global $show_more, $show_more_cc, $show_more_bcc,
$PHP_SELF, $oTemplate;
$string = '';
$oTemplate->assign('xmailer', decodeHeader($header->xmailer));
$env[_("Mailer")] = $oTemplate->fetch('read_xmailer.tpl');
}
+
+ // this is used for both mdn and also general use for plugins, etc
+ $oTemplate->assign('first_time_reading', $FirstTimeSee);
+
if ($default_use_mdn) {
if ($mdn_user_support) {
if ($header->dnt) {
}
}
- // this is used for both mdn and also general use for plugins, etc
- $oTemplate->assign('first_time_reading', $FirstTimeSee);
-
$statuses = array();
if (isset($aMailbox['MSG_HEADERS'][$passed_id]['FLAGS'])) {
if (isset($aMailbox['MSG_HEADERS'][$passed_id]['FLAGS']['\\deleted']) &&
/**
* Format message toolbar
*
- * @param string $mailbox Name of current mailbox
+ * @param array $aMailbox Current mailbox information array
* @param int $passed_id UID of current message
* @param int $passed_ent_id Id of entity within message
* @param object $message Current message object
$urlMailbox = urlencode($mailbox);
- $msgs_url = $base_uri . 'src/';
-
// Create Prev & Next links
// Handle nested entities first (i.e. Mime Attach parts)
$prev_href = $next_href = $up_href = $del_href = $del_prev_href = $del_next_href = '';
}
}
- // Start with Search Results or Message List link.
- $list_xtra = "?where=read_body.php&what=$what&mailbox=" . $urlMailbox.
- "&startMessage=$startMessage";
- $msg_list_href = $base_uri .'src/right_main.php'. $list_xtra;
- $search_href = $where=='search.php' ? $base_uri .'src/search.php?'.$list_xtra : '';
+ $msg_list_href = get_message_list_uri($aMailbox['NAME'], $startMessage, $what);
+ if ($where == 'search.php')
+ $search_href = str_replace('read_body.php', 'search.php', $msg_list_href);
+ else
+ $search_href = '';
$comp_uri = $base_uri.'src/compose.php' .
'?passed_id=' . $passed_id .
sqgetGlobalVar('mailbox_cache',$mailbox_cache,SQ_SESSION);
/* end of get globals */
-global $sqimap_capabilities, $lastTargetMailbox;
$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0);
$aMailbox = sqm_api_mailbox_select($imapConnection, $iAccount, $mailbox,array('setindex' => $what, 'offset' => $startMessage),array());
sqsession_register($mailbox_cache,'mailbox_cache');
$_SESSION['mailbox_cache'] = $mailbox_cache;
+// message list URI is used in page header when on read_body
+$oTemplate->assign('message_list_href', get_message_list_uri($aMailbox['NAME'], $startMessage, $what));
+
displayPageHeader($color, $mailbox,'','');
-formatMenuBar($aMailbox, $passed_id, $passed_ent_id, $message,false);
+formatMenubar($aMailbox, $passed_id, $passed_ent_id, $message,false);
formatEnvheader($aMailbox, $passed_id, $passed_ent_id, $message, $color, $FirstTimeSee);
$oTemplate->assign('message_body', $messagebody);
$oTemplate->display('read_display_images_inline.tpl');
}
-formatMenuBar($aMailbox, $passed_id, $passed_ent_id, $message, false, FALSE);
+formatMenubar($aMailbox, $passed_id, $passed_ent_id, $message, false, FALSE);
do_hook('read_body_bottom', $null);
sqimap_logout($imapConnection);
$oTemplate->display('footer.tpl');
-?>