uawdijnntqw1x1x1
IP : 3.143.22.194
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
/
public_html
/
0d544
/
..
/
..
/
.trash
/
catalog
/
controller
/
extension
/
total
/
.
/
reward.php
/
/
<?php class ControllerExtensionTotalReward extends Controller { public function index() { $points = $this->customer->getRewardPoints(); $points_total = 0; foreach ($this->cart->getProducts() as $product) { if ($product['points']) { $points_total += $product['points']; } } if ($points && $points_total && $this->config->get('total_reward_status')) { $this->load->language('extension/total/reward'); $data['heading_title'] = sprintf($this->language->get('heading_title'), $points); $data['entry_reward'] = sprintf($this->language->get('entry_reward'), $points_total); if (isset($this->session->data['reward'])) { $data['reward'] = $this->session->data['reward']; } else { $data['reward'] = ''; } return $this->load->view('extension/total/reward', $data); } } public function reward() { $this->load->language('extension/total/reward'); $json = array(); $points = $this->customer->getRewardPoints(); $points_total = 0; foreach ($this->cart->getProducts() as $product) { if ($product['points']) { $points_total += $product['points']; } } if (!isset($this->request->post['reward']) || !is_numeric($this->request->post['reward']) || ($this->request->post['reward'] <= 0)) { $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']); $this->session->data['success'] = $this->language->get('text_success'); if (isset($this->request->post['redirect'])) { $json['redirect'] = $this->url->link($this->request->post['redirect']); } else { $json['redirect'] = $this->url->link('checkout/cart'); } } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } }
/home/sudancam/public_html/0d544/../../.trash/catalog/controller/extension/total/./reward.php