X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fview_text.php;h=54ddf14217f278a8ecb0bd2983ce4e4af37e2e2f;hb=e842b215cc74203501fe50e52497f9f0329e721b;hp=7e856659dd3b0338e1d754cf14de29db40534338;hpb=08185f2a7631c3a12cb1ac085fec3be471b56b00;p=squirrelmail.git diff --git a/src/view_text.php b/src/view_text.php index 7e856659..54ddf142 100644 --- a/src/view_text.php +++ b/src/view_text.php @@ -3,7 +3,7 @@ /** * view_text.php -- Displays the main frameset * - * Copyright (c) 1999-2002 The SquirrelMail development team + * Copyright (c) 1999-2003 The SquirrelMail development team * Licensed under the GNU GPL. For full terms see the file COPYING. * * Who knows what this file does. However PUT IT HERE DID NOT PUT @@ -18,14 +18,30 @@ define('SM_PATH','../'); /* SquirrelMail required files. */ require_once(SM_PATH . 'include/validate.php'); +require_once(SM_PATH . 'functions/global.php'); require_once(SM_PATH . 'functions/imap.php'); require_once(SM_PATH . 'functions/mime.php'); require_once(SM_PATH . 'functions/html.php'); - -$mailbox = urldecode($mailbox); -if (!isset($passed_ent_id)) { - $passed_ent_id = ''; + +sqgetGlobalVar('key', $key, SQ_COOKIE); +sqgetGlobalVar('username', $username, SQ_SESSION); +sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION); +sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION); +sqgetGlobalVar('QUERY_STRING', $QUERY_STRING, SQ_SERVER); +sqgetGlobalVar('messages', $messages); +sqgetGlobalVar('passed_id', $passed_id, SQ_GET); + +if ( sqgetGlobalVar('mailbox', $temp, SQ_GET) ) { + $mailbox = $temp; +} +if ( !sqgetGlobalVar('ent_id', $ent_id, SQ_GET) ) { + $ent_id = ''; } +if ( !sqgetGlobalVar('passed_ent_id', $passed_ent_id, SQ_GET) ) { + $passed_ent_id = ''; +} + + $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); $mbx_response = sqimap_mailbox_select($imapConnection, $mailbox); @@ -63,6 +79,14 @@ echo '
'. "". "
". "
"; + + if (isset($languages[$squirrelmail_language]['XTRA_CODE']) && + function_exists($languages[$squirrelmail_language]['XTRA_CODE'])) { + if (mb_detect_encoding($body) != 'ASCII') { + $body = $languages[$squirrelmail_language]['XTRA_CODE']('decode', $body); + } + } + if ($type1 == 'html' || (isset($override_type1) && $override_type1 == 'html')) { $body = MagicHTML( $body, $passed_id, $message, $mailbox); } else {