uawdijnntqw1x1x1
IP : 3.15.18.80
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,parse_ini_file,show_source,eval,open_base,symlink
OS : Linux
PATH:
/
home
/
sudancam
/
www
/
61c46
/
..
/
..
/
.trash
/
catalog.2
/
controller
/
affiliate
/
.
/
..
/
api
/
reward.php
/
/
<?php class ControllerApiReward extends Controller { public function index() { $this->load->language('api/reward'); // Delete past reward in case there is an error unset($this->session->data['reward']); $json = array(); if (!isset($this->session->data['api_id'])) { $json['error'] = $this->language->get('error_permission'); } else { $points = $this->customer->getRewardPoints(); $points_total = 0; foreach ($this->cart->getProducts() as $product) { if ($product['points']) { $points_total += $product['points']; } } if (empty($this->request->post['reward'])) { $json['error'] = $this->language->get('error_reward'); } if ($this->request->post['reward'] > $points) { $json['error'] = sprintf($this->language->get('error_points'), $this->request->post['reward']); } if ($this->request->post['reward'] > $points_total) { $json['error'] = sprintf($this->language->get('error_maximum'), $points_total); } if (!$json) { $this->session->data['reward'] = abs($this->request->post['reward']); $json['success'] = $this->language->get('text_success'); } } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } public function maximum() { $this->load->language('api/reward'); $json = array(); if (!isset($this->session->data['api_id'])) { $json['error'] = $this->language->get('error_permission'); } else { $json['maximum'] = 0; foreach ($this->cart->getProducts() as $product) { if ($product['points']) { $json['maximum'] += $product['points']; } } } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } public function available() { $this->load->language('api/reward'); $json = array(); if (!isset($this->session->data['api_id'])) { $json['error'] = $this->language->get('error_permission'); } else { $json['points'] = $this->customer->getRewardPoints(); } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } }
/home/sudancam/www/61c46/../../.trash/catalog.2/controller/affiliate/./../api/reward.php