Current Path :
/
home
/
develito
/
www
/
components
/
com_raforms
/
controllers
/
Or
Select Your Path :
Upload File :
New :
File
Dir
//home/develito/www/components/com_raforms/controllers/comments.raw.php
<?php //-- No direct access defined('_JEXEC') or die('=;)'); jimport('joomla.application.component.controller'); class RAformsControllerComments extends JControllerLegacy { public function addComment() { $comment = JRequest::getVar('comment', null); $model = $this->getModel('comments'); $model->setId(JRequest::getVar('formid', null)); $model->setEntryId(JRequest::getVar('entryid', null)); $model->setCommentId(JRequest::getVar('id', null)); print json_encode($model->addComment($comment)); } public function deleteComment() { $model = $this->getModel('comments'); $model->setId(JRequest::getVar('formid', null)); $model->setEntryId(JRequest::getVar('entryid', null)); $model->setCommentId(JRequest::getVar('id', null)); print json_encode($model->deleteComment()); } public function getComments() { $model = $this->getModel('comments'); $model->setId(JRequest::getVar('formid', null)); $model->setEntryId(JRequest::getVar('entryid', null)); $model->setCommentId(JRequest::getVar('id', null)); print json_encode($model->getComments(JRequest::getVar('currentCommentId', 0))); } }