for ($i = 0; $i <= count($body) - 1; $i++) { if (trim($body[$i]) != "") { $bodyzeile = $bodyzeile . "> " . $body[$i] . "\n"; } else { $bodyzeile .= "\n"; } } // $bodyzeile.=eregi_replace("\n","\n> ",$body); // $bodyzeile.="> ".str_replace("\n","\n> ",$body); $subject = $head->subject; if (isset($head->followup) && $head->followup != "") { $newsgroups = $head->followup; } else { $newsgroups = $head->newsgroups; } splitSubject($subject); $subject = "Re: " . $subject; $show = 1; $references = false; if (isset($head->references[0])) { for ($i = 0; $i <= count($head->references) - 1; $i++) { $references .= $head->references[$i] . " "; } } $references .= $head->id; } if ($type == "retry") { $show = 1; $bodyzeile = $body; } if ($show == 1) {
function interpretOverviewLine($zeile, $overviewformat, $groupname) { $return = ""; $overviewfmt = explode("\t", $overviewformat); echo " "; // keep the connection to the webbrowser alive flush(); // while generating the message-tree $over = split("\t", $zeile, count($overviewfmt) - 1); $article = new headerType(); for ($i = 0; $i < count($overviewfmt) - 1; $i++) { if ($overviewfmt[$i] == "Subject:") { $subject = headerDecode($over[$i + 1]); $article->isReply = splitSubject($subject); $article->subject = $subject; } if ($overviewfmt[$i] == "Date:") { $article->date = getTimestamp($over[$i + 1]); } if ($overviewfmt[$i] == "From:") { $fromline = address_decode(headerDecode($over[$i + 1]), "nirgendwo"); $article->from = $fromline[0]["mailbox"] . "@" . $fromline[0]["host"]; $article->username = $fromline[0]["mailbox"]; if (!isset($fromline[0]["personal"])) { $article->name = $fromline[0]["mailbox"]; if (strpos($article->name, '%')) { $article->name = substr($article->name, 0, strpos($article->name, '%')); } $article->name = strtr($article->name, '_', ' '); } else { $article->name = $fromline[0]["personal"]; } } if ($overviewfmt[$i] == "Message-ID:") { $article->id = $over[$i + 1]; } if ($overviewfmt[$i] == "References:" && $over[$i + 1] != "") { $article->references = explode(" ", $over[$i + 1]); } } $article->number = $over[0]; $article->isAnswer = false; return $article; }