# PHP News Reader # Copyright (C) 2001-2003 Shen Chang-Da # # 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('utils.inc.php'); $title .= " - $strPost"; # ------------------------------------------------------------------- if( $_POST['content'] != '' ) { $server = $_POST['server']; $group = $_POST['group']; if( verifying( $server, $group ) == -1 ) session_error( $server, $group ); if( $post_restriction ) readonly_error( $server, $group ); $email = $_POST['email']; if( $auto_slash ) { $nickname = stripslashes($_POST['nickname']); $content = stripslashes($_POST['content']); $subject = stripslashes($_POST['subject']); } else { $nickname = $_POST['nickname']; $content = $_POST['content']; $subject = $_POST['subject']; } $nhd = nnrp_open( $server ); if( ! ( $nhd && nnrp_authenticate( $nhd ) ) ) { html_head('ERROR'); echo "
$strConnectServerError - " . $server . "
\n";
html_foot();
html_tail();
exit;
}
if( $article_convert['back'] ) {
nnrp_post_begin( $nhd, $article_convert['back']($nickname), $email, $article_convert['back']($subject), $group, $article_convert['back']($organization), null, $auth_email, $news_charset[$curr_catalog] );
nnrp_post_write( $nhd, $article_convert['back']($content) );
if( $CFG['post_signature'] )
nnrp_post_write( $nhd, $article_convert['back']($CFG['post_signature']) );
}
else {
nnrp_post_begin( $nhd, $nickname, $email, $subject, $group, $organization, null, $auth_email, $news_charset[$curr_catalog] );
nnrp_post_write( $nhd, $content );
if( $CFG['post_signature'] )
nnrp_post_write( $nhd, $CFG['post_signature'] );
}
nnrp_post_finish( $nhd );
nnrp_close($nhd);
html_head( "$group - $subject" );
$time = strftime($CFG['time_format']);
$subject = htmlspecialchars( $subject );
echo <<$strArticlePosted
$strAuthor: $nickname ($email) $strTime: $time $strSubject: $subject $strGroup: $group
EOT;
echo '' . nl2br(htmlspecialchars($content, ENT_NOQUOTES )) . "\n";
html_delay_close( 2000 );
echo "
\n";
html_tail();
}
else {
$server = $_GET['server'];
$group = $_GET['group'];
if( $post_restriction )
readonly_error( $server, $group );
html_head( $title );
?>
echo <<
$strName: $strEmail: $strGroup: $strSubject: $strContent: