-function view_header($template_vars, $pageheader='', $pagefooter='') {
- global $color;
-
- echo $pageheader;
- echo '<BR>' .
- '<TABLE WIDTH="100%" CELLPADDING="2" CELLSPACING="0" BORDER="0"'.
- ' ALIGN="CENTER">' . "\n" .
- " <TR><TD BGCOLOR=\"$color[9]\" WIDTH=\"100%\" ALIGN=\"CENTER\"><B>".
- _("Viewing Full Header") . '</B> - '.
- '<a href="';
- echo_template_var($template_vars['return_address']);
- echo '">' ._("View message") . "</a></b></td></tr></table>\n";
+/* get global vars */
+if ( sqgetGlobalVar('passed_id', $temp, SQ_GET) ) {
+ $passed_id = (int) $temp;
+}
+if ( sqgetGlobalVar('mailbox', $temp, SQ_GET) ) {
+ $mailbox = $temp;
+}
+if ( !sqgetGlobalVar('passed_ent_id', $passed_ent_id, SQ_GET) ) {
+ $passed_ent_id = '';
+}
+sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
+
+$imapConnection = sqimap_login($username, false, $imapServerAddress,
+ $imapPort, 0);
+$mbx_response = sqimap_mailbox_select($imapConnection, $mailbox, false, false, true);
+$header = parse_viewheader($imapConnection,$passed_id, $passed_ent_id);