From e55c441acad8944c234ca69c02558c3ec73fd2e6 Mon Sep 17 00:00:00 2001 From: stekkel Date: Tue, 22 Oct 2002 19:11:50 +0000 Subject: [PATCH] rollback take 99 git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3931 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/read_body.php | 81 +++++++++++++++++++---------------------------- 1 file changed, 33 insertions(+), 48 deletions(-) diff --git a/src/read_body.php b/src/read_body.php index 77a53162..1ac417cf 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -23,7 +23,6 @@ require_once(SM_PATH . 'functions/date.php'); require_once(SM_PATH . 'functions/url_parser.php'); require_once(SM_PATH . 'functions/html.php'); - /** * Given an IMAP message id number, this will look it up in the cached * and sorted msgs array and return the index. Used for finding the next @@ -474,12 +473,9 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp $topbar_delimiter = ' | '; $urlMailbox = urlencode($mailbox); - $sNav = $sCmp = ''; - $sBar = ''; - $sBar .= ''; - $sBar .= '
' - ._("Navigation").': '; + $s = '' . "\n"; - $sBar .= ''; - $sBar .= '' . "\n" . '
'; + $msgs_url = $base_uri . 'src/'; if (isset($where) && isset($what)) { $msgs_url .= 'search.php?where=' . urlencode($where) . @@ -490,8 +486,8 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp $startMessage . '&mailbox=' . $urlMailbox; $msgs_str = _("Message List"); } - $sNav = '' . $msgs_str . ''; - $sNav .= $topbar_delimiter; + $s .= '' . $msgs_str . ''; + $s .= $topbar_delimiter; $delete_url = $base_uri . 'src/delete_message.php?mailbox=' . $urlMailbox . '&message=' . $passed_id . '&'; @@ -501,7 +497,7 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp } else { $delete_url .= 'sort=' . $sort . '&startMessage=' . $startMessage; } - $sNav .= '' . _("Delete") . ''; + $s .= '' . _("Delete") . ''; } $comp_uri = $base_uri . 'src/compose.php' . @@ -524,12 +520,12 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp $comp_alt_string = _("Edit Message as New"); } if (isset($comp_alt_uri)) { - $sCmp .= $link_open . $comp_alt_uri . $link_close . $comp_alt_string . ''; - $sCmp .= $topbar_delimiter; + $s .= $topbar_delimiter; + $s .= $link_open . $comp_alt_uri . $link_close . $comp_alt_string . ''; } -// $sNav .= ''; - $sNav .= '    '; + $s .= ''; + if (!(isset($where) && isset($what)) && !$passed_ent_id) { $prev = findPreviousMessage($mbx_response['EXISTS'], $passed_id); $next = findNextMessage($passed_id); @@ -537,23 +533,23 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp $uri = $base_uri . 'src/read_body.php?passed_id='.$prev. '&mailbox='.$urlMailbox.'&sort='.$sort. '&startMessage='.$startMessage.'&show_more=0'; - $sNav .= ''._("Previous").''; + $s .= ''._("Previous").''; } else { - $sNav .= _("Previous"); + $s .= _("Previous"); } - $sNav .= $topbar_delimiter; + $s .= $topbar_delimiter; if ($next != -1) { $uri = $base_uri . 'src/read_body.php?passed_id='.$next. '&mailbox='.$urlMailbox.'&sort='.$sort. '&startMessage='.$startMessage.'&show_more=0'; - $sNav .= ''._("Next").''; + $s .= ''._("Next").''; } else { - $sNav .= _("Next"); + $s .= _("Next"); } } else if (isset($passed_ent_id) && $passed_ent_id) { /* code for navigating through attached message/rfc822 messages */ $url = set_url_var($PHP_SELF, 'passed_ent_id',0); - $sNav .= ''._("View Message").''; + $s .= ''._("View Message").''; $entities = array(); $entity_count = array(); $c = 0; @@ -576,42 +572,37 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp . set_url_var($PHP_SELF, 'passed_ent_id', $next_ent_id) . '">' . $next_link . ''; } - $sNav .= $topbar_delimiter . $prev_link; + $s .= $topbar_delimiter . $prev_link; $par_ent_id = $message->parent->entity_id; if ($par_ent_id) { $par_ent_id = substr($par_ent_id,0,-2); - $sNav .= $topbar_delimiter; + $s .= $topbar_delimiter; $url = set_url_var($PHP_SELF, 'passed_ent_id',$par_ent_id); - $sNav .= ''._("Up").''; + $s .= ''._("Up").''; } - $sNav .= $topbar_delimiter . $next_link; - + $s .= $topbar_delimiter . $next_link; } - $sBar .= $sNav . '
' - ._("Compose").': '; + $s .= ''; $comp_action_uri = $comp_uri . '&action=forward'; - $sCmp .= $link_open . $comp_action_uri . $link_close . _("Forward") . ''; - $sCmp .= $topbar_delimiter; + $s .= $link_open . $comp_action_uri . $link_close . _("Forward") . ''; + $s .= $topbar_delimiter; if ($enable_forward_as_attachment) { $comp_action_uri = $comp_uri . '&action=forward_as_attachment'; - $sCmp .= $link_open . $comp_action_uri . $link_close . _("Forward as Attachment") . ''; - $sCmp .= $topbar_delimiter; + $s .= $link_open . $comp_action_uri . $link_close . _("Forward as Attachment") . ''; + $s .= $topbar_delimiter; } $comp_action_uri = decodeHeader($comp_uri . '&action=reply'); - $sCmp .= $link_open . $comp_action_uri . $link_close . _("Reply") . ''; - $sCmp .= $topbar_delimiter; + $s .= $link_open . $comp_action_uri . $link_close . _("Reply") . ''; + $s .= $topbar_delimiter; $comp_action_uri = $comp_uri . '&action=reply_all'; - $sCmp .= $link_open . $comp_action_uri . $link_close . _("Reply All") . ''; - - $sBar .= $sCmp .'
'; + $s .= $link_open . $comp_action_uri . $link_close . _("Reply All") . ''; + $s .= '
'; do_hook("read_body_menu_top"); - echo $sBar; + echo $s; do_hook("read_body_menu_bottom"); } @@ -680,10 +671,6 @@ if (isset($_GET['startMessage'])) { elseif (isset($_POST['startMessage'])) { $startMessage = $_POST['startMessage']; } -if (isset($_GET['view_unsafe_images'])) { - $view_unsafe_images = $_GET['view_unsafe_images']; -} - if (isset($_GET['show_more'])) { $show_more = $_GET['show_more']; } @@ -824,7 +811,7 @@ for ($i = 0; $i < $cnt; $i++) { $messagebody .= '
'; } } -echo ''; + displayPageHeader($color, $mailbox); formatMenuBar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_response); formatEnvheader($mailbox, $passed_id, $passed_ent_id, $message, $color, $FirstTimeSee); @@ -859,13 +846,11 @@ if ($attachmentsdisplay) { echo '
'; echo $attachmentsdisplay; echo '
'; + echo ' '; echo ' '; echo ' '; echo ' '; } -echo ''."\n"; - echo ''; /* show attached images inline -- if pref'fed so */ @@ -894,7 +879,7 @@ sqimap_logout($imapConnection); /* sessions are written at the end of the script. it's better to register them at the end so we avoid double session_register calls */ sqsession_register($messages,'messages'); -echo ''; + ?> -- 2.25.1