function printMessageInfo($imapConnection, $t, $i, $from, $subject, $dateString, $answered, $seen, $mailbox, $sort, $startMessage) {
$senderName = getSenderName($from);
$urlMailbox = urlencode($mailbox);
- $subject = trim($subject);
+ $subject = trim(stripslashes($subject));
echo "<TR>\n";
if ($seen == false) {
echo " <TD><FONT FACE=\"Arial,Helvetica\"><nobr><B><input type=checkbox name=\"msg[$t]\" value=$i></B></nobr></FONT></TD>\n";
$imapConnection = loginToImapServer($username, $key, $imapServerAddress);
displayPageHeader("None");
- if ($reply_id || $forward_id) {
+ if ($forward_id) {
selectMailbox($imapConnection, $mailbox, $numMessages);
- if ($reply_id)
- $msg = fetchMessage($imapConnection, $reply_id);
- else
- $msg = fetchMessage($imapConnection, $forward_id);
+ $msg = fetchMessage($imapConnection, $forward_id);
+
+ $body_ary = formatBody($msg);
+ $tmp = "-------- Original Message ---------\n";
+ for ($i=0;$i < count($body_ary);$i++) {
+ $tmp .= strip_tags($body_ary[$i]);
+ $tmp = substr($tmp, 0, strlen($tmp) -1);
+ $body = "$body$tmp";
+ $tmp = "";
+ }
+ }
+
+ if ($reply_id) {
+ selectMailbox($imapConnection, $mailbox, $numMessages);
+ $msg = fetchMessage($imapConnection, $reply_id);
$body_ary = formatBody($msg);
for ($i=0;$i < count($body_ary);$i++) {
}
}
+ $send_to = ereg_replace("\"", "", $send_to);
+ $send_to = stripslashes($send_to);
+
echo "<FORM action=\"compose_send.php\" METHOD=POST>\n";
echo "<TABLE COLS=2 WIDTH=50 ALIGN=CENTER CELLSPACING=0 BORDER=0>\n";
echo " <TR>\n";
displayPageHeader($mailbox);
/** translate the subject and mailbox into url-able text **/
- $url_subj = urlencode(trim($message["HEADER"]["SUBJECT"]));
+ $url_subj = urlencode(trim(stripslashes($message["HEADER"]["SUBJECT"])));
$urlMailbox = urlencode($mailbox);
$url_replyto = urlencode($message["HEADER"]["REPLYTO"]);
/** make sure everything will display in HTML format **/
$from_name = htmlspecialchars($message["HEADER"]["FROM"]);
- $subject = htmlspecialchars($message["HEADER"]["SUBJECT"]);
+ $subject = htmlspecialchars(stripslashes($message["HEADER"]["SUBJECT"]));
echo "<BR>";
echo "<TABLE COLS=1 WIDTH=95% BORDER=0 ALIGN=CENTER CELLPADDING=2>\n";