From be61c5a630aaefd93376144bd059e8e5d61d80a0 Mon Sep 17 00:00:00 2001 From: stekkel Date: Tue, 30 Jul 2002 10:01:50 +0000 Subject: [PATCH] make view header a standalone unit git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3173 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/view_header.php | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/src/view_header.php b/src/view_header.php index 9fcf8f1d..2cf9d1fa 100644 --- a/src/view_header.php +++ b/src/view_header.php @@ -10,7 +10,10 @@ * * $Id$ */ - +require_once('../src/validate.php'); +require_once('../functions/imap.php'); +require_once('../functions/html.php'); +require_once('../functions/url_parser.php'); function parse_viewheader($imapConnection,$id, $passed_ent_id) { global $uid_support; @@ -64,20 +67,23 @@ function parse_viewheader($imapConnection,$id, $passed_ent_id) { return $header_output; } -function view_header($template_vars, $pageheader='', $pagefooter='') { - global $color; - - echo $pageheader; +function view_header($header, $mailbox, $color) { + global $QUERY_STRING, $base_uri; + + $ret_addr = $base_uri . 'src/read_body.php?'.$QUERY_STRING; + + displayPageHeader($color, $mailbox); + echo '
' . '' . "\n" . "
". _("Viewing Full Header") . ' - '. '' ._("View message") . "
\n"; - echo_template_var($template_vars['full_header'], + echo_template_var($header, array( "\n".'
', @@ -86,7 +92,19 @@ function view_header($template_vars, $pageheader='', $pagefooter='') { '', '
'."\n" ) ); - echo $pagefooter; + echo ''; } +if (!isset($passed_ent_id)) { + $passed_ent_id = ''; +} +$mailbox = decodeHeader($mailbox); + +$imapConnection = sqimap_login($username, $key, $imapServerAddress, + $imapPort, 0); +$mbx_response = sqimap_mailbox_select($imapConnection, $mailbox, false, false, true); + +$header = parse_viewheader($imapConnection,$passed_id, $passed_ent_id); +view_header($header, $mailbox, $color); + ?> -- 2.25.1