sqgetGlobalVar('get_message_details', $md_action, SQ_GET);
+/**
+ * Controls display of 8bit symbols in message source
+ * @global boolean $msgd_8bit_in_hex;
+ */
+global $msgd_8bit_in_hex;
+$msgd_8bit_in_hex=false;
+
if (!empty($md_action))
{
sqgetGlobalVar('passed_id', $passed_id, SQ_GET);
// ---------- function definitions ----------
+/**
+ * Converts 8bit string to hex
+ *
+ * Replaces 8bit symbols with their hex strings,
+ * encloses them in curly brackets and uses different color.
+ * @param string $string text
+ * @return string
+ * @since 1.5.1
+ */
+function msgd_convert_to_hex($string) {
+ global $color;
+ return preg_replace("/([\200-\377])/e","'<font color=\"$color[2]\">{'.dechex(ord('\\1')).'}</font>'",$string);
+}
/**
* Calculates id of MIME entity
*/
function get_message_details($mailbox, $passed_id, $stripHTML=FALSE) {
-global $imapServerAddress, $imapPort, $color;
+global $imapServerAddress, $imapPort, $color,$msgd_8bit_in_hex;
$returnValue = '';
$message_body .= $line . "\r\n";
} else {
$line = htmlspecialchars($line);
+ if ($msgd_8bit_in_hex) $line = msgd_convert_to_hex($line);
$message_body .= "$pre"."$line"."$end".'<br />'."\r\n";
}
}
+
//$returnValue .= returnTime($start).'<br />';
$xtra = <<<ECHO