# 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 .= " - $strCrossPostDetail"; # ------------------------------------------------------------------- $server = $_POST['server']; $content = $_POST['content']; $postgroup = $_POST['postgroup']; $artnum = $_GET['artnum']; if( $content != '' && $postgroup != '' ) { if( $post_restriction ) readonly_error( $server, $postgroup ); $server = $_POST['server']; $group = $_POST['group']; if( verifying( $server, $group ) == -1 ) session_error(); $nickname = $_POST['nickname']; $email = $_POST['email']; $content = $_POST['content']; $subject = $_POST['subject']; $refid = $_POST['refid']; # $authormail = $_POST['authormail']; if( $auto_slash ) { $subject = stripslashes( $_POST['subject'] ); $content = stripslashes( $_POST['content'] ); $nickname = stripslashes( $_POST['nickname'] ); } else { $subject = $_POST['subject']; $content = $_POST['content']; $nickname = $_POST['nickname']; } $artconv = get_conversion( $_POST['charset'], $curr_charset ); $nhd = nnrp_open( $server ); if( ! ( $nhd && nnrp_authenticate( $nhd ) ) ) { html_head('ERROR'); echo "
$strConnectServerError - " . $server . " $strConnectServerError - " . $server . "
\n";
html_foot();
html_tail();
exit;
}
if( $artconv['back'] ) {
nnrp_post_begin( $nhd, $artconv['back']($nickname), $email, $artconv['back']($subject), $postgroup, $artconv['back']($organization), $refid, $auth_email, $_POST['charset'] );
nnrp_post_write( $nhd, $article_convert['back']($content) );
}
else {
nnrp_post_begin( $nhd, $nickname, $email, $subject, $postgroup, $organization, $refid, $auth_email, $_POST['charset'] );
nnrp_post_write( $nhd, $content );
}
nnrp_post_finish( $nhd );
nnrp_close($nhd);
html_head( "$postgroup - $subject" );
$time = strftime($CFG['time_format']);
$subject = htmlspecialchars( $subject );
echo <<$strArticlePosted
$strAuthor: $nickname ($email) $strTime: $time $strSubject: $subject $strGroup: $postgroup
EOT;
echo '' . htmlspecialchars($content, ENT_NOQUOTES ) . "
\n";
echo "
\n";
html_delay_close( 2000 );
html_tail();
}
elseif( $artnum != '' ) {
$server = $_GET['server'];
$group = $_GET['group'];
if( verifying( $server, $group ) == -1 )
session_error( $server, $group );
$nhd = nnrp_open( $server );
if( ! ( $nhd && nnrp_authenticate( $nhd ) ) ) {
html_head('ERROR');
echo "
\n";
html_foot();
html_tail();
exit;
}
list( $code, $count, $lowmark, $highmark ) = nnrp_group( $nhd, $group );
$artinfo = nnrp_head( $nhd, $artnum, $news_charset[$curr_catalog] );
if( !$artinfo )
kill_myself();
$artconv = get_conversion( $artinfo['charset'], $curr_charset );
if( $artconv['to'] ) {
$from = $artconv['to']( $artinfo['name'] );
$email = $artconv['to']( $artinfo['mail'] );
$subject = $artconv['to']( $artinfo['subject'] );
$org = $artconv['to']( $artinfo['org'] );
}
else {
$from = $artinfo['name'];
$email = $artinfo['mail'];
$subject = $artinfo['subject'];
$org = $artinfo['org'];
}
$date = $artinfo['date'];
$msgid = $artinfo['msgid'];
# if( !preg_match( '/^Re: /i', $subject ) )
# $subject = 'Re: ' . $subject ;
html_head( "$group - $subject" );
?>
echo "