X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Fdownload.php;h=0ca78cf0ceeb0c4e0204c600364b699c90c094c8;hp=b148bb1c5a36856f250e1d944fdfada31ce933c7;hb=88d916ee496df4d2bc62da432048fb9f567d72b5;hpb=26674f442a5df74ffc2476a8389e2e69ad52c874;ds=sidebyside
diff --git a/src/download.php b/src/download.php
index b148bb1c..0ca78cf0 100644
--- a/src/download.php
+++ b/src/download.php
@@ -12,371 +12,105 @@
* $Id$
*/
-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');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'include/validate.php');
+require_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'functions/mime.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". - " |