Linux altar53.supremepanel53.com 4.18.0-553.8.1.lve.el8.x86_64 #1 SMP Thu Jul 4 16:24:39 UTC 2024 x86_64
/ home/ bdapparelinfo/ dhakazone.com/ admin/ controller/ journal3/ |
|
<?php use Journal3\Opencart\Controller; class ControllerJournal3Message extends Controller { public function __construct($registry) { parent::__construct($registry); $this->load->model('journal3/message'); $this->load->language('error/permission'); } public function all() { try { $filters = array( 'filter' => $this->input(self::GET, 'filter', ''), 'sort' => $this->input(self::GET, 'sort', ''), 'order' => $this->input(self::GET, 'order', ''), 'page' => $this->input(self::GET, 'page', '1'), 'limit' => $this->input(self::GET, 'limit', '10'), ); $this->renderJson(self::SUCCESS, $this->model_journal3_message->all($filters)); } catch (Exception $e) { $this->renderJson(self::ERROR, $e->getMessage()); } } public function get() { try { $id = $this->input(self::GET, 'id'); $this->renderJson(self::SUCCESS, $this->model_journal3_message->get($id)); } catch (Exception $e) { $this->renderJson(self::ERROR, $e->getMessage()); } } public function remove() { try { if (!$this->user->hasPermission('modify', 'journal3/message')) { throw new Exception($this->language->get('text_permission')); } $id = $this->input(self::GET, 'id'); $this->renderJson(self::SUCCESS, $this->model_journal3_message->remove($id)); } catch (Exception $e) { $this->renderJson(self::ERROR, $e->getMessage()); } } }