X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Fread_body.php;h=46591cb7be5cc9633d14e550f150ae074a05b993;hp=838e402c915bfb8c4803ed5a0d10a8a81a493e65;hb=32b3d87eb50fd8a021cc5711aae022532a8cad12;hpb=32c7898caf59016a8b858f2dc3beb7f9e0049064 diff --git a/src/read_body.php b/src/read_body.php index 838e402c..46591cb7 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -1,20 +1,27 @@ - include("../config/config.php"); - include("../functions/strings.php"); - include("../functions/page_header.php"); - include("../functions/imap.php"); - include("../functions/mime.php"); - include("../functions/mailbox.php"); - include("../functions/date.php"); + 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"); - $imapConnection = loginToImapServer($username, $key, $imapServerAddress); - selectMailbox($imapConnection, $mailbox, $numMessages); + $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); + sqimap_mailbox_select($imapConnection, $mailbox); // $message contains all information about the message // including header and body - $message = fetchMessage($imapConnection, $passed_id, $mailbox); + $message = sqimap_get_message($imapConnection, $passed_id, $mailbox); echo ""; echo "
\n"; @@ -49,11 +56,11 @@ if (count($to_ary) > 1) { if ($show_more == false) { if ($i == 1) { - $to_string = "$to_string ($echo_more)"; + $to_string = "$to_string ($echo_more)"; $i = count($to_ary); } } else if ($i == 1) { - $to_string = "$to_string ($echo_less)"; + $to_string = "$to_string ($echo_less)"; } } } @@ -73,18 +80,18 @@ if (count($cc_ary) > 1) { if ($show_more_cc == false) { if ($i == 1) { - $cc_string = "$cc_string ($echo_more)"; + $cc_string = "$cc_string ($echo_more)"; $i = count($cc_ary); } } else if ($i == 1) { - $cc_string = "$cc_string ($echo_less)"; + $cc_string = "$cc_string ($echo_less)"; } } } /** make sure everything will display in HTML format **/ - $from_name = htmlspecialchars($message["HEADER"]["FROM"]); - $subject = htmlspecialchars(stripslashes($message["HEADER"]["SUBJECT"])); + $from_name = decodeHeader(htmlspecialchars($message["HEADER"]["FROM"])); + $subject = decodeHeader(htmlspecialchars(stripslashes($message["HEADER"]["SUBJECT"]))); echo "\n"; - echo " "; echo _("Subject:"); - echo "\n"; echo " | \n"; - echo " $subject\n"; + echo " $subject\n"; echo " | \n"; echo "
\n"; - echo " "; echo _("From:"); - echo "\n"; echo " | \n"; - echo " $from_name\n"; + echo " $from_name\n"; echo " | \n"; echo "
\n"; - echo " "; echo _("Date:"); - echo "\n"; echo " | \n"; - echo " $dateString\n"; + echo " $dateString\n"; echo " | \n"; echo "
\n"; - echo " "; echo _("To:"); - echo "\n"; echo " | \n"; - echo " $to_string\n"; + echo " $to_string\n"; echo " | \n"; echo "
\n"; - echo " Cc:\n"; + echo " Cc:\n"; echo " | \n"; - echo " $cc_string\n"; + echo " $cc_string\n"; echo " | \n"; echo "