Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php class EnviameConfigController extends ModuleAdminController { public function __co..
Decoded Output download
<?php
class EnviameConfigController extends ModuleAdminController { public function __construct() { $this->list_no_link = true; $this->module = "enviame"; $this->bootstrap = true; $this->table = ''; $mod = Module::getInstanceByName("enviame"); $this->mod = $mod; $this->pu = $mod->pu; $this->lang = false; $this->deleted = false; $this->_defaultOrderBy = "id_order"; $this->_defaultOrderWay = "asc"; $this->explicitSelect = true; parent::__construct(); $this->bulk_actions = array("delete" => array("text" => $this->trans("Delete selected", array(), "Admin.Actions"), "confirm" => $this->trans("Delete selected items?", array(), "Admin.Actions"))); $this->generarEtiquetasPDF(); $modos = array(array("name" => "Pruebas", "id" => 0), array("name" => "Produccin", "id" => 1)); $agregar_productos = array("No", "Si"); $agregar_pedido = array("No", "Si"); $estados = OrderState::getOrderStates(Configuration::get("PS_LANG_DEFAULT")); $comunas = State::getStates(false, true); $paises_permitidos = array(68, 69, 171, 44, 145); $paises = Country::getCountries(Configuration::get("PS_LANG_DEFAULT"), false); $paises_final = array(); foreach ($paises as $pais) { if (in_array($pais["id_country"], $paises_permitidos)) { $paises_final[] = $pais; } } $impactos = array(array("impacto" => 0, "name" => "No"), array("impacto" => 1, "name" => "Aumentar (Porcentaje)"), array("impacto" => 2, "name" => "Aumentar (Cantidad)")); $registrado = (int) Configuration::get("ENVIAME_REGISTRADO"); $fecha_vence = (int) Configuration::get("ENVIAME_FECHA_VENCE"); $shop = (object) Shop::getShop((int) Context::getContext()->shop->id); $dom = (string) Configuration::get("ENVIAME_DOMINIO"); if ($dom == '') { Configuration::updateValue("ENVIAME_DOMINIO", $shop->domain); } if ($registrado > 0 and $this->pu == 0) { $ch = curl_init("https://bitzen.cl/suscripciones/registro_usuarios.php"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "id_usuario=" . $registrado . "&METODO=buscar_usuario&NOMBRE_MODULO=enviame&DOM=" . $shop->domain . "&PU=" . $this->pu); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $respuesta_json_2 = curl_exec($ch); curl_close($ch); $usuario = json_decode($respuesta_json_2, true); $fecha_vence = @(int) $usuario["fecha_vence"]; if ($fecha_vence > 0) { Configuration::updateValue("ENVIAME_FECHA_VENCE", $fecha_vence); } } if ($registrado > 0) { $ch = curl_init("https://bitzen.cl/suscripciones/registro_usuarios.php"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "ID_USUARIO=" . $registrado . "&VERSION=" . $mod->version . "&METODO=enviar_version"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $respuesta_json = curl_exec($ch); curl_close($ch); $respuesta = json_decode($respuesta_json, true); } $fecha_actual = time(); $shop = (object) Shop::getShop((int) Context::getContext()->shop->id); if ($registrado > 0 and ($fecha_vence >= $fecha_actual and $shop->domain == $dom or $this->pu == 1)) { $carriers = $this->mod->obtenerCarriers(); $url = Tools::getHttpHost(true) . __PS_BASE_URI__; foreach ($carriers as $car) { $id_carrier = (int) Db::getInstance()->getValue("select id_carrier from `" . _DB_PREFIX_ . "carrier` where enviame_carrier_code = "" . $car["code"] . "" and deleted = 0"); if ($id_carrier == 0) { $carrier = new Carrier(); $carrier->name = pSQL($car["name"]); $carrier->url = $url . "index.php?fc=module&module=enviame&controller=tracking&tracking_number=@"; $carrier->is_module = true; $carrier->active = 1; $carrier->range_behavior = 0; $carrier->need_range = 1; $carrier->shipping_external = true; $carrier->external_module_name = "enviame"; $carrier->shipping_method = 1; $carrier->grade = 0; foreach (Language::getLanguages() as $lang) { $carrier->delay[$lang["id_lang"]] = $car["name"]; } $carrier->add(); Db::getInstance()->execute("update `" . _DB_PREFIX_ . "carrier` set enviame_carrier_code = "" . $car["code"] . "" where id_carrier = " . (int) $carrier->id); @copy(_PS_ROOT_DIR_ . "/modules/enviame/views/img/c/Logoc-courier-plataforma_" . strtolower($car["name"]) . ".jpg", _PS_SHIP_IMG_DIR_ . "/" . (int) $carrier->id . ".jpg"); @copy(_PS_ROOT_DIR_ . "/modules/enviame/views/img/c/Logoc-courier-plataforma_" . strtolower($car["name"]) . "-1.jpg", _PS_SHIP_IMG_DIR_ . "/" . (int) $carrier->id . ".jpg"); @copy(_PS_ROOT_DIR_ . "/modules/enviame/views/img/c/Logoc-courier-plataforma_" . ucwords(strtolower($car["name"])) . ".jpg", _PS_SHIP_IMG_DIR_ . "/" . (int) $carrier->id . ".jpg"); @copy(_PS_ROOT_DIR_ . "/modules/enviame/views/img/c/Logoc-courier-plataforma_" . ucwords(strtolower($car["name"])) . "-1.jpg", _PS_SHIP_IMG_DIR_ . "/" . (int) $carrier->id . ".jpg"); @copy(_PS_ROOT_DIR_ . "/modules/enviame/views/img/c/Logoc-courier-plataforma_" . ucfirst(strtolower($car["name"])) . ".jpg", _PS_SHIP_IMG_DIR_ . "/" . (int) $carrier->id . ".jpg"); @copy(_PS_ROOT_DIR_ . "/modules/enviame/views/img/c/Logoc-courier-plataforma_" . ucfirst(strtolower($car["name"])) . "-1.jpg", _PS_SHIP_IMG_DIR_ . "/" . (int) $carrier->id . ".jpg"); $zone_klass = new Zone(); $all_zones = $zone_klass->getZones(); foreach ($all_zones as $zone) { $id_zone = $zone["id_zone"]; $carrier->addZone($id_zone); } $range_weight = new RangeWeight(); $range_weight->id_carrier = $carrier->id; $range_weight->delimiter1 = "0"; $range_weight->delimiter2 = "999999"; $range_weight->add(); $groups_ids = array(); $groups = Group::getGroups(Context::getContext()->language->id); foreach ($groups as $group) { $groups_ids[] = $group["id_group"]; } $carrier->setGroups($groups_ids); } } $this->fields_options = array("general" => array("title" => "Configuracin", "fields" => array("ENVIAME_NOMBRE_PRODUCTOS" => array("title" => $this->l("Agregar nombre de los productos."), "desc" => $this->l("Agregar los nombres de los productos en las observaciones de los envos."), "type" => "bool", "name" => "ENVIAME_NOMBRE_PRODUCTOS", "choices" => $agregar_productos), "ENVIAME_REFERENCIA_PEDIDO" => array("title" => $this->l("Agregar referencia del pedido."), "desc" => $this->l("Agregar la referencia del pedido en las observaciones de los envos."), "type" => "bool", "name" => "ENVIAME_REFERENCIA_PEDIDO", "choices" => $agregar_pedido), "ENVIAME_SELECTOR_COMUNAS" => array("title" => $this->l("Agregar el selector de comunas."), "desc" => $this->l("Agregar o no el selector de comunas en los formularios de direcciones."), "type" => "bool", "name" => "ENVIAME_SELECTOR_COMUNAS", "choices" => $agregar_productos), "ENVIAME_PAIS" => array("type" => "select", "name" => "ENVIAME_PAIS", "list" => $paises_final, "title" => "Pas para filtrar las comunas.", "identifier" => "id_country", "desc" => "Seleccione el pas para filtrar las comunas."), "ENVIAME_COMUNA" => array("type" => "select", "name" => "ENVIAME_COMUNA", "list" => $comunas, "title" => "Comuna desde donde se calcular el precio del envio.", "identifier" => "name", "desc" => "Seleccione la comuna desde donde se calcular el precio del envio."), "ENVIAME_CODIGO_BODEGA" => array("type" => "text", "name" => "ENVIAME_CODIGO_BODEGA", "value" => '', "lang" => false, "title" => "Cdigo de la bodega en Enviame.", "desc" => "Ingrese el cdigo de la bodega en Enviame."), "ENVIAME_ESTADO" => array("title" => $this->l("Seleccione el estado del pedido que va a crear el envio"), "desc" => $this->l("Seleccione el estado del pedido que va a crear el envio en Enviame."), "type" => "select", "identifier" => "id_order_state", "list" => $estados), "ENVIAME_IMPACTO_COMISION" => array("type" => "select", "name" => "ENVIAME_IMPACTO_COMISION", "identifier" => "impacto", "list" => $impactos, "title" => "Impacto en el precio de comisin a agregar al costo del envo.", "desc" => "Seleccione el impacto en el precio de comisin a agregar al costo del envo."), "ENVIAME_COMISION" => array("type" => "text", "name" => "ENVIAME_COMISION", "value" => '', "lang" => false, "title" => "Comisin a agregar al costo del envo.", "desc" => "Ingrese la comisin a agregar al costo del envo."), "ENVIAME_AMBIENTE" => array("title" => $this->l("Seleccione el modo ( Pruebas o Produccin )"), "desc" => $this->l("Seleccione el modo en el que desea conectarse con el API, en modo de pruebas o en modo de produccin."), "type" => "select", "identifier" => "id", "list" => $modos), "ENVIAME_ID_EMPRESA" => array("type" => "text", "name" => "ENVIAME_ID_EMPRESA", "value" => '', "lang" => false, "title" => "Id de la empresa para ambiente en produccin.", "desc" => "Ingrese el id de la empresa para ambiente en produccin."), "ENVIAME_API_KEY" => array("type" => "text", "name" => "ENVIAME_API_KEY", "value" => '', "lang" => false, "title" => "Api key de la empresa para ambiente en produccin.", "desc" => "Ingrese el Api key de la empresa para ambiente en produccin."), "ENVIAME_ID_EMPRESA_PRUEBA" => array("type" => "text", "name" => "ENVIAME_ID_EMPRESA_PRUEBA", "value" => '', "lang" => false, "title" => "Id de la empresa para ambiente de pruebas.", "desc" => "Ingrese el id de la empresa para ambiente de pruebas."), "ENVIAME_API_KEY_PRUEBA" => array("type" => "text", "name" => "ENVIAME_API_KEY_PRUEBA", "value" => '', "lang" => false, "title" => "Api key de la empresa para ambiente de pruebas.", "desc" => "Ingrese el Api key de la empresa para ambiente de pruebas."), "ENVIAME_TEXTO_OBSERVACION" => array("type" => "text", "name" => "ENVIAME_TEXTO_OBSERVACION", "value" => '', "lang" => false, "title" => "Agregar texto de observaciones de envio.", "desc" => "Ingrese el texto que va a salir en las observaciones del envo al lado del nmero del pedido."), "ENVIAME_DATOS_USUARIO" => array("type" => "free", "name" => "ENVIAME_DATOS_USUARIO", "value" => "...", "lang" => false, "title" => "<b>Datos de registro:<br/>" . Configuration::get("ENVIAME_NOMBRE") . " " . Configuration::get("ENVIAME_APELLIDO") . "(ID: " . Configuration::get("ENVIAME_REGISTRADO") . ")<br/>" . Configuration::get("ENVIAME_EMAIL") . "</b>", "desc" => ''), "ENVIAME_NOTA2" => array("type" => "free", "name" => "ENVIAME_NOTA2", "value" => "...", "lang" => false, "title" => "<b>Si necesitas ayuda envanos un email a <a href="mailto:[email protected]">[email protected]</a></b>", "desc" => '')), "submit" => array("name" => "guardarConfig", "title" => "Guardar Configuracin"))); } elseif ($registrado == 0) { $titulo = "Gracias por instalar el mdulo Enviame, registrate en Bitzen primero para usar el mdulo gratis por 15 das."; if ($this->pu == 1) { $titulo = "Gracias por instalar el mdulo Enviame, registrate en Bitzen primero para usar el mdulo."; } $this->fields_options = array("general" => array("title" => $titulo, "fields" => array("ENVIAME_NOMBRE" => array("type" => "text", "name" => "ENVIAME_NOMBRE", "value" => '', "lang" => false, "title" => "Nombre", "desc" => "Ingrese su nombre.", "required" => true), "ENVIAME_APELLIDO" => array("type" => "text", "name" => "ENVIAME_APELLIDO", "value" => '', "lang" => false, "title" => "Apellido", "desc" => "Ingrese su apellido."), "ENVIAME_EMAIL" => array("type" => "text", "name" => "ENVIAME_EMAIL", "value" => '', "lang" => false, "title" => "Email", "desc" => "Ingrese su email."), "ENVIAME_NOTA2" => array("type" => "free", "name" => "ENVIAME_NOTA2", "value" => "...", "lang" => false, "title" => "<b>Si necesitas ayuda envanos un email a <a href="mailto:[email protected]">[email protected]</a></b>", "desc" => '')), "submit" => array("name" => "crearCuenta", "title" => "Crear cuenta en Bitzen"))); } } public function initContent() { if (@(int) $_GET["error_cuenta"] == 1) { ?>
<script>
alert ('Ingresa los campos por favor');
</script>
<?php } if (@(int) $_GET["error_cuenta"] == 2) { ?>
<script>
alert ('Error registrando sus datos, verifique que sean correctos');
</script>
<?php } if (!$this->viewAccess()) { $this->errors[] = $this->trans("You do not have permission to view this.", array(), "Admin.Notifications.Error"); return; } if ($this->display == "edit" || $this->display == "add") { $this->content .= $this->renderForm(); } elseif ($this->display == "view") { if ($this->className) { $this->loadObject(true); } $this->content .= $this->renderView(); } elseif ($this->display == "details") { $this->content .= $this->renderDetails(); } elseif (!$this->ajax) { $this->content .= $this->renderOptions() . $this->renderList(); if ($this->required_database) { $this->content .= $this->displayRequiredFields(); } } $this->context->smarty->assign(array("content" => $this->content)); } public function initPageHeaderToolbar() { parent::initPageHeaderToolbar(); } public function setMedia($isNewTheme = false) { parent::setMedia($isNewTheme); } public function renderList() { $this->addRowAction("delete"); return parent::renderList(); } public function renderForm() { return parent::renderForm(); } public function processUpdate() { } public function postProcess() { if (Tools::isSubmit("guardarConfig")) { Configuration::updateValue("ENVIAME_ID_EMPRESA", Tools::getValue("ENVIAME_ID_EMPRESA")); Configuration::updateValue("ENVIAME_API_KEY", Tools::getValue("ENVIAME_API_KEY")); Configuration::updateValue("ENVIAME_ID_EMPRESA_PRUEBA", Tools::getValue("ENVIAME_ID_EMPRESA_PRUEBA")); Configuration::updateValue("ENVIAME_API_KEY_PRUEBA", Tools::getValue("ENVIAME_API_KEY_PRUEBA")); Configuration::updateValue("ENVIAME_AMBIENTE", Tools::getValue("ENVIAME_AMBIENTE")); Configuration::updateValue("ENVIAME_ESTADO", Tools::getValue("ENVIAME_ESTADO")); Configuration::updateValue("ENVIAME_CODIGO_BODEGA", Tools::getValue("ENVIAME_CODIGO_BODEGA")); Configuration::updateValue("ENVIAME_COMUNA", Tools::getValue("ENVIAME_COMUNA")); Configuration::updateValue("ENVIAME_PAIS", Tools::getValue("ENVIAME_PAIS")); Configuration::updateValue("ENVIAME_NOMBRE_PRODUCTOS", Tools::getValue("ENVIAME_NOMBRE_PRODUCTOS")); Configuration::updateValue("ENVIAME_REFERENCIA_PEDIDO", Tools::getValue("ENVIAME_REFERENCIA_PEDIDO")); Configuration::updateValue("ENVIAME_SELECTOR_COMUNAS", Tools::getValue("ENVIAME_SELECTOR_COMUNAS")); Configuration::updateValue("ENVIAME_IMPACTO_COMISION", Tools::getValue("ENVIAME_IMPACTO_COMISION")); Configuration::updateValue("ENVIAME_COMISION", Tools::getValue("ENVIAME_COMISION")); Configuration::updateValue("ENVIAME_TEXTO_OBSERVACION", Tools::getValue("ENVIAME_TEXTO_OBSERVACION")); Tools::redirectAdmin(Context::getContext()->link->getAdminLink("EnviameConfig") . "&token=" . $_GET["token"]); } if (Tools::isSubmit("importarComunas")) { Db::getInstance()->delete("enviame_comuna", "id_country = 68"); $sql = file(_PS_ROOT_DIR_ . "/modules/enviame/sql/comunas.sql"); foreach ($sql as $query) { $query = str_replace("ps_", _DB_PREFIX_, $query); Db::getInstance()->execute($query); } Tools::redirectAdmin(Context::getContext()->link->getAdminLink("EnviameConfig") . "&token=" . $_GET["token"]); } if (Tools::isSubmit("crearCuenta")) { if ($_POST["ENVIAME_NOMBRE"] != '' && $_POST["ENVIAME_APELLIDO"] != '' && $_POST["ENVIAME_EMAIL"] != '') { $shop = (object) Shop::getShop((int) Context::getContext()->shop->id); $ch = curl_init("https://bitzen.cl/suscripciones/registro_usuarios.php"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "ENVIAME_NOMBRE=" . $_POST["ENVIAME_NOMBRE"] . "&ENVIAME_APELLIDO=" . $_POST["ENVIAME_APELLIDO"] . "&ENVIAME_EMAIL=" . $_POST["ENVIAME_EMAIL"] . "&PU=" . $this->pu . "&NOMBRE_MODULO=enviame&METODO=registrar_usuario&DOM=" . $shop->domain); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $respuesta_json = curl_exec($ch); curl_close($ch); $respuesta = json_decode($respuesta_json, true); $id_usuario = (int) $respuesta["id_usuario"]; if ($id_usuario > 0) { Configuration::updateValue("ENVIAME_NOMBRE", Tools::getValue("ENVIAME_NOMBRE")); Configuration::updateValue("ENVIAME_APELLIDO", Tools::getValue("ENVIAME_APELLIDO")); Configuration::updateValue("ENVIAME_EMAIL", Tools::getValue("ENVIAME_EMAIL")); Configuration::updateValue("ENVIAME_REGISTRADO", $id_usuario); Configuration::updateValue("ENVIAME_DOMINIO", $shop->domain); $ch = curl_init("https://bitzen.cl/suscripciones/registro_usuarios.php"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "id_usuario=" . $id_usuario . "&METODO=buscar_usuario&NOMBRE_MODULO=enviame&DOM=" . $shop->domain . "&PU=" . $this->pu); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $respuesta_json_2 = curl_exec($ch); curl_close($ch); $usuario = json_decode($respuesta_json_2, true); $fecha_vence = @(int) $usuario["fecha_vence"]; Configuration::updateValue("ENVIAME_FECHA_VENCE", $fecha_vence); Tools::redirectAdmin(Context::getContext()->link->getAdminLink("EnviameConfig") . "&token=" . $_GET["token"]); } else { Tools::redirectAdmin(Context::getContext()->link->getAdminLink("EnviameConfig") . "&token=" . $_GET["token"] . "&error_cuenta=2"); } } else { Tools::redirectAdmin(Context::getContext()->link->getAdminLink("EnviameConfig") . "&token=" . $_GET["token"] . "&error_cuenta=1"); } } } public function processSave() { } public function processStatus() { } public function generarEtiquetasPDF() { if (Tools::isSubmit("generarEtiquetasEnviame") or isset($_GET["generarEtiquetasEnviame"])) { $envios = array(); $pedidos = @(array) $_POST["orderBox"]; if (count($pedidos) == 0) { $pedidos = @(array) $_POST["order_orders_bulk"]; } foreach ($pedidos as $id_order) { $respuestas = DB::getInstance()->executeS("select respuesta from " . _DB_PREFIX_ . "enviame_envio where id_order = " . (int) $id_order); foreach ($respuestas as $resp) { $respuesta = (string) $resp["respuesta"]; if ($respuesta != '') { $data = json_decode(base64_decode($respuesta), true); $identifier = @(int) $data["data"]["identifier"]; if ($identifier > 0) { $envios[] = $identifier; break; } } } } if (count($envios) > 0) { $respuesta = (string) $this->module->generarEtiquetas($envios, "pdf", 3); if ($respuesta != '') { $data = json_decode($respuesta, true); $url_labels_pdf = @(string) $data["data"][0]["labels"]; if ($url_labels_pdf != '') { $contenido = @(string) file_get_contents($url_labels_pdf); header("Content-Description: File Transfer"); header("Content-Type: application/octet-stream"); header("Content-Disposition: attachment; filename="Etiquetas_Enviame.pdf""); header("Expires: 0"); header("Cache-Control: must-revalidate"); header("Pragma: public"); header("Content-Length: " . strlen($contenido)); flush(); echo $contenido; die; } } } $token = Tools::getAdminToken("AdminOrders" . intval(Tab::getIdFromClassName("AdminOrders")) . intval($this->context->cookie->id_employee)); $url_pedidos = Context::getContext()->link->getAdminLink("AdminOrders") . "&token=" . $token; Tools::redirectAdmin($url_pedidos); } } } ?>
Did this file decode correctly?
Original Code
<?php
class EnviameConfigController extends ModuleAdminController { public function __construct() { $this->list_no_link = true; $this->module = "\145\x6e\x76\x69\x61\x6d\145"; $this->bootstrap = true; $this->table = ''; $mod = Module::getInstanceByName("\145\156\x76\151\141\x6d\145"); $this->mod = $mod; $this->pu = $mod->pu; $this->lang = false; $this->deleted = false; $this->_defaultOrderBy = "\x69\x64\x5f\x6f\x72\144\145\162"; $this->_defaultOrderWay = "\141\163\143"; $this->explicitSelect = true; parent::__construct(); $this->bulk_actions = array("\x64\x65\154\x65\164\145" => array("\x74\145\x78\x74" => $this->trans("\x44\x65\154\145\x74\x65\40\x73\x65\154\145\x63\x74\145\144", array(), "\101\x64\155\151\156\56\101\143\164\151\157\156\x73"), "\143\157\156\146\x69\162\155" => $this->trans("\x44\x65\154\145\x74\x65\x20\163\145\x6c\x65\143\164\145\144\40\151\x74\x65\155\163\x3f", array(), "\x41\144\155\151\x6e\x2e\x41\x63\164\x69\157\x6e\x73"))); $this->generarEtiquetasPDF(); $modos = array(array("\x6e\141\155\x65" => "\x50\162\165\x65\142\141\x73", "\x69\x64" => 0), array("\156\x61\155\145" => "\x50\162\x6f\x64\x75\143\143\x69\xc3\263\x6e", "\x69\x64" => 1)); $agregar_productos = array("\116\x6f", "\123\151"); $agregar_pedido = array("\116\157", "\123\151"); $estados = OrderState::getOrderStates(Configuration::get("\120\123\137\114\x41\x4e\x47\137\x44\x45\106\101\125\x4c\124")); $comunas = State::getStates(false, true); $paises_permitidos = array(68, 69, 171, 44, 145); $paises = Country::getCountries(Configuration::get("\x50\123\x5f\114\x41\x4e\107\137\104\x45\x46\x41\x55\114\124"), false); $paises_final = array(); foreach ($paises as $pais) { if (in_array($pais["\x69\144\x5f\143\157\x75\x6e\x74\162\171"], $paises_permitidos)) { $paises_final[] = $pais; } } $impactos = array(array("\x69\155\160\x61\x63\x74\x6f" => 0, "\x6e\141\155\x65" => "\x4e\x6f"), array("\151\155\160\x61\x63\x74\x6f" => 1, "\156\x61\x6d\145" => "\101\x75\x6d\145\x6e\164\141\x72\x20\x28\120\x6f\162\x63\x65\x6e\164\141\x6a\145\x29"), array("\x69\155\x70\141\143\x74\157" => 2, "\x6e\141\x6d\145" => "\101\x75\155\145\x6e\x74\141\x72\x20\x28\103\x61\156\164\x69\x64\141\x64\51")); $registrado = (int) Configuration::get("\105\x4e\126\x49\101\x4d\x45\x5f\122\x45\107\x49\x53\124\x52\x41\x44\117"); $fecha_vence = (int) Configuration::get("\105\x4e\x56\x49\x41\x4d\x45\x5f\106\105\103\x48\x41\x5f\x56\105\116\103\105"); $shop = (object) Shop::getShop((int) Context::getContext()->shop->id); $dom = (string) Configuration::get("\105\x4e\x56\111\x41\x4d\105\137\104\117\x4d\x49\116\x49\x4f"); if ($dom == '') { Configuration::updateValue("\x45\x4e\126\111\x41\x4d\x45\x5f\x44\x4f\115\111\116\x49\117", $shop->domain); } if ($registrado > 0 and $this->pu == 0) { $ch = curl_init("\150\164\164\160\x73\x3a\57\57\x62\151\164\x7a\145\x6e\x2e\143\x6c\57\163\165\x73\x63\x72\x69\x70\x63\x69\x6f\x6e\145\x73\x2f\x72\145\147\151\163\164\162\157\137\x75\163\x75\x61\x72\x69\x6f\163\56\160\150\160"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "\x69\x64\137\x75\x73\x75\141\162\151\x6f\75" . $registrado . "\x26\115\x45\x54\117\x44\117\75\142\x75\x73\143\141\x72\x5f\x75\163\165\141\x72\x69\157\x26\116\x4f\x4d\102\122\x45\137\115\x4f\x44\125\x4c\x4f\x3d\145\x6e\x76\151\x61\x6d\x65\46\x44\x4f\x4d\x3d" . $shop->domain . "\x26\120\x55\x3d" . $this->pu); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $respuesta_json_2 = curl_exec($ch); curl_close($ch); $usuario = json_decode($respuesta_json_2, true); $fecha_vence = @(int) $usuario["\x66\145\143\150\141\137\x76\x65\x6e\x63\145"]; if ($fecha_vence > 0) { Configuration::updateValue("\x45\x4e\x56\111\101\115\x45\x5f\x46\x45\x43\110\x41\x5f\126\105\x4e\103\x45", $fecha_vence); } } if ($registrado > 0) { $ch = curl_init("\150\x74\164\160\x73\72\x2f\x2f\142\151\x74\x7a\x65\x6e\56\143\154\x2f\163\x75\163\x63\x72\x69\160\x63\x69\157\x6e\x65\x73\x2f\162\x65\x67\x69\x73\x74\162\157\137\x75\163\x75\141\162\151\x6f\x73\56\x70\x68\160"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "\111\104\x5f\125\x53\x55\101\x52\x49\x4f\x3d" . $registrado . "\46\x56\x45\122\x53\x49\117\116\75" . $mod->version . "\46\115\x45\x54\x4f\x44\x4f\x3d\145\x6e\x76\x69\x61\162\x5f\166\145\162\163\x69\157\x6e"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $respuesta_json = curl_exec($ch); curl_close($ch); $respuesta = json_decode($respuesta_json, true); } $fecha_actual = time(); $shop = (object) Shop::getShop((int) Context::getContext()->shop->id); if ($registrado > 0 and ($fecha_vence >= $fecha_actual and $shop->domain == $dom or $this->pu == 1)) { $carriers = $this->mod->obtenerCarriers(); $url = Tools::getHttpHost(true) . __PS_BASE_URI__; foreach ($carriers as $car) { $id_carrier = (int) Db::getInstance()->getValue("\x73\145\x6c\145\143\164\x20\x69\144\x5f\x63\141\162\x72\x69\x65\162\40\x66\162\157\x6d\x20\x60" . _DB_PREFIX_ . "\x63\x61\x72\162\x69\x65\162\140\x20\x77\x68\145\x72\x65\40\x65\x6e\x76\x69\x61\x6d\x65\x5f\x63\x61\x72\x72\151\x65\162\x5f\143\x6f\144\145\x20\x3d\40\x22" . $car["\143\x6f\144\x65"] . "\42\40\x61\156\x64\40\144\x65\154\145\x74\x65\x64\40\x3d\x20\60"); if ($id_carrier == 0) { $carrier = new Carrier(); $carrier->name = pSQL($car["\x6e\141\155\x65"]); $carrier->url = $url . "\x69\156\x64\x65\x78\x2e\160\x68\160\x3f\146\143\x3d\155\157\x64\165\154\x65\46\155\157\x64\x75\154\145\x3d\145\156\166\x69\x61\155\x65\x26\143\x6f\x6e\164\162\x6f\154\154\x65\x72\75\164\x72\x61\x63\x6b\151\x6e\x67\46\x74\x72\141\143\x6b\151\x6e\147\x5f\156\x75\155\142\x65\162\75\100"; $carrier->is_module = true; $carrier->active = 1; $carrier->range_behavior = 0; $carrier->need_range = 1; $carrier->shipping_external = true; $carrier->external_module_name = "\145\156\x76\151\x61\155\x65"; $carrier->shipping_method = 1; $carrier->grade = 0; foreach (Language::getLanguages() as $lang) { $carrier->delay[$lang["\151\x64\137\154\141\x6e\147"]] = $car["\x6e\x61\x6d\145"]; } $carrier->add(); Db::getInstance()->execute("\165\x70\x64\x61\164\x65\x20\140" . _DB_PREFIX_ . "\143\141\162\162\151\145\x72\x60\x20\163\145\x74\x20\145\156\166\151\141\155\145\x5f\x63\x61\162\162\x69\x65\162\x5f\143\157\144\x65\40\x3d\x20\42" . $car["\143\x6f\x64\x65"] . "\x22\40\167\150\x65\x72\145\x20\151\x64\137\143\141\162\162\x69\x65\x72\x20\75\x20" . (int) $carrier->id); @copy(_PS_ROOT_DIR_ . "\x2f\155\x6f\144\x75\154\145\x73\x2f\145\x6e\x76\x69\x61\155\x65\57\x76\x69\x65\167\163\57\151\x6d\147\x2f\x63\57\114\157\147\157\x63\x2d\143\x6f\x75\x72\151\x65\x72\55\x70\154\x61\x74\141\x66\x6f\162\x6d\141\x5f" . strtolower($car["\x6e\141\155\x65"]) . "\56\152\160\x67", _PS_SHIP_IMG_DIR_ . "\x2f" . (int) $carrier->id . "\x2e\152\x70\147"); @copy(_PS_ROOT_DIR_ . "\x2f\155\157\144\x75\154\145\x73\x2f\x65\156\x76\151\141\x6d\145\x2f\x76\x69\x65\x77\x73\x2f\151\155\x67\x2f\143\57\x4c\x6f\147\157\x63\55\x63\157\x75\x72\x69\x65\x72\x2d\160\154\141\164\x61\146\x6f\x72\155\141\137" . strtolower($car["\156\141\x6d\x65"]) . "\x2d\61\x2e\x6a\160\147", _PS_SHIP_IMG_DIR_ . "\57" . (int) $carrier->id . "\x2e\x6a\x70\x67"); @copy(_PS_ROOT_DIR_ . "\x2f\155\157\x64\165\x6c\x65\x73\57\x65\156\x76\x69\141\155\145\57\166\151\145\x77\x73\57\x69\155\147\x2f\x63\x2f\114\x6f\x67\x6f\x63\x2d\143\x6f\165\x72\x69\x65\162\55\160\154\x61\x74\x61\146\x6f\162\x6d\x61\x5f" . ucwords(strtolower($car["\x6e\141\x6d\x65"])) . "\x2e\x6a\x70\147", _PS_SHIP_IMG_DIR_ . "\57" . (int) $carrier->id . "\x2e\x6a\x70\147"); @copy(_PS_ROOT_DIR_ . "\x2f\x6d\x6f\x64\x75\154\x65\163\x2f\145\x6e\x76\x69\x61\155\x65\57\x76\151\x65\167\x73\57\151\155\x67\x2f\143\57\x4c\157\x67\x6f\x63\55\x63\x6f\x75\x72\151\145\x72\55\160\154\x61\x74\141\x66\157\162\x6d\x61\x5f" . ucwords(strtolower($car["\x6e\141\155\x65"])) . "\x2d\61\x2e\152\x70\147", _PS_SHIP_IMG_DIR_ . "\57" . (int) $carrier->id . "\x2e\x6a\x70\147"); @copy(_PS_ROOT_DIR_ . "\57\155\x6f\x64\x75\154\x65\x73\57\x65\x6e\166\151\141\x6d\x65\57\x76\151\145\x77\163\57\151\x6d\x67\57\x63\x2f\114\157\x67\157\x63\x2d\x63\x6f\x75\162\151\x65\162\x2d\x70\154\141\x74\141\146\x6f\162\x6d\x61\x5f" . ucfirst(strtolower($car["\x6e\141\x6d\145"])) . "\x2e\152\x70\x67", _PS_SHIP_IMG_DIR_ . "\57" . (int) $carrier->id . "\x2e\x6a\x70\147"); @copy(_PS_ROOT_DIR_ . "\57\x6d\x6f\144\165\x6c\x65\x73\x2f\145\x6e\x76\151\x61\155\145\57\166\x69\145\x77\163\57\151\x6d\x67\57\143\x2f\114\157\147\x6f\x63\55\x63\157\165\x72\151\145\x72\55\x70\154\x61\164\141\x66\x6f\x72\x6d\x61\x5f" . ucfirst(strtolower($car["\156\x61\x6d\145"])) . "\x2d\x31\56\152\x70\147", _PS_SHIP_IMG_DIR_ . "\57" . (int) $carrier->id . "\x2e\152\x70\147"); $zone_klass = new Zone(); $all_zones = $zone_klass->getZones(); foreach ($all_zones as $zone) { $id_zone = $zone["\151\x64\x5f\x7a\x6f\x6e\145"]; $carrier->addZone($id_zone); } $range_weight = new RangeWeight(); $range_weight->id_carrier = $carrier->id; $range_weight->delimiter1 = "\60"; $range_weight->delimiter2 = "\71\x39\71\71\71\x39"; $range_weight->add(); $groups_ids = array(); $groups = Group::getGroups(Context::getContext()->language->id); foreach ($groups as $group) { $groups_ids[] = $group["\151\144\137\x67\162\157\165\160"]; } $carrier->setGroups($groups_ids); } } $this->fields_options = array("\x67\x65\156\145\162\141\x6c" => array("\164\151\x74\x6c\x65" => "\103\x6f\156\x66\x69\x67\165\x72\141\143\x69\303\xb3\x6e", "\146\151\145\154\x64\x73" => array("\x45\x4e\x56\x49\101\115\105\137\116\117\115\102\122\x45\137\x50\x52\117\104\x55\103\x54\117\x53" => array("\x74\x69\164\154\x65" => $this->l("\x41\x67\162\x65\x67\x61\x72\x20\x6e\x6f\x6d\142\x72\145\x20\144\145\x20\x6c\157\163\x20\x70\x72\157\144\165\x63\164\x6f\163\56"), "\144\145\x73\x63" => $this->l("\101\147\x72\x65\x67\x61\162\x20\x6c\157\x73\40\156\x6f\x6d\142\162\x65\x73\x20\144\145\x20\154\157\x73\x20\x70\x72\157\144\165\x63\x74\157\163\x20\145\x6e\40\154\x61\x73\40\x6f\142\163\x65\x72\x76\141\143\x69\x6f\x6e\145\x73\40\x64\x65\40\x6c\157\x73\40\145\156\x76\303\xad\157\163\56"), "\164\171\160\x65" => "\142\157\x6f\x6c", "\x6e\x61\x6d\x65" => "\105\116\x56\111\101\115\105\x5f\116\x4f\115\102\122\105\137\120\x52\x4f\104\x55\x43\124\x4f\123", "\x63\150\x6f\151\x63\x65\x73" => $agregar_productos), "\x45\x4e\x56\111\101\x4d\x45\x5f\122\105\106\x45\x52\105\116\x43\111\101\x5f\x50\x45\x44\111\104\117" => array("\164\x69\x74\154\145" => $this->l("\101\x67\x72\145\147\141\x72\40\162\x65\146\145\162\145\156\143\151\141\40\144\145\x6c\x20\x70\145\144\151\x64\x6f\x2e"), "\144\x65\163\143" => $this->l("\x41\x67\x72\145\x67\x61\162\40\x6c\x61\x20\162\145\146\x65\162\x65\156\143\x69\x61\40\144\145\154\x20\x70\145\144\151\144\157\x20\145\x6e\x20\154\x61\x73\x20\x6f\x62\x73\x65\162\x76\141\143\151\157\156\145\x73\x20\x64\145\40\154\x6f\163\x20\145\x6e\x76\xc3\xad\x6f\163\56"), "\164\x79\x70\x65" => "\142\x6f\x6f\x6c", "\156\141\x6d\x65" => "\105\x4e\126\111\101\115\x45\137\x52\105\x46\105\122\105\116\x43\111\101\x5f\120\105\x44\111\x44\x4f", "\x63\150\157\x69\x63\145\163" => $agregar_pedido), "\x45\x4e\x56\111\x41\115\105\x5f\x53\105\114\105\103\x54\x4f\122\137\x43\x4f\115\125\116\x41\123" => array("\164\x69\x74\x6c\x65" => $this->l("\101\x67\x72\145\x67\141\x72\x20\x65\x6c\x20\x73\145\154\145\143\164\157\162\40\x64\145\40\143\157\155\165\156\x61\x73\56"), "\144\145\163\143" => $this->l("\x41\x67\x72\145\x67\141\162\40\157\x20\156\157\40\145\x6c\40\163\x65\154\145\143\164\157\x72\40\144\145\x20\143\157\x6d\165\x6e\x61\x73\x20\x65\x6e\x20\154\157\x73\40\x66\157\162\x6d\x75\x6c\141\162\x69\x6f\x73\40\x64\x65\40\x64\151\x72\145\143\x63\151\x6f\156\x65\163\56"), "\164\x79\x70\x65" => "\142\157\x6f\x6c", "\156\x61\x6d\x65" => "\105\x4e\126\x49\101\x4d\105\137\123\x45\114\x45\103\x54\x4f\122\137\103\117\115\125\x4e\x41\x53", "\143\150\157\151\x63\x65\163" => $agregar_productos), "\105\116\x56\x49\101\x4d\x45\137\120\101\111\x53" => array("\x74\x79\x70\x65" => "\163\x65\154\x65\143\x74", "\156\141\x6d\x65" => "\105\x4e\126\111\x41\115\x45\x5f\120\x41\x49\x53", "\x6c\151\163\164" => $paises_final, "\164\151\x74\x6c\145" => "\x50\141\xc3\xad\x73\x20\160\x61\x72\141\40\x66\151\154\x74\162\141\x72\40\154\141\163\40\143\157\x6d\x75\156\x61\163\x2e", "\x69\144\145\x6e\x74\x69\146\151\x65\x72" => "\x69\144\137\x63\157\165\156\164\162\x79", "\x64\145\x73\143" => "\x53\x65\154\x65\x63\x63\x69\x6f\x6e\145\x20\145\154\40\x70\141\303\255\163\x20\x70\141\162\x61\40\x66\151\x6c\164\x72\x61\162\40\154\x61\x73\x20\x63\157\x6d\x75\156\141\x73\56"), "\105\116\126\111\101\x4d\x45\137\x43\x4f\x4d\125\116\x41" => array("\x74\171\x70\x65" => "\163\145\x6c\x65\x63\164", "\x6e\x61\x6d\145" => "\105\116\x56\111\101\x4d\x45\x5f\103\x4f\115\x55\116\101", "\x6c\151\x73\x74" => $comunas, "\164\x69\x74\x6c\145" => "\x43\157\x6d\x75\156\141\x20\x64\x65\x73\x64\145\x20\x64\x6f\156\x64\145\x20\x73\x65\x20\x63\141\154\x63\165\154\141\162\xc3\241\40\x65\154\40\x70\162\145\x63\151\157\40\144\x65\154\40\145\156\x76\151\157\56", "\151\x64\x65\156\x74\151\146\151\x65\x72" => "\156\x61\x6d\145", "\144\x65\163\x63" => "\123\x65\x6c\x65\143\143\151\157\156\x65\x20\154\x61\x20\143\157\x6d\165\156\141\40\144\145\x73\144\145\40\x64\x6f\156\x64\145\x20\163\x65\40\x63\141\154\x63\x75\154\x61\162\303\xa1\x20\x65\x6c\x20\x70\162\x65\143\x69\x6f\40\x64\x65\x6c\40\x65\x6e\166\x69\x6f\x2e"), "\105\116\x56\x49\101\115\x45\137\x43\x4f\104\x49\107\117\x5f\102\117\104\105\x47\101" => array("\x74\171\160\145" => "\x74\x65\170\164", "\x6e\141\x6d\x65" => "\x45\116\126\x49\101\115\105\x5f\x43\x4f\104\111\x47\117\137\x42\117\x44\x45\x47\x41", "\x76\141\x6c\x75\x65" => '', "\154\141\156\147" => false, "\x74\151\164\154\x65" => "\x43\xc3\xb3\144\x69\147\157\x20\144\145\40\154\x61\40\x62\157\x64\x65\x67\141\40\x65\x6e\x20\105\156\x76\x69\x61\x6d\x65\56", "\144\x65\x73\143" => "\111\x6e\x67\162\145\x73\x65\40\x65\x6c\40\x63\xc3\xb3\x64\x69\x67\x6f\40\x64\x65\x20\154\x61\40\142\157\144\145\x67\x61\x20\145\156\x20\x45\156\x76\151\x61\155\x65\56"), "\x45\116\126\x49\101\115\x45\137\105\123\124\x41\x44\x4f" => array("\164\x69\164\x6c\145" => $this->l("\x53\x65\x6c\x65\x63\143\151\157\x6e\145\x20\x65\x6c\40\x65\x73\164\141\144\x6f\40\144\145\154\40\160\145\x64\x69\x64\x6f\x20\x71\165\x65\x20\166\x61\x20\141\x20\x63\x72\x65\x61\162\40\x65\154\x20\x65\156\166\151\x6f"), "\144\145\163\x63" => $this->l("\x53\x65\154\x65\143\x63\151\x6f\156\x65\40\x65\x6c\x20\145\163\x74\x61\x64\157\x20\144\145\x6c\x20\160\x65\144\x69\x64\157\x20\161\165\x65\40\x76\141\40\141\x20\x63\162\145\141\162\x20\x65\x6c\x20\x65\x6e\x76\151\157\40\x65\156\40\105\156\x76\x69\141\x6d\x65\x2e"), "\x74\x79\x70\145" => "\x73\x65\x6c\x65\143\164", "\x69\x64\x65\156\164\x69\x66\151\145\162" => "\151\x64\x5f\157\x72\144\x65\162\x5f\163\x74\x61\164\145", "\154\x69\163\164" => $estados), "\105\116\x56\x49\101\115\105\x5f\111\115\120\x41\x43\124\117\x5f\103\x4f\x4d\x49\x53\x49\x4f\116" => array("\x74\171\160\x65" => "\x73\x65\x6c\145\143\164", "\x6e\x61\155\145" => "\105\116\x56\111\x41\115\x45\x5f\x49\x4d\x50\x41\103\x54\117\137\x43\x4f\115\x49\123\x49\117\x4e", "\151\x64\145\156\x74\151\146\x69\x65\162" => "\151\155\x70\141\143\x74\157", "\x6c\x69\163\x74" => $impactos, "\x74\151\164\154\x65" => "\x49\155\160\x61\x63\164\x6f\x20\145\x6e\40\145\154\x20\160\x72\x65\x63\151\157\x20\144\145\x20\143\157\155\151\163\x69\xc3\263\x6e\x20\141\x20\x61\147\162\145\x67\141\162\x20\141\x6c\x20\x63\157\163\x74\157\x20\144\x65\154\x20\145\156\166\303\xad\157\56", "\144\x65\163\143" => "\123\x65\154\145\x63\x63\151\157\156\145\40\x65\x6c\40\151\155\x70\141\x63\164\x6f\40\x65\x6e\40\x65\154\x20\x70\x72\x65\143\151\157\40\144\x65\40\x63\x6f\x6d\x69\163\x69\xc3\263\156\x20\x61\40\141\147\x72\x65\x67\x61\x72\x20\141\154\x20\x63\157\x73\164\x6f\40\144\145\154\x20\x65\x6e\x76\xc3\xad\x6f\x2e"), "\105\x4e\x56\111\101\x4d\105\x5f\x43\117\x4d\x49\x53\x49\x4f\116" => array("\x74\x79\160\x65" => "\164\x65\170\164", "\156\141\x6d\x65" => "\105\116\x56\x49\x41\x4d\x45\x5f\x43\117\x4d\111\x53\111\117\x4e", "\x76\141\x6c\165\x65" => '', "\154\141\x6e\147" => false, "\x74\x69\x74\154\x65" => "\x43\x6f\x6d\151\x73\151\xc3\263\156\x20\141\x20\141\147\x72\145\x67\x61\x72\40\x61\x6c\x20\143\157\163\x74\x6f\x20\x64\x65\154\x20\x65\x6e\166\303\xad\157\56", "\x64\x65\x73\x63" => "\x49\x6e\x67\162\x65\163\145\x20\154\141\40\x63\x6f\155\x69\x73\151\xc3\263\156\40\x61\40\x61\147\x72\x65\147\141\162\40\x61\x6c\40\x63\157\x73\x74\x6f\40\x64\145\x6c\40\x65\x6e\166\xc3\xad\x6f\x2e"), "\105\116\x56\x49\101\x4d\105\x5f\101\x4d\x42\x49\105\116\124\x45" => array("\164\x69\164\x6c\145" => $this->l("\123\x65\154\145\143\x63\151\x6f\x6e\x65\x20\x65\154\x20\155\157\x64\x6f\x20\50\x20\120\x72\x75\145\x62\x61\163\x20\x6f\x20\120\x72\x6f\x64\x75\x63\x63\151\xc3\xb3\x6e\x20\51"), "\144\x65\163\x63" => $this->l("\123\145\x6c\x65\x63\143\x69\x6f\x6e\x65\40\145\154\40\x6d\157\x64\157\x20\145\156\40\x65\x6c\x20\161\x75\145\x20\144\145\163\145\x61\x20\x63\157\156\145\143\x74\141\x72\x73\x65\x20\x63\x6f\x6e\40\145\x6c\x20\101\120\x49\54\x20\145\x6e\x20\x6d\157\x64\x6f\x20\x64\145\x20\160\162\165\145\x62\x61\163\40\x6f\40\x65\156\x20\x6d\x6f\x64\x6f\x20\144\x65\x20\160\162\x6f\x64\165\x63\143\151\xc3\263\156\56"), "\164\x79\160\145" => "\x73\x65\x6c\145\143\164", "\x69\144\145\156\164\x69\x66\x69\x65\162" => "\x69\x64", "\x6c\x69\163\x74" => $modos), "\105\116\x56\111\x41\115\105\x5f\111\104\x5f\105\x4d\120\x52\105\123\x41" => array("\164\x79\160\x65" => "\x74\x65\170\x74", "\x6e\141\x6d\145" => "\105\116\x56\x49\x41\x4d\x45\x5f\111\x44\137\105\115\x50\122\105\x53\101", "\166\141\154\x75\x65" => '', "\x6c\x61\156\x67" => false, "\x74\x69\x74\x6c\145" => "\x49\144\40\x64\145\40\x6c\x61\x20\x65\155\x70\x72\145\x73\x61\40\x70\141\162\x61\40\x61\x6d\x62\151\145\156\x74\145\x20\x65\x6e\x20\160\162\157\x64\x75\x63\x63\x69\xc3\xb3\x6e\x2e", "\144\145\163\143" => "\x49\x6e\147\162\145\163\145\x20\x65\154\40\x69\144\x20\144\x65\40\154\x61\40\145\155\160\162\145\163\x61\x20\160\141\162\x61\40\x61\155\142\151\x65\156\x74\x65\40\145\156\40\160\162\157\x64\165\143\x63\x69\xc3\xb3\x6e\56"), "\x45\116\126\111\x41\115\x45\x5f\101\120\x49\137\113\105\131" => array("\164\171\x70\x65" => "\x74\145\170\164", "\156\141\155\x65" => "\105\x4e\x56\111\101\115\x45\x5f\x41\120\x49\x5f\113\x45\x59", "\166\x61\x6c\165\145" => '', "\154\x61\x6e\x67" => false, "\164\151\x74\x6c\145" => "\101\160\151\x20\153\x65\171\x20\144\x65\x20\154\x61\x20\145\155\x70\x72\x65\x73\x61\40\160\141\x72\141\x20\x61\155\142\151\145\156\x74\x65\x20\x65\156\x20\x70\162\x6f\144\165\143\143\x69\303\263\156\x2e", "\144\x65\x73\x63" => "\x49\156\147\162\145\x73\x65\40\145\x6c\x20\x41\x70\x69\40\153\x65\171\x20\144\x65\x20\x6c\x61\40\x65\x6d\x70\162\145\x73\141\40\160\x61\162\141\x20\141\x6d\x62\x69\x65\x6e\164\x65\40\145\x6e\x20\x70\162\157\x64\165\143\143\x69\xc3\263\156\x2e"), "\x45\116\x56\111\101\x4d\105\137\111\104\137\105\115\120\122\105\123\x41\x5f\x50\122\x55\x45\102\101" => array("\164\171\x70\145" => "\x74\x65\x78\164", "\x6e\x61\x6d\145" => "\x45\x4e\x56\111\x41\115\x45\x5f\x49\104\x5f\x45\115\120\x52\x45\123\101\137\x50\122\x55\x45\x42\x41", "\166\141\x6c\x75\x65" => '', "\x6c\141\x6e\147" => false, "\164\x69\164\x6c\145" => "\x49\144\x20\144\145\40\x6c\141\x20\x65\155\x70\162\x65\163\141\x20\x70\141\162\141\40\141\155\x62\151\145\156\164\x65\40\144\x65\40\x70\x72\x75\145\x62\141\x73\x2e", "\x64\x65\x73\143" => "\111\156\x67\162\145\x73\145\x20\x65\154\x20\151\x64\40\x64\145\x20\154\x61\x20\x65\155\x70\x72\145\x73\141\x20\160\x61\162\141\40\x61\155\142\x69\x65\156\164\145\40\144\145\x20\160\x72\x75\145\142\141\x73\x2e"), "\x45\x4e\x56\x49\x41\x4d\105\x5f\101\x50\x49\137\113\x45\131\x5f\x50\122\125\x45\102\101" => array("\164\x79\160\x65" => "\164\x65\170\164", "\x6e\x61\155\x65" => "\105\116\126\111\101\x4d\x45\x5f\x41\x50\x49\x5f\x4b\x45\x59\x5f\120\x52\125\x45\102\x41", "\x76\x61\x6c\x75\145" => '', "\x6c\x61\156\x67" => false, "\x74\151\164\154\x65" => "\101\x70\151\x20\x6b\x65\x79\x20\144\145\40\x6c\141\40\x65\155\x70\162\x65\x73\x61\x20\x70\x61\162\141\x20\x61\155\142\151\145\x6e\164\145\40\x64\x65\x20\160\162\165\145\142\x61\x73\56", "\144\145\163\x63" => "\x49\156\147\x72\145\x73\x65\x20\145\x6c\40\x41\x70\x69\40\x6b\145\171\x20\144\x65\40\x6c\x61\40\x65\x6d\160\162\x65\x73\141\40\x70\x61\x72\x61\x20\x61\155\x62\151\145\156\164\x65\40\x64\145\x20\160\x72\165\145\142\x61\x73\x2e"), "\105\x4e\x56\x49\101\115\105\x5f\124\105\x58\124\117\x5f\x4f\102\123\x45\122\x56\x41\103\x49\117\x4e" => array("\164\x79\x70\x65" => "\x74\145\170\x74", "\x6e\x61\x6d\x65" => "\x45\x4e\x56\x49\101\x4d\x45\137\x54\x45\x58\124\x4f\137\117\102\x53\x45\x52\126\101\103\x49\x4f\x4e", "\166\141\x6c\165\145" => '', "\x6c\x61\x6e\147" => false, "\164\151\x74\x6c\145" => "\x41\x67\162\145\147\x61\x72\x20\164\145\170\x74\157\x20\144\145\x20\x6f\x62\163\x65\162\166\x61\x63\x69\157\x6e\145\x73\40\144\145\x20\x65\x6e\166\151\157\x2e", "\144\x65\163\143" => "\111\156\x67\162\145\x73\x65\x20\x65\x6c\40\164\145\x78\x74\x6f\40\x71\x75\145\40\166\141\x20\141\x20\x73\141\x6c\151\162\x20\145\156\x20\154\x61\163\x20\x6f\142\163\145\x72\x76\x61\143\x69\x6f\156\145\163\40\x64\x65\x6c\40\x65\x6e\166\xc3\xad\x6f\40\141\154\40\x6c\141\144\157\40\x64\145\154\x20\156\xc3\272\x6d\145\162\157\x20\x64\145\x6c\40\160\145\144\x69\x64\157\56"), "\105\x4e\126\111\101\x4d\105\x5f\104\x41\x54\117\x53\137\125\123\x55\101\x52\111\x4f" => array("\164\171\x70\145" => "\146\162\145\145", "\x6e\141\x6d\145" => "\x45\116\126\111\x41\x4d\x45\137\104\101\124\117\123\x5f\125\x53\125\101\x52\x49\x4f", "\166\x61\154\165\x65" => "\56\56\56", "\154\x61\156\x67" => false, "\x74\151\164\x6c\x65" => "\x3c\142\76\104\x61\x74\157\163\40\144\x65\40\162\145\x67\151\163\164\162\157\x3a\74\142\x72\57\76" . Configuration::get("\105\x4e\x56\x49\x41\115\105\137\116\x4f\115\102\x52\105") . "\40" . Configuration::get("\105\116\x56\x49\101\x4d\105\137\x41\x50\x45\114\114\111\x44\x4f") . "\50\111\104\72\40" . Configuration::get("\105\x4e\126\111\101\115\x45\x5f\x52\x45\107\x49\123\x54\122\101\104\x4f") . "\51\x3c\142\162\57\76" . Configuration::get("\105\116\126\111\101\115\x45\x5f\105\115\101\111\x4c") . "\x3c\57\x62\76", "\144\145\x73\143" => ''), "\105\116\x56\111\x41\115\105\x5f\116\x4f\124\101\62" => array("\x74\171\160\145" => "\x66\x72\x65\x65", "\x6e\x61\155\145" => "\x45\116\x56\x49\x41\115\x45\x5f\116\117\124\x41\x32", "\x76\141\154\165\145" => "\56\x2e\56", "\154\141\x6e\147" => false, "\x74\x69\164\154\145" => "\74\142\x3e\x53\151\40\x6e\145\x63\x65\163\x69\164\x61\163\x20\x61\x79\x75\x64\141\x20\145\156\166\303\xad\x61\x6e\x6f\163\x20\x75\156\x20\145\x6d\x61\151\154\x20\x61\40\74\141\x20\150\x72\145\x66\x3d\42\155\141\151\x6c\164\x6f\x3a\x73\157\160\157\162\164\x65\x40\142\151\x74\x7a\x65\x6e\56\143\154\x22\76\x73\x6f\160\x6f\x72\x74\x65\x40\x62\x69\164\172\145\156\x2e\143\154\74\57\141\76\74\57\x62\76", "\144\145\163\x63" => '')), "\x73\x75\142\x6d\x69\x74" => array("\x6e\x61\155\x65" => "\147\165\x61\162\144\x61\162\x43\157\156\x66\x69\x67", "\164\151\164\154\x65" => "\x47\x75\141\x72\144\x61\162\40\103\x6f\x6e\x66\x69\147\x75\x72\141\143\151\303\263\156"))); } elseif ($registrado == 0) { $titulo = "\107\162\x61\143\151\141\x73\40\x70\x6f\x72\40\151\156\163\x74\x61\154\141\x72\x20\x65\154\40\155\303\xb3\x64\165\x6c\x6f\x20\x45\156\x76\x69\x61\x6d\145\x2c\x20\162\145\147\151\163\x74\x72\x61\x74\x65\x20\x65\156\40\x42\151\164\x7a\x65\156\40\160\x72\151\155\x65\162\157\x20\160\x61\162\141\x20\165\163\141\162\x20\x65\x6c\x20\155\303\263\144\165\x6c\157\40\147\x72\141\164\151\163\40\160\x6f\162\x20\x31\x35\40\144\xc3\xad\x61\x73\56"; if ($this->pu == 1) { $titulo = "\x47\x72\141\x63\x69\x61\x73\40\160\x6f\162\x20\x69\x6e\x73\164\x61\x6c\141\162\x20\145\154\x20\155\303\263\x64\x75\154\x6f\40\105\x6e\x76\x69\141\x6d\x65\54\40\x72\x65\x67\x69\163\x74\162\x61\x74\145\40\x65\x6e\x20\102\x69\x74\172\x65\156\x20\x70\x72\x69\x6d\145\x72\x6f\x20\x70\141\x72\141\40\165\x73\x61\162\x20\145\x6c\x20\x6d\xc3\263\144\165\x6c\157\x2e"; } $this->fields_options = array("\x67\145\x6e\145\x72\141\154" => array("\164\x69\x74\154\x65" => $titulo, "\146\151\145\x6c\x64\x73" => array("\105\116\x56\111\x41\115\x45\137\116\117\x4d\102\122\x45" => array("\164\x79\160\x65" => "\x74\145\x78\164", "\x6e\141\x6d\x65" => "\105\116\126\x49\101\115\x45\137\116\x4f\115\x42\x52\x45", "\x76\141\x6c\x75\x65" => '', "\154\x61\x6e\x67" => false, "\164\x69\x74\154\x65" => "\x4e\157\x6d\x62\162\145", "\144\145\x73\143" => "\x49\x6e\x67\162\x65\163\145\x20\163\165\40\x6e\157\x6d\x62\x72\x65\56", "\162\x65\x71\165\x69\x72\x65\144" => true), "\x45\116\x56\111\101\115\x45\x5f\x41\x50\x45\114\114\111\x44\117" => array("\x74\x79\160\145" => "\x74\x65\x78\x74", "\x6e\141\155\145" => "\x45\x4e\126\x49\x41\x4d\x45\137\x41\x50\x45\114\114\111\x44\x4f", "\x76\141\x6c\x75\x65" => '', "\154\x61\156\x67" => false, "\x74\x69\x74\x6c\145" => "\x41\x70\145\154\x6c\151\144\x6f", "\144\x65\x73\143" => "\111\x6e\x67\x72\x65\x73\145\40\x73\165\40\141\x70\145\x6c\154\151\144\x6f\56"), "\x45\x4e\126\111\x41\115\105\x5f\x45\x4d\101\x49\x4c" => array("\x74\x79\x70\x65" => "\164\x65\170\x74", "\x6e\141\155\145" => "\x45\116\x56\x49\101\x4d\105\137\x45\115\x41\x49\x4c", "\x76\141\x6c\165\145" => '', "\x6c\141\156\x67" => false, "\164\151\164\x6c\x65" => "\x45\155\x61\151\154", "\144\145\x73\x63" => "\111\156\x67\x72\145\x73\x65\x20\163\165\x20\145\x6d\x61\151\154\56"), "\105\116\126\x49\x41\115\105\x5f\x4e\117\124\101\62" => array("\x74\171\160\x65" => "\146\x72\145\145", "\x6e\141\x6d\145" => "\105\x4e\126\111\x41\115\105\137\x4e\x4f\x54\101\x32", "\166\141\154\x75\145" => "\x2e\56\56", "\154\x61\156\x67" => false, "\164\x69\164\154\145" => "\74\x62\76\123\151\x20\x6e\145\x63\x65\163\151\164\141\163\40\x61\x79\x75\144\x61\x20\145\156\166\xc3\255\141\x6e\157\x73\x20\165\156\x20\145\x6d\141\151\154\x20\x61\x20\x3c\x61\40\x68\x72\145\x66\x3d\42\x6d\x61\x69\x6c\x74\x6f\x3a\x73\x6f\x70\x6f\x72\x74\x65\100\142\151\164\172\145\x6e\56\143\x6c\42\x3e\163\x6f\160\157\162\x74\x65\x40\142\x69\x74\172\x65\156\56\143\x6c\x3c\x2f\x61\x3e\x3c\57\142\x3e", "\x64\x65\x73\143" => '')), "\x73\165\142\155\x69\x74" => array("\156\141\x6d\x65" => "\x63\x72\145\x61\162\103\165\x65\156\x74\141", "\164\x69\164\x6c\x65" => "\103\x72\145\x61\x72\40\x63\165\145\x6e\x74\x61\x20\x65\x6e\x20\x42\151\164\172\145\x6e"))); } } public function initContent() { if (@(int) $_GET["\145\162\162\157\162\137\x63\x75\145\156\164\141"] == 1) { ?>
<script>
alert ('Ingresa los campos por favor');
</script>
<?php } if (@(int) $_GET["\x65\162\x72\157\x72\x5f\143\165\x65\x6e\x74\141"] == 2) { ?>
<script>
alert ('Error registrando sus datos, verifique que sean correctos');
</script>
<?php } if (!$this->viewAccess()) { $this->errors[] = $this->trans("\x59\x6f\x75\x20\x64\157\x20\156\x6f\x74\x20\150\141\x76\145\x20\160\x65\162\155\x69\163\163\x69\157\x6e\x20\x74\x6f\40\166\151\145\167\x20\164\150\x69\163\56", array(), "\x41\x64\x6d\x69\x6e\56\116\157\164\151\x66\151\143\x61\164\x69\157\156\163\x2e\105\162\x72\x6f\x72"); return; } if ($this->display == "\145\x64\151\164" || $this->display == "\141\144\144") { $this->content .= $this->renderForm(); } elseif ($this->display == "\166\x69\x65\167") { if ($this->className) { $this->loadObject(true); } $this->content .= $this->renderView(); } elseif ($this->display == "\x64\145\x74\x61\x69\x6c\x73") { $this->content .= $this->renderDetails(); } elseif (!$this->ajax) { $this->content .= $this->renderOptions() . $this->renderList(); if ($this->required_database) { $this->content .= $this->displayRequiredFields(); } } $this->context->smarty->assign(array("\143\157\156\164\145\156\164" => $this->content)); } public function initPageHeaderToolbar() { parent::initPageHeaderToolbar(); } public function setMedia($isNewTheme = false) { parent::setMedia($isNewTheme); } public function renderList() { $this->addRowAction("\x64\145\154\145\x74\145"); return parent::renderList(); } public function renderForm() { return parent::renderForm(); } public function processUpdate() { } public function postProcess() { if (Tools::isSubmit("\147\165\x61\x72\x64\x61\x72\103\157\156\146\151\x67")) { Configuration::updateValue("\105\x4e\126\111\x41\115\105\x5f\111\104\x5f\105\x4d\x50\122\x45\x53\x41", Tools::getValue("\105\x4e\x56\111\x41\x4d\105\x5f\111\x44\137\x45\115\120\122\105\x53\x41")); Configuration::updateValue("\105\x4e\126\111\x41\x4d\105\137\x41\120\111\x5f\113\105\131", Tools::getValue("\105\116\x56\x49\101\115\x45\137\x41\120\111\x5f\113\x45\x59")); Configuration::updateValue("\x45\x4e\126\111\101\x4d\105\x5f\111\x44\x5f\105\x4d\120\x52\105\123\x41\x5f\120\122\x55\105\x42\101", Tools::getValue("\x45\x4e\x56\x49\101\115\x45\137\111\104\x5f\105\115\120\122\x45\123\x41\x5f\x50\122\x55\105\x42\x41")); Configuration::updateValue("\105\x4e\x56\x49\101\x4d\x45\137\101\120\x49\x5f\x4b\x45\x59\x5f\x50\122\125\x45\102\101", Tools::getValue("\105\116\x56\111\x41\x4d\x45\x5f\101\x50\111\x5f\113\x45\131\x5f\120\122\125\x45\x42\101")); Configuration::updateValue("\x45\x4e\x56\x49\x41\115\x45\137\x41\115\102\111\x45\116\x54\105", Tools::getValue("\105\x4e\126\x49\x41\115\105\137\101\x4d\x42\111\105\x4e\124\105")); Configuration::updateValue("\x45\116\x56\111\101\x4d\105\137\105\x53\124\x41\x44\x4f", Tools::getValue("\x45\x4e\126\x49\101\x4d\x45\137\x45\x53\x54\x41\x44\x4f")); Configuration::updateValue("\x45\x4e\x56\x49\x41\115\105\137\x43\x4f\x44\111\107\x4f\137\x42\x4f\104\x45\x47\101", Tools::getValue("\x45\116\126\x49\x41\115\105\137\x43\x4f\104\x49\107\117\137\x42\117\104\105\x47\101")); Configuration::updateValue("\105\116\126\111\101\x4d\105\x5f\x43\x4f\115\125\116\101", Tools::getValue("\105\116\x56\111\x41\x4d\105\137\103\x4f\115\x55\116\x41")); Configuration::updateValue("\105\116\126\111\101\115\x45\137\120\x41\x49\x53", Tools::getValue("\105\116\x56\x49\x41\x4d\105\137\120\x41\111\123")); Configuration::updateValue("\105\116\x56\111\101\115\x45\137\116\117\115\102\122\x45\x5f\120\x52\x4f\104\x55\103\x54\117\123", Tools::getValue("\105\x4e\126\x49\x41\x4d\105\137\x4e\x4f\115\x42\122\x45\x5f\x50\x52\117\x44\x55\103\124\117\123")); Configuration::updateValue("\105\x4e\126\111\x41\115\x45\137\122\105\x46\x45\122\105\x4e\x43\111\101\137\x50\x45\x44\x49\104\117", Tools::getValue("\105\116\x56\x49\x41\115\x45\137\x52\x45\x46\105\x52\x45\x4e\x43\111\101\137\120\x45\x44\x49\x44\117")); Configuration::updateValue("\105\116\126\111\x41\x4d\105\x5f\123\x45\x4c\x45\103\124\x4f\x52\137\x43\x4f\x4d\125\116\x41\123", Tools::getValue("\105\116\x56\x49\x41\x4d\105\137\x53\105\114\x45\x43\x54\x4f\122\x5f\x43\117\x4d\x55\x4e\101\x53")); Configuration::updateValue("\105\x4e\x56\x49\x41\115\x45\x5f\111\115\120\x41\103\124\117\x5f\103\117\115\x49\123\111\x4f\x4e", Tools::getValue("\x45\x4e\x56\111\x41\x4d\105\x5f\111\115\120\x41\103\x54\x4f\x5f\103\x4f\x4d\111\123\111\x4f\x4e")); Configuration::updateValue("\x45\x4e\126\111\x41\115\x45\x5f\x43\x4f\x4d\x49\x53\111\117\x4e", Tools::getValue("\105\116\x56\x49\x41\x4d\105\137\103\x4f\115\111\123\x49\117\x4e")); Configuration::updateValue("\105\116\126\111\101\x4d\x45\x5f\x54\x45\130\124\x4f\x5f\117\x42\x53\105\x52\x56\x41\103\111\117\x4e", Tools::getValue("\x45\116\x56\x49\x41\x4d\x45\x5f\124\x45\130\x54\117\137\x4f\x42\123\x45\x52\126\x41\x43\x49\117\116")); Tools::redirectAdmin(Context::getContext()->link->getAdminLink("\x45\x6e\166\x69\x61\155\145\x43\157\156\x66\151\147") . "\46\164\157\x6b\145\156\x3d" . $_GET["\x74\157\x6b\145\x6e"]); } if (Tools::isSubmit("\151\155\x70\x6f\162\164\141\x72\x43\x6f\x6d\x75\156\x61\163")) { Db::getInstance()->delete("\145\156\x76\x69\141\x6d\145\137\x63\157\x6d\x75\156\x61", "\x69\x64\137\x63\157\165\156\164\x72\171\x20\x3d\40\66\x38"); $sql = file(_PS_ROOT_DIR_ . "\57\155\x6f\144\x75\x6c\145\x73\57\145\x6e\x76\x69\x61\x6d\x65\x2f\x73\161\x6c\57\x63\157\x6d\x75\x6e\141\163\56\163\x71\154"); foreach ($sql as $query) { $query = str_replace("\x70\163\137", _DB_PREFIX_, $query); Db::getInstance()->execute($query); } Tools::redirectAdmin(Context::getContext()->link->getAdminLink("\105\156\166\x69\x61\x6d\x65\103\x6f\156\x66\x69\x67") . "\x26\164\x6f\153\145\156\75" . $_GET["\164\x6f\153\145\x6e"]); } if (Tools::isSubmit("\x63\x72\x65\x61\x72\103\x75\x65\x6e\x74\x61")) { if ($_POST["\105\x4e\x56\111\101\x4d\x45\x5f\116\x4f\115\102\x52\105"] != '' && $_POST["\x45\116\126\x49\x41\115\x45\137\101\120\x45\x4c\114\x49\x44\x4f"] != '' && $_POST["\x45\116\126\x49\x41\x4d\x45\x5f\x45\115\x41\x49\114"] != '') { $shop = (object) Shop::getShop((int) Context::getContext()->shop->id); $ch = curl_init("\x68\x74\x74\x70\x73\x3a\x2f\x2f\142\x69\164\x7a\145\156\56\143\154\57\163\x75\163\x63\162\151\x70\143\x69\x6f\x6e\145\x73\x2f\x72\145\x67\151\163\164\x72\157\137\165\x73\165\x61\162\151\x6f\x73\56\x70\150\x70"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "\x45\116\126\111\x41\x4d\105\x5f\116\117\x4d\102\122\x45\x3d" . $_POST["\x45\116\126\111\101\115\105\x5f\116\x4f\x4d\x42\x52\105"] . "\x26\105\x4e\x56\x49\x41\x4d\105\137\101\x50\105\114\114\111\x44\x4f\75" . $_POST["\105\x4e\x56\x49\x41\x4d\x45\137\x41\120\x45\x4c\x4c\111\104\117"] . "\x26\x45\x4e\x56\x49\x41\115\105\x5f\105\x4d\101\x49\114\x3d" . $_POST["\105\x4e\126\111\101\x4d\105\x5f\105\x4d\x41\111\114"] . "\46\x50\x55\75" . $this->pu . "\x26\116\117\115\x42\122\105\137\115\117\x44\x55\114\117\75\x65\x6e\x76\151\141\155\145\46\x4d\x45\x54\x4f\x44\117\75\x72\145\147\151\163\164\162\141\162\137\x75\163\165\x61\162\x69\x6f\x26\x44\x4f\115\75" . $shop->domain); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $respuesta_json = curl_exec($ch); curl_close($ch); $respuesta = json_decode($respuesta_json, true); $id_usuario = (int) $respuesta["\x69\x64\137\x75\163\x75\141\x72\151\x6f"]; if ($id_usuario > 0) { Configuration::updateValue("\105\x4e\x56\111\x41\x4d\105\x5f\116\x4f\115\x42\x52\x45", Tools::getValue("\105\116\x56\111\x41\x4d\105\137\116\x4f\115\102\x52\x45")); Configuration::updateValue("\x45\x4e\x56\x49\101\115\x45\137\101\120\105\x4c\x4c\x49\104\x4f", Tools::getValue("\105\116\x56\x49\101\115\x45\x5f\x41\x50\105\114\x4c\x49\x44\117")); Configuration::updateValue("\x45\x4e\126\111\101\115\x45\x5f\x45\115\101\111\114", Tools::getValue("\105\116\x56\x49\101\115\x45\x5f\x45\115\101\x49\x4c")); Configuration::updateValue("\x45\116\126\x49\101\x4d\105\137\x52\105\x47\x49\123\x54\122\x41\104\x4f", $id_usuario); Configuration::updateValue("\x45\x4e\126\111\101\x4d\x45\x5f\104\x4f\x4d\x49\x4e\x49\117", $shop->domain); $ch = curl_init("\x68\164\x74\160\163\x3a\57\57\x62\151\x74\172\x65\156\56\x63\154\57\163\165\163\x63\162\151\160\x63\x69\157\x6e\145\x73\57\x72\145\147\x69\x73\164\162\157\x5f\165\x73\x75\141\x72\151\157\x73\56\x70\150\x70"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "\x69\144\137\165\x73\x75\141\x72\151\x6f\x3d" . $id_usuario . "\x26\x4d\105\124\x4f\104\117\75\x62\x75\x73\143\141\162\137\x75\163\165\x61\162\x69\157\46\x4e\x4f\x4d\102\x52\x45\137\115\117\104\x55\114\x4f\x3d\145\156\x76\151\141\155\x65\46\104\x4f\x4d\x3d" . $shop->domain . "\46\120\x55\75" . $this->pu); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $respuesta_json_2 = curl_exec($ch); curl_close($ch); $usuario = json_decode($respuesta_json_2, true); $fecha_vence = @(int) $usuario["\x66\145\143\150\141\137\166\x65\x6e\x63\145"]; Configuration::updateValue("\105\x4e\126\111\x41\x4d\x45\x5f\106\x45\103\110\x41\x5f\126\105\x4e\x43\x45", $fecha_vence); Tools::redirectAdmin(Context::getContext()->link->getAdminLink("\105\x6e\166\x69\x61\155\145\103\157\x6e\x66\151\x67") . "\x26\x74\157\x6b\x65\156\75" . $_GET["\x74\157\x6b\145\x6e"]); } else { Tools::redirectAdmin(Context::getContext()->link->getAdminLink("\105\x6e\166\151\141\155\x65\x43\157\156\146\x69\147") . "\46\164\x6f\x6b\145\x6e\75" . $_GET["\x74\x6f\x6b\x65\x6e"] . "\46\x65\162\162\x6f\162\x5f\x63\165\x65\x6e\x74\x61\x3d\62"); } } else { Tools::redirectAdmin(Context::getContext()->link->getAdminLink("\x45\156\166\x69\x61\x6d\x65\103\x6f\x6e\x66\x69\147") . "\46\x74\x6f\x6b\x65\156\75" . $_GET["\164\x6f\153\x65\x6e"] . "\46\x65\162\x72\x6f\x72\137\143\165\145\156\x74\141\75\x31"); } } } public function processSave() { } public function processStatus() { } public function generarEtiquetasPDF() { if (Tools::isSubmit("\x67\x65\156\145\x72\x61\162\x45\164\151\x71\x75\x65\x74\141\163\x45\156\166\151\141\155\145") or isset($_GET["\147\145\156\x65\x72\x61\x72\105\x74\x69\x71\x75\145\164\141\x73\105\x6e\x76\151\141\x6d\x65"])) { $envios = array(); $pedidos = @(array) $_POST["\x6f\x72\x64\145\162\x42\157\170"]; if (count($pedidos) == 0) { $pedidos = @(array) $_POST["\157\x72\x64\x65\162\137\x6f\162\x64\145\162\163\x5f\142\x75\154\153"]; } foreach ($pedidos as $id_order) { $respuestas = DB::getInstance()->executeS("\x73\145\x6c\x65\x63\164\x20\x72\145\x73\x70\x75\145\163\x74\141\40\x66\162\157\x6d\x20" . _DB_PREFIX_ . "\145\156\x76\151\141\155\x65\x5f\145\x6e\x76\x69\x6f\40\167\x68\x65\x72\x65\x20\x69\144\137\157\x72\x64\x65\162\x20\x3d\40\x20" . (int) $id_order); foreach ($respuestas as $resp) { $respuesta = (string) $resp["\162\145\x73\160\165\x65\163\164\x61"]; if ($respuesta != '') { $data = json_decode(base64_decode($respuesta), true); $identifier = @(int) $data["\144\x61\x74\141"]["\151\x64\x65\x6e\164\151\146\x69\145\x72"]; if ($identifier > 0) { $envios[] = $identifier; break; } } } } if (count($envios) > 0) { $respuesta = (string) $this->module->generarEtiquetas($envios, "\160\144\x66", 3); if ($respuesta != '') { $data = json_decode($respuesta, true); $url_labels_pdf = @(string) $data["\144\x61\164\141"][0]["\x6c\141\142\x65\x6c\x73"]; if ($url_labels_pdf != '') { $contenido = @(string) file_get_contents($url_labels_pdf); header("\x43\157\x6e\x74\145\x6e\164\x2d\104\145\x73\143\162\151\x70\x74\151\157\156\x3a\40\x46\151\x6c\145\40\124\162\141\156\x73\146\x65\x72"); header("\103\157\x6e\x74\x65\x6e\164\55\124\171\160\x65\x3a\40\141\x70\x70\x6c\151\143\x61\164\x69\x6f\156\57\157\x63\x74\145\x74\x2d\x73\x74\162\145\x61\x6d"); header("\x43\157\156\164\145\156\x74\55\x44\151\163\160\157\x73\151\164\151\157\x6e\72\x20\x61\164\x74\x61\x63\150\155\x65\x6e\x74\x3b\40\x66\x69\154\145\156\141\x6d\145\75\42\x45\164\151\x71\x75\145\x74\141\x73\x5f\x45\x6e\x76\151\x61\x6d\x65\x2e\x70\144\146\x22"); header("\105\170\160\x69\162\145\x73\72\x20\60"); header("\x43\141\143\150\145\55\x43\x6f\156\164\162\157\x6c\x3a\x20\155\x75\x73\x74\55\162\x65\166\x61\x6c\x69\x64\x61\x74\x65"); header("\120\162\141\x67\x6d\141\72\40\x70\165\142\154\151\x63"); header("\103\157\x6e\164\145\x6e\x74\55\114\x65\x6e\x67\164\150\x3a\40" . strlen($contenido)); flush(); echo $contenido; die; } } } $token = Tools::getAdminToken("\101\x64\155\x69\156\117\162\x64\145\162\163" . intval(Tab::getIdFromClassName("\101\x64\155\151\x6e\117\162\x64\145\x72\163")) . intval($this->context->cookie->id_employee)); $url_pedidos = Context::getContext()->link->getAdminLink("\101\144\x6d\x69\x6e\x4f\x72\x64\145\162\163") . "\46\164\x6f\153\145\156\x3d" . $token; Tools::redirectAdmin($url_pedidos); } } }
Function Calls
None |
Stats
MD5 | 47d06c857db0b44599ec0c5db5d64b5c |
Eval Count | 0 |
Decode Time | 137 ms |