get_main_header(); $parts = $MIME_Message->get_all_parts(); if (is_requested("art_group")) { $group = get_request("art_group"); } else { $group = $_SESSION["newsgroup"]; } ?> 1) { // We've got attachment if (sizeof(isset($parts) ? $parts : []) > 1) { echo "\r\n"; echo "\r\n"; echo "\r\n"; echo "\r\n"; } $count = 0; foreach ($parts as $part) { if (stristr($part["header"]["content-type"], "text/html")) { // HTML $body = filter_html(decode_message_content($part)); // Replace the image link for internal resources $content_map = $MIME_Message->get_content_map(); $search_array = array(); $replace_array = array(); foreach ($content_map as $cid => $aid) { $cid = substr($cid, 1, strlen($cid) - 2); $search_array[] = "cid:".$cid; $replace_array[] = "newsgroups.php?art_group=".urlencode($group)."&message_id=".$article_id."&attachment_id=".$aid; } $body = str_replace($search_array, $replace_array, $body); echo ""; } elseif (stristr($part["header"]["content-type"], "text")) { // Treat all other form of text as plain text echo ""; } elseif (preg_match("/^image\/(gif|jpeg|pjpeg)/i", $part["header"]["content-type"])) { echo "\r\n"; } $count++; } if ($message_node) { ?>
"; } //if (!mb_check_encoding($header["from"]["name"], 'UTF-8')) { $name_probe = isset($header["from"]["name"]) ? $header["from"]["name"] : ""; if (!mb_check_encoding($name_probe, 'UTF-8')) { $header["from"]["name"] = iconv('Windows-1252', 'UTF-8//IGNORE', $header["from"]["name"]); echo $header["from"]["name"]; }else{ echo htmlescape($header["from"]["name"]); } if (is_requested("post") || $_SESSION["auth"]) { echo htmlescape(" <".$header["from"]["email"].">").""; } ?>
".$messages_ini["text"]["attachments"]."\r\n"; $attach_file = ""; for ($i = 1;$i < sizeof($parts);$i++) { if (($i != 1) && (($i - 1) % 5 == 0)) { $attach_file .= "
\r\n"; } if (strcmp($parts[$i]["filename"], "") != 0) { $attach_file .= "".$parts[$i]["filename"].", "; } else { $attach_file .= "".$messages_ini["text"]["no_name"]." $i, "; } } if (strlen($attach_file) > 0) { $attach_file = substr($attach_file, 0, strlen($attach_file) - 7); } echo $attach_file; echo "
".$body."


"; $body = decode_message_content($part); $body = htmlescape($body); //$body = preg_replace('/(?\r\n", "
$1
", "        ", "  "), add_html_links($body)); //$body = preg_replace('/\s?49ac9ab70586ebzca59ec8373f5c276f>/', '>', $body); //$body); if (!mb_check_encoding($body, 'UTF-8')) { echo "qui"; $body = iconv('Windows-1252', 'UTF-8//IGNORE', $body); } /* $body=preg_replace('#\*{1}(.*?|^\*)\*{1}#', '$1', $body); // grassetto $body=preg_replace('#\/{1}(.*?|^\/)\/{1}#', '$1', $body); // italico "corsivo" $body=preg_replace('#\_{1}(.*?|^\_)\_{1}#', '$1', $body); // sottolineato $body=preg_replace('#\~{1}(.*?|^\~)\~{1}#', '$1', $body); // barrato */ /* var_dump(mb_detect_encoding($body, [ 'UTF-8', 'Windows-1251', 'KOI8-R', 'ISO-8859-1' ], true));*/ echo $body."
"; echo "

"; echo ""; echo "
get_children(), 0, "", FALSE, $article_id); ?>