✏️ 正在编辑: atos_return.php
路径:
/home/bpioifn/www/pigmentse/modules/atos/controllers/front/atos_return.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php /** * 2007-2019 PrestaShop * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <contact@prestashop.com> * @copyright 2007-2017 PrestaShop SA * @license http://addons.prestashop.com/en/content/12-terms-and-conditions-of-use * International Registered Trademark & Property of PrestaShop SA */ class AtosReturnModuleFrontController extends ModuleFrontController { public function initContent() { $this->ajax = true; $datas = Tools::getValue('DATA'); if (empty($datas)) { Tools::redirect('index.php'); } else { $atos = $this->module; $is_win = (Tools::strtoupper(Tools::substr(PHP_OS, 0, 3)) === 'WIN'); $exec = $atos->bin_dir.'response'.(((int)$is_win === 1) ? '.exe' : ''); $result = exec($exec.' pathfile='._PS_MODULE_DIR_.'/atos/pathfile message='.preg_replace('#[^a-z0-9]#Ui', '', $datas)); $result_array = explode('!', $result); if (!empty($result_array)) { $cart = new Cart((int)$result_array[22]); $customer = new Customer((int)$cart->id_customer); if (version_compare(_PS_VERSION_, '1.5', '>')) { $back_url = 'index.php?controller=order&step=3'; $return_page = 'index.php?controller=order-confirmation&id_cart='.$cart->id.'&id_module='.$atos->id.'&key='.$customer->secure_key; } else { $back_url = 'order.php?step=3'; $return_page = 'order-confirmation.php?id_cart='.$cart->id.'&id_module='.$atos->id.'&key='.$customer->secure_key; } $cancel_page = (Configuration::get('ATOS_ERROR_BEHAVIOR') ? $back_url : $return_page); Tools::redirect($cancel_page); } else { Tools::redirect('index.php'); } } } }
💾 保存文件
← 返回文件管理器