=== php/cache.php
==================================================================
|
|
|
|
| 514 | 514 | } |
| 515 | 515 | $rows[$count]['recipient_email'] = $rectmp; |
| 516 | 516 | |
| 517 | | $subject = trim(htmlentities($magic_quotes ? stripslashes($row['subject']) : $row['subject'])); |
| | 517 | $subject = $magic_quotes ? stripslashes($row['subject']) : $row['subject']; |
| 518 | 518 | if ($subject == "") { |
| 519 | 519 | $subject = "(" . $lang['text_no_subject'] . ")"; |
| 520 | 520 | }else{ |
| 521 | | $subject = decode_header($subject, $html_charset); |
| | 521 | $subject = htmlspecialchars(iconv_mime_decode($subject, 2, 'utf-8'), ENT_COMPAT, 'UTF-8'); |
| 522 | 522 | } |
| 523 | 523 | $rows[$count]['subject'] = $subject; |
| 524 | 524 | $count++; |
=== php/mime.php
==================================================================
|
|
|
|
| 89 | 89 | { |
| 90 | 90 | global $lang; |
| 91 | 91 | |
| 92 | | |
| 93 | 92 | $ret = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"2\" width=\"100%\">\n"; |
| 94 | 93 | |
| 95 | 94 | if (isset($structure->headers["from"])) { |
| 96 | 95 | $ret .= "<tr><td class=\"mailheader\" align=\"left\" valign=\"top\">\n"; |
| 97 | 96 | $ret .= "<font color=\"red\">FROM:</font></td>"; |
| 98 | | $ret .= "<td class=\"mailheader\" align=\"left\" valign=\"top\">" . trim(htmlentities($structure->headers["from"])) . "</td></tr>"; |
| | 97 | $ret .= "<td class=\"mailheader\" align=\"left\" valign=\"top\">" . htmlspecialchars(iconv_mime_decode($structure->headers["from"],2, 'utf-8'), ENT_QUOTES, 'utf-8') . "</td></tr>"; |
| 99 | 98 | } |
| 100 | 99 | if (isset($structure->headers["to"])) { |
| 101 | 100 | $ret .= "<tr><td class=\"mailheader\" align=\"left\" valign=\"top\">\n"; |
| 102 | 101 | $ret .= "<font color=\"red\">TO:</font></td>"; |
| 103 | | $ret .= "<td class=\"mailheader\" align=\"left\" valign=\"top\">" . trim(htmlentities($structure->headers["to"])) . "</td></tr>"; |
| | 102 | $ret .= "<td class=\"mailheader\" align=\"left\" valign=\"top\">" . htmlspecialchars(iconv_mime_decode($structure->headers["to"],2, 'utf-8'), ENT_QUOTES, 'utf-8') . "</td></tr>"; |
| 104 | 103 | } |
| 105 | 104 | if (isset($structure->headers["subject"])) { |
| 106 | 105 | $ret .= "<tr><td class=\"mailheader\" align=\"left\" valign=\"top\">\n"; |
| 107 | 106 | $ret .= "<font color=\"red\">SUBJECT:</font></td>"; |
| 108 | | $ret .= "<td class=\"mailheader\" align=\"left\" valign=\"top\">" . trim(htmlentities($structure->headers["subject"])) . "</td></tr>"; |
| | 107 | $ret .= "<td class=\"mailheader\" align=\"left\" valign=\"top\">" . htmlspecialchars(iconv_mime_decode($structure->headers["subject"],2, 'utf-8'), ENT_QUOTES, 'utf-8') . "</td></tr>"; |
| 109 | 108 | } |
| 110 | 109 | $primary = strtolower(trim($structure->ctype_primary)); |
| 111 | 110 | $secondary = strtolower(trim($structure->ctype_secondary)); |
| 112 | 111 | $ctype = $primary . "/" . $secondary; |
| | 112 | $message_charset = $structure->ctype_parameters['charset']; |
| | 113 | |
| 113 | 114 | $ret .= "<tr><td class=\"mailheader\" align=\"left\" valign=\"top\" width=\"150\">\n"; |
| 114 | 115 | $ret .= "<font color=\"red\">CONTENT-TYPE:</font></td>"; |
| 115 | 116 | $ret .= "<td class=\"mailheader\" align=\"left\" valign=\"top\">" . $ctype . "</td></tr>"; |
| … |
… |
|
| 140 | 141 | // a sane width. |
| 141 | 142 | case "plain": |
| 142 | 143 | |
| 143 | | $ret .= "<pre>" . sanitize_html(wordwrap($structure->body, 70)) . "</pre>"; |
| | 144 | $ret .= "<pre>" . sanitize_html(wordwrap(iconv($message_charset, 'utf-8', $structure->body), 70)) . "</pre>"; |
| 144 | 145 | break; |
| 145 | 146 | |
| 146 | 147 | // HTML content, clean it up a bit and display it. |
| 147 | 148 | case "html": |
| 148 | 149 | |
| 149 | | $ret .= sanitize_html($structure->body); |
| | 150 | $ret .= sanitize_html(iconv($message_charset, 'utf-8', $structure->body)); |
| 150 | 151 | break; |
| 151 | 152 | |
| 152 | 153 | // Some other odd text format we don't support, ignore it. |
=== php/smarty.php
==================================================================
|
|
|
|
| 195 | 195 | $smarty->assign('MAIA_VERSION', MAIA_VERSION); |
| 196 | 196 | $smarty->assign('display_language', $display_language); |
| 197 | 197 | $smarty->assign('html_charset', $html_charset); |
| | 198 | header("Content-Type: text/html; $html_charset"); |
| 198 | 199 | $smarty->assign("msid", $msid); |
| 199 | 200 | $smarty->assign("sid", $sid); |
| 200 | 201 | $smarty->assign('banner_title', $banner_title); |
=== php/themes/desert_sand/templates/list-cache.tpl
==================================================================
|
|
|
|
| 81 | 81 | </b></td> |
| 82 | 82 | <td align="left"> |
| 83 | 83 | <a id="link_{$row[hamloop].id}" class="thickbox HelpTipAnchor" href="view.php{$msid}mail_id={$row[hamloop].id}&cache_type={$cache_type}&address_id={$row[hamloop].address_id}"> |
| 84 | | {$row[hamloop].subject|truncate:$truncate_subject:"...":true|escape:'htmlall'} |
| 85 | | </a><span id="cluetip_link_{$row[hamloop].id}" class="HelpTip">{$row[hamloop].subject|escape:'htmlall'}</span></td> |
| | 84 | {$row[hamloop].subject|truncate:$truncate_subject:"...":true|escape} |
| | 85 | </a><span id="cluetip_link_{$row[hamloop].id}" class="HelpTip">{$row[hamloop].subject}</span></td> |
| 86 | 86 | <td align="center"> |
| 87 | 87 | <span class="HelpTipAnchor" id="received_date{$row[hamloop].id}">{$row[hamloop].received_date|truncate:$truncate_subject:"...":true|escape}</span> |
| 88 | 88 | <span class="HelpTip" id="cluetip_received_date{$row[hamloop].id}">{$row[hamloop].received_date|escape:"javascript"|escape}</span> |
=== php/view.php
==================================================================
|
|
|
|
| 214 | 214 | $mail = new Mail_mimeDecode((get_magic_quotes_gpc() ? stripslashes($contents) : $contents)); |
| 215 | 215 | $args['include_bodies'] = true; |
| 216 | 216 | $args['decode_bodies'] = true; |
| 217 | | $args['decode_headers'] = true; |
| | 217 | $args['decode_headers'] = false; // the inconv decoding will handle the headers |
| 218 | 218 | $structure = $mail->decode($args); |
| 219 | 219 | $smarty->assign("message", display_parts($structure)); |
| 220 | 220 | |