44 |
var $newsgroups; // the Newsgroups where the article belongs to |
var $newsgroups; // the Newsgroups where the article belongs to |
45 |
var $followup; |
var $followup; |
46 |
var $date; |
var $date; |
|
var $organization; |
|
47 |
var $references; |
var $references; |
48 |
var $content_transfer_encoding; |
var $content_transfer_encoding; |
49 |
var $mime_version; |
var $mime_version; |
55 |
var $answers; |
var $answers; |
56 |
var $isAnswer; |
var $isAnswer; |
57 |
var $username; |
var $username; |
|
var $user_agent; |
|
58 |
var $field; |
var $field; |
59 |
var $isReply; |
var $isReply; |
60 |
} |
} |
480 |
for ($count=0;$count<count($hdr);$count++) { |
for ($count=0;$count<count($hdr);$count++) { |
481 |
$variable=substr($hdr[$count],0,strpos($hdr[$count],":")); |
$variable=substr($hdr[$count],0,strpos($hdr[$count],":")); |
482 |
$value=trim(substr($hdr[$count],strpos($hdr[$count],":")+1)); |
$value=trim(substr($hdr[$count],strpos($hdr[$count],":")+1)); |
483 |
$header->field[$variable][] = $value; |
$header->field[strtolower($variable)][] = $value; |
484 |
switch (strtolower($variable)) { |
switch (strtolower($variable)) { |
485 |
case "from": cs |
case "from": |
486 |
$fromline=address_decode(headerDecode($value),"nirgendwo"); |
$fromline=address_decode(headerDecode($value),"nirgendwo"); |
487 |
if (!isset($fromline[0]["host"])) $fromline[0]["host"]=""; |
if (!isset($fromline[0]["host"])) $fromline[0]["host"]=""; |
488 |
$header->from=$fromline[0]["mailbox"]."@".$fromline[0]["host"]; |
$header->from=$fromline[0]["mailbox"]."@".$fromline[0]["host"]; |
502 |
case "newsgroups": |
case "newsgroups": |
503 |
$header->newsgroups=$value; |
$header->newsgroups=$value; |
504 |
break; |
break; |
|
case "organization": |
|
|
$header->organization = decode_unstructured_body($value); |
|
|
break; |
|
505 |
case "content-transfer-encoding": |
case "content-transfer-encoding": |
506 |
$header->content_transfer_encoding=trim(strtolower($value)); |
$header->content_transfer_encoding=trim(strtolower($value)); |
507 |
break; |
break; |
544 |
case "followup-to": |
case "followup-to": |
545 |
$header->followup=trim($value); |
$header->followup=trim($value); |
546 |
break; |
break; |
547 |
|
/* |
548 |
case "x-newsreader": |
case "x-newsreader": |
549 |
case "x-mailer": |
case "x-mailer": |
550 |
case "user-agent": |
case "user-agent": |
551 |
$header->user_agent= decode_structured_body($value); |
$header->user_agent= decode_structured_body($value); |
552 |
break; |
break; |
553 |
|
*/ |
554 |
} |
} |
555 |
} |
} |
556 |
if (!isset($header->content_type[0])) |
if (!isset($header->content_type[0])) |
1504 |
echo $text_header["newsgroups"].htmlspecialchars(str_replace(',',', ',$head->newsgroups))."<br>\n"; |
echo $text_header["newsgroups"].htmlspecialchars(str_replace(',',', ',$head->newsgroups))."<br>\n"; |
1505 |
if (isset($head->followup) && ($article_show["Followup"]) && ($head->followup != "")) |
if (isset($head->followup) && ($article_show["Followup"]) && ($head->followup != "")) |
1506 |
echo $text_header["followup"].htmlspecialchars($head->followup)."<br>\n"; |
echo $text_header["followup"].htmlspecialchars($head->followup)."<br>\n"; |
|
if ((isset($head->organization)) && ($article_show["Organization"]) && |
|
|
($head->organization != "")) |
|
|
echo $text_header["organization"]. |
|
|
html_parse(htmlspecialchars($head->organization))."<br>\n"; |
|
1507 |
if ($article_show["Date"]) |
if ($article_show["Date"]) |
1508 |
echo $text_header["date"].date($text_header["date_format"],$head->date)."<br>\n"; |
echo $text_header["date"].date($text_header["date_format"],$head->date)."<br>\n"; |
1509 |
if ($article_show["Message-ID"]) |
if ($article_show["Message-ID"]) |
1518 |
} |
} |
1519 |
echo "<br>"; |
echo "<br>"; |
1520 |
} |
} |
1521 |
if (isset($head->user_agent)) { |
$fields = array ("x-moe", "x-brother", "x-syster", "x-wife", |
1522 |
if ((isset($article_show["User-Agent"])) && |
"x-daughter", "x-respect", |
1523 |
($article_show["User-Agent"])) { |
"user-agent", "x-mailer", "x-newsreader", |
1524 |
echo $text_header["user-agent"].htmlspecialchars($head->user_agent)."<br>\n"; |
"list-id", "x-uri", "x-mail-count", "keywords"); |
1525 |
} else { |
for ($i = 0; $i < count($fields); $i++) { |
1526 |
echo "<!-- User-Agent: ".htmlspecialchars($head->user_agent)." -->\n"; |
if (count($head->field[$fields[$i]])) { |
1527 |
|
if ((isset($article_show[$fields[$i]])) && ($article_show[$fields[$i]])) { |
1528 |
|
echo "<div class=\"field ".$fields[$i]."\"><span class=\"name\">" |
1529 |
|
.$text_header[$fields[$i]]."</span> <span class=\"body\">" |
1530 |
|
.htmlspecialchars(decode_structured_body( |
1531 |
|
join(', ', $head->field[$fields[$i]]))) |
1532 |
|
."</span></div>\n"; |
1533 |
|
} |
1534 |
} |
} |
1535 |
} |
} |
1536 |
if (isset($head->field["x-moe"])) { |
$fields = array ("x-weather", "x-copyright", "comments", "organization"); |
1537 |
if ((isset($article_show["X-Moe"])) && ($article_show["X-Moe"])) { |
for ($i = 0; $i < count($fields); $i++) { |
1538 |
echo "<span class=\"field x-moe\"><span class=\"name\">".$text_header["X-Moe"] |
if (count($head->field[$fields[$i]])) { |
1539 |
."</span> <span class=\"body\">" |
if ((isset($article_show[$fields[$i]])) && ($article_show[$fields[$i]])) { |
1540 |
.htmlspecialchars(decode_structured_body( |
for ($j = 0; $j > count($head->field[$fields[$i]]); $j++) { |
1541 |
join(', ', $head->field["x-moe"]))) |
echo "<div class=\"field ".$fields[$i]."\"><span class=\"name\">" |
1542 |
."</span>\n"; |
.$text_header[$fields[$i]]."</span> <span class=\"body\">" |
1543 |
|
.htmlspecialchars(decode_unstructured_body( |
1544 |
|
$head->field[$fields[$i]][$j])) |
1545 |
|
."</span></div>\n"; |
1546 |
|
} |
1547 |
|
} |
1548 |
} |
} |
1549 |
} |
} |
1550 |
if ((isset($attachment_show)) && ($attachment_show==true) && |
if ((isset($attachment_show)) && ($attachment_show==true) && |
1716 |
* $body: The article itself |
* $body: The article itself |
1717 |
*/ |
*/ |
1718 |
function verschicken($subject,$from,$newsgroups,$ref,$body) { |
function verschicken($subject,$from,$newsgroups,$ref,$body) { |
1719 |
global $server,$port,$send_poster_host,$organization,$text_error; |
global $server,$port,$send_poster_host,$organization,$text_error,$text_ua; |
1720 |
global $file_footer; |
global $file_footer; |
1721 |
flush(); |
flush(); |
1722 |
$ns=OpenNNTPconnection($server,$port); |
$ns=OpenNNTPconnection($server,$port); |