| Server IP : 54.36.91.62 / Your IP : 216.73.217.112 Web Server : Apache System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : coopiak ( 151928) PHP Version : 8.3.23 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/coopiak/amisdesseniors-fr/nimes/components/com_rsfeedback/controllers/ |
Upload File : |
<?php
/**
* @package RSFeedback!
* @copyright (C) 2010-2018 www.rsjoomla.com
* @license GPL, http://www.gnu.org/licenses/gpl.html
*/
// No direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Factory;
class RSFeedbackControllerFeedbacks extends BaseController
{
protected $text_prefix = 'COM_RSFEEDBACK';
public function __construct($config = array()) {
parent::__construct($config);
}
public function getModel($name = 'Feedbacks', $prefix = 'RSFeedbackModel', $config = array('ignore_request' => true)) {
return parent::getModel($name, $prefix, $config);
}
public function movefeedback() {
$model = $this->getModel('feedbacks');
$permissions = RSFeedbackHelper::getPermissions();
if (!$permissions['feedback_move'])
$this->setRedirect(Route::_('index.php?option=com_rsfeedback&view=feedbacks', false), Text::_('COM_RSFEEDBACK_FEEDBACK_MOVE_NO_PERMISSION'));
$model->MoveFeedback();
}
public function updatestatus() {
$model = $this->getModel('feedbacks');
$permissions = RSFeedbackHelper::getPermissions();
$feedback_id = Factory::getApplication()->input->get('feedback_id', 0, 'int');
$status_id = Factory::getApplication()->input->get('status_id', 0, 'int');
if (!$permissions['feedback_update_status'])
$this->setRedirect(Route::_('index.php?option=com_rsfeedback&view=feedbacks', false), Text::_('COM_RSFEEDBACK_STATUS_UPDATE_ERROR_PERMISSION'));
$model->UpdateFeedbackStatus($feedback_id, $status_id);
}
public function delete() {
$model = $this->getModel('feedbacks');
$id = Factory::getApplication()->input->get('id', 0, 'int');
$cat_id = Factory::getApplication()->input->get('cat_id', 0, 'int');
$tmpl = Factory::getApplication()->input->get('tmpl', '', 'cmd');
$permissions = RSFeedbackHelper::getPermissions();
if ($permissions['feedback_delete'] && $model->delete($id))
$msg = Text::_('COM_RSFEEDBACK_FEEDBACK_DELETED_SUCCESS');
else
$msg = Text::_('COM_RSFEEDBACK_FEEDBACK_DELETED_ERROR_NO_PERMISSION');
$this->setRedirect(Route::_('index.php?option=com_rsfeedback&view=feedbacks'.(!empty($cat_id) ? '&cat_id='.$cat_id : '').(!empty($tmpl) ? '&tmpl='.$tmpl : ''), false), $msg);
}
public function search() {
$search = Factory::getApplication()->input->get('search', '', 'string');
$cat_id = Factory::getApplication()->input->get('cat_id', 0, 'int');
$tmpl = Factory::getApplication()->input->get('tmpl', '', 'cmd');
$this->setRedirect(Route::_('index.php?option=com_rsfeedback&view=feedbacks'.(!empty($cat_id) ? '&cat_id='.$cat_id : '').'&search='.$search.(!empty($tmpl) ? '&tmpl='.$tmpl : ''), false));
}
public function deletevotes() {
$model = $this->getModel('feedbacks');
$tmpl = Factory::getApplication()->input->get('tmpl', '', 'cmd');
if ($model->deleteVotes() > 0)
$this->setMessage(Text::_('COM_RSFEEDBACK_FEEDBACKS_RESET_MY_VOTES_SUCCESS'));
else
$this->setMessage(Text::_('COM_RSFEEDBACK_FEEDBACKS_RESET_MY_VOTES_NO_VOTES_WARNING'), 'warning');
$this->setRedirect(Route::_('index.php?option=com_rsfeedback&view=feedbacks&action=votes'.(!empty($tmpl) ? '&tmpl='.$tmpl : ''), false));
}
}