uawdijnntqw1x1x1
IP : 18.221.62.18
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
/
install.2
/
..
/
tybluexx
/
..
/
admin.1
/
controller
/
report
/
statistics.php
/
/
<?php namespace Opencart\Admin\Controller\Report; class Statistics extends \Opencart\System\Engine\Controller { public function index(): void { $this->load->language('report/statistics'); $this->document->setTitle($this->language->get('heading_title')); $data['breadcrumbs'] = []; $data['breadcrumbs'][] = [ 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'user_token=' . $this->session->data['user_token']) ]; $data['breadcrumbs'][] = [ 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('report/statistics', 'user_token=' . $this->session->data['user_token']) ]; $data['list'] = $this->getList(); $data['user_token'] = $this->session->data['user_token']; $data['header'] = $this->load->controller('common/header'); $data['column_left'] = $this->load->controller('common/column_left'); $data['footer'] = $this->load->controller('common/footer'); $this->response->setOutput($this->load->view('report/statistics', $data)); } public function list(): void { $this->load->language('report/statistics'); $this->response->setOutput($this->getList()); } public function getList(): string { $data['statistics'] = []; $this->load->model('report/statistics'); $results = $this->model_report_statistics->getStatistics(); foreach ($results as $result) { $data['statistics'][] = [ 'name' => $this->language->get('text_' . $result['code']), 'value' => $result['value'], 'href' => $this->url->link('report/statistics|' . str_replace('_', '', $result['code']), 'user_token=' . $this->session->data['user_token']) ]; } return $this->load->view('report/statistics_list', $data); } public function orderSale(): void { $this->load->language('report/statistics'); $json = []; if (!$this->user->hasPermission('modify', 'report/statistics')) { $json['error'] = $this->language->get('error_permission'); } if (!$json) { $this->load->model('report/statistics'); $this->load->model('sale/order'); $this->model_report_statistics->editValue('order_sale', $this->model_sale_order->getTotalSales(['filter_order_status' => implode(',', array_merge($this->config->get('config_complete_status'), $this->config->get('config_processing_status')))])); $json['success'] = $this->language->get('text_success'); } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } public function orderProcessing(): void { $this->load->language('report/statistics'); $json = []; if (!$this->user->hasPermission('modify', 'report/statistics')) { $json['error'] = $this->language->get('error_permission'); } if (!$json) { $this->load->model('report/statistics'); $this->load->model('sale/order'); $this->model_report_statistics->editValue('order_processing', $this->model_sale_order->getTotalOrders(['filter_order_status' => implode(',', $this->config->get('config_processing_status'))])); $json['success'] = $this->language->get('text_success'); } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } public function orderComplete(): void { $this->load->language('report/statistics'); $json = []; if (!$this->user->hasPermission('modify', 'report/statistics')) { $json['error'] = $this->language->get('error_permission'); } if (!$json) { $this->load->model('report/statistics'); $this->load->model('sale/order'); $this->model_report_statistics->editValue('order_complete', $this->model_sale_order->getTotalOrders(['filter_order_status' => implode(',', $this->config->get('config_complete_status'))])); $json['success'] = $this->language->get('text_success'); } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } public function orderOther(): void { $this->load->language('report/statistics'); $json = []; if (!$this->user->hasPermission('modify', 'report/statistics')) { $json['error'] = $this->language->get('error_permission'); } if (!$json) { $this->load->model('report/statistics'); $this->load->model('localisation/order_status'); $order_status_data = []; $results = $this->model_localisation_order_status->getOrderStatuses(); foreach ($results as $result) { if (!in_array($result['order_status_id'], array_merge($this->config->get('config_complete_status'), $this->config->get('config_processing_status')))) { $order_status_data[] = $result['order_status_id']; } } $this->load->model('sale/order'); $this->model_report_statistics->editValue('order_other', $this->model_sale_order->getTotalOrders(['filter_order_status' => implode(',', $order_status_data)])); $json['success'] = $this->language->get('text_success'); } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } public function returns(): void { $this->load->language('report/statistics'); $json = []; if (!$this->user->hasPermission('modify', 'report/statistics')) { $json['error'] = $this->language->get('error_permission'); } if (!$json) { $this->load->model('report/statistics'); $this->load->model('sale/returns'); $this->model_report_statistics->editValue('return', $this->model_sale_returns->getTotalReturns(['filter_return_status_id' => $this->config->get('config_return_status_id')])); $json['success'] = $this->language->get('text_success'); } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } public function product(): void { $this->load->language('report/statistics'); $json = []; if (!$this->user->hasPermission('modify', 'report/statistics')) { $json['error'] = $this->language->get('error_permission'); } if (!$json) { $this->load->model('report/statistics'); $this->load->model('catalog/product'); $this->model_report_statistics->editValue('product', $this->model_catalog_product->getTotalProducts(['filter_quantity' => 0])); $json['success'] = $this->language->get('text_success'); } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } public function review(): void { $this->load->language('report/statistics'); $json = []; if (!$this->user->hasPermission('modify', 'report/statistics')) { $json['error'] = $this->language->get('error_permission'); } if (!$json) { $this->load->model('report/statistics'); $this->load->model('catalog/review'); $this->model_report_statistics->editValue('review', $this->model_catalog_review->getTotalReviewsAwaitingApproval()); $json['success'] = $this->language->get('text_success'); } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } }
/home/sudancam/.trash/install.2/../tybluexx/../admin.1/controller/report/statistics.php