* @package FlexCP * @subpackage News * @version $Id$ */ $form = new HTML_QuickForm2('frmComment'); $frm=$form->addElement('fieldset')->setLabel('Write New Comment'); $frm->addElement('hidden','hidArticle',array('value'=>$this->Article->ID),array()); $frm->addElement('text','txtTitle',array(),array())->setLabel('Subject:')->addRule('required','This field is required.'); $frm->addElement('textarea','txtContent',array('class'=>'mceMinimalEditor'),array())->setLabel('Message:')->addRule('required','This field is required.'); Captcha::AddQF2Control($frm,'', array(),array('label'=>'')); $frm->addElement('submit',null,array(),array()); if(!$form->validate()) { ?>

#Article->ID?>: Article->Title?>

Posted by Article->User))->GetName()?> at Article->Posted)?>

Article->Content?>
Article->AllowComments) { $rs2=DB::Execute(sprintf('SELECT * FROM %sNewsComments WHERE aclID=%d',ADODB_PREFIX,$this->Article->ID)); foreach($rs2 as $row) { $cu=User::Find(intval($row['usrID'])); ?>
eprint($row['comSubj'])?>
# GetAvatar(true)?>Posted by GetName()?> at .
Article->AllowComments) Output::HardError('This article has disabled comments.'); $article=new Article(POST::GetInt('txtArticleID')); $com=new NewsComment(); $com->Article=$this->Article; $com->Title=POST::GetEString('txtTitle'); $com->Content=POST::GetEString('txtContent'); // Cleaned before update. $com->User=User::$Data; $com->Posted=time(); $com->Update(); Output::Redirect(THISURL.'news.php/article/'.$this->Article->ID); }