uawdijnntqw1x1x1
IP : 18.188.126.29
Hostname : ns1.eurodns.top
Kernel : Linux ns1.eurodns.top 4.18.0-553.5.1.lve.1.el7h.x86_64 #1 SMP Fri Jun 14 14:24:52 UTC 2024 x86_64
Disable Function : mail,sendmail,exec,passthru,shell_exec,system,popen,curl_multi_exec,show_source,eval,open_base
OS : Linux
PATH:
/
home
/
sudancam
/
.trash
/
tyblue.6
/
..
/
admin.1
/
controller
/
.
/
extension
/
report.php
/
/
<?php namespace Opencart\Admin\Controller\Extension; class Report extends \Opencart\System\Engine\Controller { public function index(): void { $this->response->setOutput($this->getList()); } public function getList(): string { $this->load->language('extension/report'); $available = []; $this->load->model('setting/extension'); $results = $this->model_setting_extension->getPaths('%/admin/controller/report/%.php'); foreach ($results as $result) { $available[] = basename($result['path'], '.php'); } $installed = []; $extensions = $this->model_setting_extension->getExtensionsByType('report'); foreach ($extensions as $extension) { if (in_array($extension['code'], $available)) { $installed[] = $extension['code']; } else { $this->model_setting_extension->uninstall('report', $extension['code']); } } $data['extensions'] = []; if ($results) { foreach ($results as $result) { $extension = substr($result['path'], 0, strpos($result['path'], '/')); $code = basename($result['path'], '.php'); $this->load->language('extension/' . $extension . '/report/' . $code, $code); $data['extensions'][] = [ 'name' => $this->language->get($code . '_heading_title'), 'status' => $this->config->get('report_' . $code . '_status') ? $this->language->get('text_enabled') : $this->language->get('text_disabled'), 'sort_order' => $this->config->get('report_' . $code . '_sort_order'), 'install' => $this->url->link('extension/report|install', 'user_token=' . $this->session->data['user_token'] . '&extension=' . $extension . '&code=' . $code), 'uninstall' => $this->url->link('extension/report|uninstall', 'user_token=' . $this->session->data['user_token'] . '&extension=' . $extension . '&code=' . $code), 'installed' => in_array($code, $installed), 'edit' => $this->url->link('extension/' . $extension . '/report/' . $code, 'user_token=' . $this->session->data['user_token']) ]; } } $data['promotion'] = $this->load->controller('marketplace/promotion'); return $this->load->view('extension/report', $data); } public function install(): void { $this->load->language('extension/report'); $json = []; if (isset($this->request->get['extension'])) { $extension = basename($this->request->get['extension']); } else { $extension = ''; } if (isset($this->request->get['code'])) { $code = basename($this->request->get['code']); } else { $code = ''; } if (!$this->user->hasPermission('modify', 'extension/report')) { $json['error'] = $this->language->get('error_permission'); } if (!is_file(DIR_EXTENSION . $extension . '/admin/controller/report/' . $code . '.php')) { $json['error'] = $this->language->get('error_extension'); } if (!$json) { $this->load->model('setting/extension'); $this->model_setting_extension->install('report', $extension, $code); $this->load->model('user/user_group'); $this->model_user_user_group->addPermission($this->user->getGroupId(), 'access', 'extension/' . $extension . '/report/' . $code); $this->model_user_user_group->addPermission($this->user->getGroupId(), 'modify', 'extension/' . $extension . '/report/' . $code); $namespace = str_replace(['_', '/'], ['', '\\'], ucwords($extension, '_/')); // Register controllers, models and system extension folders $this->autoloader->register('Opencart\Admin\Controller\Extension\\' . $namespace, DIR_EXTENSION . $extension . '/admin/controller/'); $this->autoloader->register('Opencart\Admin\Model\Extension\\' . $namespace, DIR_EXTENSION . $extension . '/admin/model/'); $this->autoloader->register('Opencart\System\Extension\\' . $namespace, DIR_EXTENSION . $extension . '/system/'); // Template directory $this->template->addPath('extension/' . $extension, DIR_EXTENSION . $extension . '/admin/view/template/'); // Language directory $this->language->addPath('extension/' . $extension, DIR_EXTENSION . $extension . '/admin/language/'); // Config directory $this->config->addPath('extension/' . $extension, DIR_EXTENSION . $extension . '/system/config/'); // Call install method if it exists $this->load->controller('extension/' . $extension . '/report/' . $code . '|install'); $json['success'] = $this->language->get('text_success'); } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } public function uninstall(): void { $this->load->language('extension/report'); $json = []; if (!$this->user->hasPermission('modify', 'extension/report')) { $json['error'] = $this->language->get('error_permission'); } if (!$json) { $this->load->model('setting/extension'); $this->model_setting_extension->uninstall('report', $this->request->get['code']); // Call uninstall method if it exists $this->load->controller('extension/' . $this->request->get['extension'] . '/report/' . $this->request->get['code'] . '|uninstall'); $json['success'] = $this->language->get('text_success'); } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } }
/home/sudancam/.trash/tyblue.6/../admin.1/controller/./extension/report.php