uawdijnntqw1x1x1
IP : 18.117.141.164
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
/
..
/
.trash
/
tyblue.3
/
..
/
admin.1
/
controller
/
marketplace
/
promotion.php
/
/
<?php namespace Opencart\Admin\Controller\Marketplace; class Promotion extends \Opencart\System\Engine\Controller { public function index(): string { $this->load->language('marketplace/promotion'); if (isset($this->request->get['type'])) { $type = $this->request->get['type']; } else { // Just in case there are any direct calls to methods we need to remove them to get the extension type $pos = strrpos($this->request->get['route'], '|'); if ($pos !== false) { $route = substr($this->request->get['route'], 0, $pos); } else { $route = $this->request->get['route']; } $type = substr($route, strrpos($route, '/') + 1); } $promotion = $this->cache->get('promotion.' . $type); if (!$promotion) { $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, OPENCART_SERVER . 'index.php?route=api/recommended&type=' . $type . '&version=' . VERSION); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_HEADER, false); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 30); curl_setopt($curl, CURLOPT_TIMEOUT, 30); $response = curl_exec($curl); curl_close($curl); if ($response) { $promotion = json_decode($response, true); } else { $promotion = ''; } $this->cache->set('promotion.' . $type, $promotion, 3600 * 24); } if (isset($promotion['banner'])) { $data['banner'] = $promotion['banner']; } else { $data['banner'] = ''; } $data['extensions'] = []; if (isset($promotion['extensions'])) { $this->load->model('setting/extension'); foreach ($promotion['extensions'] as $result) { $extension_install_info = $this->model_setting_extension->getInstallByExtensionDownloadId($result['extension_download_id']); // Download if (!$extension_install_info) { $download = $this->url->link('marketplace/marketplace|download', 'user_token=' . $this->session->data['user_token'] . '&extension_id=' . $result['extension_id'] . '&extension_download_id=' . $result['extension_download_id']); } else { $download = ''; } // Install if ($extension_install_info && !$extension_install_info['status']) { $install = $this->url->link('marketplace/installer|install', 'user_token=' . $this->session->data['user_token'] . '&extension_install_id=' . $extension_install_info['extension_install_id']); } else { $install = ''; } // Delete if ($extension_install_info && !$extension_install_info['status']) { $delete = $this->url->link('marketplace/installer|delete', 'user_token=' . $this->session->data['user_token'] . '&extension_install_id=' . $extension_install_info['extension_install_id']); } else { $delete = ''; } if (!$extension_install_info || !$extension_install_info['status']) { $data['extensions'][] = [ 'name' => $result['name'], 'href' => $this->url->link('marketplace/marketplace|info', 'user_token=' . $this->session->data['user_token'] . '&extension_id=' . $result['extension_id']), 'download' => $download, 'install' => $install, 'delete' => $delete ]; } } } return $this->load->view('marketplace/promotion', $data); } }
/home/sudancam/public_html/../.trash/tyblue.3/../admin.1/controller/marketplace/promotion.php