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 */ session_start(); include "config.inc.php"; $CONFIG = include($config_file); @$fieldnamedecrypt=$_REQUEST['fielddecrypt']; //@$newsgroups=$_REQUEST["newsgroups"]; //@$group=$_REQUEST["group"]; @$type=$_REQUEST["type"]; @$subject=stripslashes($_POST[md5($fieldnamedecrypt."subject")]); @$name=$_POST[md5($fieldnamedecrypt."name")]; @$email=$_POST[md5($fieldnamedecrypt."email")]; @$body=stripslashes($_POST[md5($fieldnamedecrypt."body")]); @$abspeichern=$_REQUEST["abspeichern"]; @$references=$_REQUEST["references"]; @$id=$_REQUEST["id"]; if (!isset($group)) $group=$newsgroups; include "auth.inc"; if($post_captcha) include "lib/captcha/captcha.php"; // Save name in cookies if (($setcookies==true) && (isset($abspeichern)) && ($abspeichern=="ja")) { setcookie("cookie_name",stripslashes($name),time()+(3600*24*90),"/"); } if ((isset($post_server)) && ($post_server!="")) $server=$post_server; if ((isset($post_port)) && ($post_port!="")) $port=$post_port; include $file_newsportal; include "head.inc"; global $synchro_user,$synchro_pass; // check to which groups the user is allowed to post to $thisgroup=_rawurldecode($_REQUEST['group']); if($testgroup) { $newsgroups=testgroups($thisgroup); } else { $newsgroups=$thisgroup; } $returngroup = preg_split("/( |\,)/", $newsgroups, 2); echo '
'.$text_post["button_back"].' '.$text_post["button_back2"].' '.group_display_name($returngroup[0]).'
'; return; } } if(isset($_FILES["photo"]) && $_FILES["photo"]["error"] == 0) { $_FILES['photo']['name'] = preg_replace('/[^a-zA-Z0-9\.]/', '_', $_FILES['photo']['name']); // There is an attachment to handle $message=message_post(quoted_printable_encode($subject), $nemail." (".quoted_printable_encode($name).")", $newsgroups,$references_array,addslashes($body),$_POST['encryptthis'],$_POST['encryptto'],strtolower($name),null,true); } else { $message=message_post(quoted_printable_encode($subject), $nemail." (".quoted_printable_encode($name).")", $newsgroups,$references_array,addslashes($body),$_POST['encryptthis'],$_POST['encryptto'],strtolower($name)); } // Article sent without errors, or duplicate? if ((substr($message,0,3)=="240") || (substr($message,0,7)=="441 435")) { echo ''.$text_post["message_posted2"].'
'; if(isset($CONFIG['auto_return']) && ($CONFIG['auto_return'] == true)) { echo ''; if($postsremaining < 1) { $wait = check_rate_limit($name,0,1); echo 'Please wait '.round($wait).' minutes before posting again.'.$text_post["button_back"].' '.$text_post["button_back2"].' '.group_display_name($returngroup[0]).'
'; if(isset($_REQUEST['returngroup']) && $_REQUEST['returngroup'] !== '') { echo 'Your post will appear in '.group_display_name($_REQUEST['returngroup']).'
'; } if(isset($_SESSION['return_page'])) { echo ''; } else { echo ''; } } else { // article not accepted by the newsserver $type="retry"; $error=$text_post["error_newsserver"]."$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",$message->body[0]); nntp_close($ns); if ($head->name != "") { $bodyzeile=$head->name; } else { $bodyzeile=$head->from; } // For Synchronet use $fromname=$bodyzeile; $bodyzeile=$text_post["wrote_prefix"].$bodyzeile. $text_post["wrote_suffix"]."\n\n"; for ($i=0; $i<=count($body)-1; $i++) { if((isset($cutsignature)) && ($cutsignature==true) && ($body[$i]=='-- ')) break; if (trim($body[$i])!="") { if($body[$i][0]=='>') $bodyzeile.=">".$body[$i]."\n"; else $bodyzeile.="> ".$body[$i]."\n"; } else { $bodyzeile.="\n"; } } $subject=$head->subject; if (isset($head->followup) && ($head->followup != "")) { $newsgroups=$head->followup; } else { if($testgroup) { $newsgroups=testgroups($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 { // show post form $fieldencrypt=md5(rand(1,10000000)); echo '
$error
"; ?>