HTTP Gateway * Download: https://news.novabbs.com/getrslight * * Based on Newsportal by Florian Amrhein * * E-Mail: retroguy@novabbs.com * Web: https://news.novabbs.com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ include "config.inc.php"; $CONFIG = include($config_file); include $file_newsportal; include "head.inc"; if (disable_page_by_user_agent($client_device, "bot", "Post")) { echo "
' . $text_post["button_back"] . ' ' . $text_post["button_back2"] . ' ' . group_display_name($returngroup) . '
'; echo '** Moderated Newsgroup **
'; echo '** Message Queued for Moderation **
'; } else { echo '' . $text_post["message_posted2"] . '
'; } if (isset($CONFIG['auto_return']) && ($CONFIG['auto_return'] == true)) { echo ''; echo 'You have ' . $postsremaining . ' posts remaining of ' . $CONFIG['rate_limit'] . ' posts per hour.$message"; } } else { echo $text_post["error_readonly"]; } } } // A reply of an other article. if ($type == "reply") { $message = message_read($id, 0, $newsgroups); $head = $message->header; $body = explode("\n", rtrim($message->body[0])); nntp_close($ns); if ($head->name != "") { $bodyzeile = $head->name; } else { $bodyzeile = $head->from; } // For Synchronet use (deprecated) $fromname = $bodyzeile; // Set quote reply format (On date somebody wrote:) if (!isset($OVERRIDES['quote_head'])) { $OVERRIDES['quote_head'] = 'date_name'; } switch ($OVERRIDES['quote_head']) { case 'date_name': $bodyzeile = "On " . date("D, j M Y G:i:s O,", $head->date) . " " . $bodyzeile . $text_post["wrote_suffix"] . "\n\n"; break; case 'msgid_name': $bodyzeile = "In " . $head->id . ", " . $bodyzeile . $text_post["wrote_suffix"] . "\n\n"; break; case 'date_msgid_name': $bodyzeile = "On " . date("D, j M Y G:i:s O,", $head->date) . " in " . $head->id . ", " . $bodyzeile . $text_post["wrote_suffix"] . "\n\n"; break; case 'name': $bodyzeile = $text_post["wrote_prefix"] . $bodyzeile . $text_post["wrote_suffix"] . "\n\n"; break; default: $bodyzeile = "On " . date("D, j M Y G:i:s O,", $head->date) . " " . $bodyzeile . $text_post["wrote_suffix"] . "\n\n"; break; } for ($i = 0; $i <= count($body) - 1; $i++) { if ((isset($cutsignature)) && ($cutsignature == true) && ($body[$i] == '-- ')) { break; } // Try not to quote blank lines at the end of all quotes if ((trim($body[$i]) == "") && ($body[$i + 1] == '-- ' || $i >= count($body) - 1)) { } else { // Remove spaces from starting quote '>' characters $body = preg_replace("/^> >/", ">>", $body); // Quote blank lines? YES by default if (! isset($OVERRIDES['quote_blank_lines']) || $OVERRIDES['quote_blank_lines'] == true) { if (isset($body[$i][0]) && $body[$i][0] == '>') $bodyzeile .= ">" . $body[$i] . "\n"; else $bodyzeile .= "> " . $body[$i] . "\n"; } else { if (trim($body[$i]) != "") { if (isset($body[$i][0]) && $body[$i][0] == '>') $bodyzeile .= ">" . $body[$i] . "\n"; else $bodyzeile .= "> " . $body[$i] . "\n"; } else { $bodyzeile .= "\n"; } } } } $subject = $head->subject; // Offer choice of whether to use Followup-To $has_followup = false; if (isset($head->followup) && ($head->followup != "")) { $newsgroups = $head->followup; $has_followup = $head->newsgroups; } else { $newsgroups = $head->newsgroups; } splitSubject($subject); $subject = "Re: " . $subject; // Cut off old parts of a subject // for example: 'foo (was: bar)' becomes 'foo'. $subject = preg_replace('/(\(wa[sr]: .*\))$/i', '', $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) { if ($newsgroups == "") { echo $text_post["followup_not_allowed"]; echo " " . $newsgroups; } else { // check that we can post to the newsgroup $ngroups = preg_split("/[\s,]+/", $newsgroups); $found = false; foreach ($ngroups as $group) { $group = trim($group); if (get_section_by_group($group)) { $found = true; break; } } // show post form $fieldencrypt = md5(rand(1, 10000000)); if ($type == 'reply') { echo '
$error
"; echo '