X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fdownload.php;h=1718a8620e19a729fa25d1f6795a453e3556bcd2;hb=1f78253f071eafbaeb423bd0c5918287dc894a53;hp=b148bb1c5a36856f250e1d944fdfada31ce933c7;hpb=26674f442a5df74ffc2476a8389e2e69ad52c874;p=squirrelmail.git
diff --git a/src/download.php b/src/download.php
index b148bb1c..1718a862 100644
--- a/src/download.php
+++ b/src/download.php
@@ -3,379 +3,153 @@
/**
* download.php
*
- * Copyright (c) 1999-2002 The SquirrelMail Project Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
* Handles attachment downloads to the users computer.
* Also allows displaying of attachments when possible.
*
- * $Id$
+ * @copyright © 1999-2007 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
+ * @package squirrelmail
*/
-require_once('../src/validate.php');
-require_once('../functions/imap.php');
-require_once('../functions/mime.php');
-require_once('../functions/date.php');
-require_once('../functions/html.php');
-
-header('Pragma: ');
-header('Cache-Control: cache');
-
-function viewText($color, $body, $id, $entid, $mailbox, $type1, $wrap_at, $imapConnection) {
- global $where, $what, $charset;
- global $startMessage;
-
- displayPageHeader($color, 'None');
-
- if ($where && $what) {
- // from a search
- $message_link_str = "". _("View message") . "";
- } else {
- $message_link_str = "". _("View message") . "";
- }
- $urlmailbox = urlencode($mailbox);
-
- echo '
' .
- html_tag( 'table',
- html_tag( 'tr',
- html_tag( 'td',
- '
". - //" |
";
-
- 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". - " |