<?php
/* Copyright (c) 2001-02 by Ken Williams (hide@address.com)*/
/* http://phpfastnews.sourceforge.net/ & http://www.phpfastnews.com*/
/* */
/* You can redistribute and/or modify the following code under the */
/* terms of the GNU General Public License as published by the */
/* the Free Software Foundation. */
/* */
/* All code by Ken Williams (HDwebdev) unless otherwise noted */
/* This is an alpha test release -- not intended for live site use */
$pg = "article_view";
$tpl = "article.tpl";
require('Lib/prependphpfn.php');
$r->set_block('TPL','ARTICLE_VIEW');
$query = "select subject,body from fn_article where article_id = '$r_id'";
$db->query($query);
while ($db->next_record()) {
$r->set_var("SUBJECT", $db->f("subject"));
$r->set_var("BODY", $db->f("body"));
$r->parse('body','ARTICLE_VIEW',true);
//show the replies
$r->set_block('TPL','showreplies');
$query = "select * from fn_aposts,fn_user where article_idfk = '$r_id' and user_idfk = user_id2";
$db->query($query);
while ($db->next_record()) {
$r->set_var('lnkREPLIESREPLY',"article_reply.php?r_id=" . $r_id . "&r2_id=" . $db->f("post_id"));
$r->set_var('SUBJECT',$db->f("subject"));
$r->set_var('POSTEDBY',$db->f("handle"));
$r->set_var('DATETIME', $ndate($db->f("apost_cdate")));
$r->parse('body','showreplies',true);
}
}
//show the reply box
$r->set_block('TPL','REPLY');
$r->set_var("SUBJECT", $db->f("subject"));
$r->set_var("BODY", $db->f("body"));
$r->set_var("R_ID", $r_id);
$r->set_var("R2_ID", $r2_id);
//$r->set_var("TEXT", $TEXT); removed 7/10/01
//$r->set_var("TEXT_S", $TEXT_S); removed 7/10/01
$r->parse('body','REPLY',true);
require('Lib/appendphpfn.php');
?>