X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fdownload.php;h=b148bb1c5a36856f250e1d944fdfada31ce933c7;hb=3af964611717f76e19fb38df9f8fa3c1cd0b23fe;hp=b247350b1240ee829b50745c3a44d5188d2b6da4;hpb=2a32fc83f95eba42be0d1752ef685adf10e1edc9;p=squirrelmail.git diff --git a/src/download.php b/src/download.php index b247350b..b148bb1c 100644 --- a/src/download.php +++ b/src/download.php @@ -1,90 +1,519 @@ - - session_start(); - - if (!isset($config_php)) - include("../config/config.php"); - if (!isset($strings_php)) - include("../functions/strings.php"); - if (!isset($page_header_php)) - include("../functions/page_header.php"); - if (!isset($imap_php)) - include("../functions/imap.php"); - if (!isset($mime_php)) - include("../functions/mime.php"); - if (!isset($date_php)) - include("../functions/date.php"); - - include("../src/load_prefs.php"); - - function viewText($color, $body, $id, $entid, $mailbox, $type1, $wrap_at) { - echo "
\n"; - displayPageHeader($color, "None"); - - echo "";
- echo " |
";
- $urlmailbox = urlencode($mailbox);
- echo " "; - if ($type1 == "html") - echo $body; - else - echo translateText($body, $wrap_at); - - echo " |
". + //" |
";
+
+ html_tag( 'table',
+ html_tag( 'tr',
+ html_tag( 'td', '' . $body . '', 'left', $color[4] )
+ ) ,
+ 'center', '', 'width="98%" border="0" cellspacing="0" cellpadding="2"' );
+}
+
+function viewMessage($imapConnection, $id, $mailbox, $ent_id, $color, $wrap_at, $extracted) {
+ global $startMessage;
+
+
+ $msg = sqimap_get_message($imapConnection, $id, $mailbox);
+ $msg = getEntity($msg, $ent_id);
+
+ $header = sqimap_get_ent_header($imapConnection,$id,$mailbox,$ent_id);
+ $header->id = $id;
+ $msg->header = $header;
+
+ $ent_ar = findDisplayEntity($msg, 0);
+ $body = '';
+ for ($i = 0; $i < count($ent_ar); $i++) {
+ $body .= formatBody($imapConnection, $msg, $color, $wrap_at, $ent_ar[$i], false);
+ }
+
+ $bodyheader = viewHeader($header, $color);
+ displayPageHeader($color, 'None');
+
+ echo ' ' . + html_tag( 'table', '', 'center', '', 'width="100%" border="0" cellspacing="0" cellpadding="2"' ); + + if ($extracted) { + echo html_tag( 'tr', + html_tag( 'td', ' Message succesfully extracted". + " |