From facf44e7f650a129a5a483bf140696a5ae369e73 Mon Sep 17 00:00:00 2001 From: stekkel Date: Thu, 1 Aug 2002 10:25:40 +0000 Subject: [PATCH] Clean up download.php git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3224 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/view_text.php | 66 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 src/view_text.php diff --git a/src/view_text.php b/src/view_text.php new file mode 100644 index 00000000..da200a55 --- /dev/null +++ b/src/view_text.php @@ -0,0 +1,66 @@ +getEntity($passed_ent_id); + + $header = $message->header; + $charset = $header->charset; + $type0 = $header->type0; + $type1 = $header->type1; + $encoding = strtolower($header->encoding); + + $msg_url = 'read_body.php?' . $QUERY_STRING; + + $body = mime_fetch_body($imapConnection, $passed_id, $passed_ent_id); + $body = decodeBody($body, $encoding); + + displayPageHeader($color, 'None'); + + echo "
". + "
". + _("Viewing a text attachment") . " - "; + echo ''. _("View message") . ''; + + $dwnld_url = '../src/download.php?'. $QUERY_STRING.'&absolute_dl=1'; + echo '
'. + _("Download this as a file"). + "

". + "". + "
". + "
". + "
"; + + if ($type1 == 'html') { + $msg = sqimap_get_message($imapConnection, $passed_id, $mailbox); + $msg = $msg->getEntity($passed_ent_id); + $body = MagicHTML( $body, $passed_id, $msg ); + } else { + translateText($body, $wrap_at, $charset); + } + echo $body . + "
"; +?> -- 2.25.1