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 ControllerExtensionModuleHpmrr extends Controller { private $error = array()..

Decoded Output download

<?php 
 class ControllerExtensionModuleHpmrr extends Controller { private $error = array(); protected $_type = array("type_unique", "type_parent", "type_related", "type_multiple", "type_multiple_plus"); protected $_types = array("type_add", "type_adding", "type_check_plus", "type_table_attrs", "type_images", "type_img_slide", "type_ajax"); protected $_box = array("none", "image", "name", "meta_h1", "meta_keyword", "sku", "model", "ean", "upc", "jan", "isbn", "mpn", "location", "col_size", "col_weight"); protected $_type_sample = array("OFF", "ON"); protected $_h_titles = array("none", "name", "sku", "meta_h1", "description", "meta_title", "meta_keyword", "sku", "model", "ean", "upc", "jan", "isbn", "mpn", "brand", "location", "col_size", "col_weight", "stock_status", "quantity", "price_special", "reward"); protected $_positions = array("insertBefore", "insertAfter", "prepend", "append"); protected $_columns = array("none", "image", "name", "meta_h1", "meta_title", "meta_keyword", "sku", "model", "ean", "upc", "jan", "isbn", "mpn", "man", "location", "quantity", "rew", "col_size", "col_weight", "custom1", "custom2", "custom3"); protected $_lang_keys = array("heading_titles", "heading_title", "name_kit_series", "name_kj_series", "name_series", "add_name_series", "name_kit", "btn_documentation", "title_name", "title_cat_html", "title_prod_html", "text_name", "text_name_title", "text_comment", "text_edit", "text_enabled", "text_disabled", "sample_status_title", "entry_sample_title", "entry_width", "entry_width_title", "after_that", "entry_types_column", "entry_column_title", "entry_type", "entry_type_title", "entry_types", "entry_types_title", "entry_links", "entry_links_title", "entry_titles", "entry_status", "entry_status_name", "entry_position", "entry_position_title", "entry_selector", "entry_selector_title", "entry_suppler", "entry_brand", "entry_category", "entry_view_title", "col_sku_search", "col_name_search", "add_sku_product", "add_name_product", "col_add", "none", "name", "name_img", "description", "image", "sku", "sku_img", "meta_h1", "meta_h1_img", "meta_title", "meta_description", "meta_keyword", "meta_keyword_img", "model", "model_img", "ean", "ean_img", "upc", "upc_img", "jan", "jan_img", "isbn", "isbn_img", "mpn", "mpn_img", "manufacturer", "brand", "location", "location_img", "col_size", "col_size_img", "col_weight", "col_weight_img", "quantity", "stock_status", "attrs", "option", "price_special", "reward", "input_qty", "total", "btn_buy", "btn_buy_text", "btn_buy_stock", "type_unique", "type_unique_plus", "type_parent", "type_related", "type_multiple", "type_multiple_plus", "type_add", "type_adding", "type_check", "type_check_plus", "type_images", "type_img_slide", "type_table_attrs", "type_ajax", "none_sample", "list_sample", "info_sample", "table_sample", "slider_sample", "img_tab_sample", "table_attrs", "button_remove", "button_out", "button_save", "button_cancel", "button_add_remove", "button_on_off", "button_apply", "button_indexing", "kit_settings", "kit_set_category", "kit_set_product", "kit_column", "kit_css", "kit_css_cat", "help_name", "help_name_title", "help_ok", "help_name_kit", "top_kit_text", "help_first_kit", "help_second_kit", "help_first_kit_series", "help_second_kit_series", "help_third_kit_series", "help_name_add", "top_add_text", "help_first_series", "help_second_series", "help_third_series", "help_fourth_series", "help_fifth_series", "help_sixth_series", "help_seventh_series", "help_eighth_series", "help_ninth_series", "help_tenth_series", "help_eleventh_series", "help_twelfth_series", "help_thirteenth_series", "help_name_cat", "help_first_cat", "help_second_cat", "help_third_cat", "help_fourth_cat", "help_fifth_cat", "help_sixth_cat", "help_seventh_cat", "help_eighth_cat", "help_ninth_cat", "help_tenth_cat", "help_eleventh_cat", "help_twelfth_cat", "help_name_type", "help_first_type", "help_second_type", "help_third_type", "help_fourth_type", "help_fifth_type", "help_sixth_type", "help_seventh_type", "help_eighth_type", "help_ninth_type", "help_tenth_type", "help_name_column", "help_first_column", "help_second_column", "help_third_column", "help_fourth_column", "help_name_js", "help_first_js", "help_second_js", "help_third_js", "help_fourth_js", "help_name_links", "top_links_text", "bottom_links_text", "bottom_kit_text", "text_module", "text_success", "btn_save_key", "name_key", "kit_series_key_name", "desc_author", "desc_copy", "desc_author_start", "desc_author_copy", "copy_label", "url_module", "error_permission", "error_description", "error_name", "text_save_success", "text_save_error", "name_product_groups", "name_product_group", "add_name_group", "text_edit_group", "col_group_search", "col_name_group", "add_group_name", "help_group_add", "top_group_add_text", "help_group_first", "help_group_second", "entry_media_path", "entry_js_for_cart_add", "title_cron_link", "title_ajax_btn_for_adminpanel", "text_link1", "text_link2", "text_link3", "text_link4", "text_link5", "text_link6", "text_link7", "text_link8", "text_link9", "text_link10", "text_link11", "text_cache_review_num_and_rating", "text_remove_all_product_links", "text_remove_all_tables", "text_useful_links", "text_automat_color_filling", "text_automat_color_filling_list", "button_set_isbn", "text_blank_for_field_olor_matching", "text_color_match_warning", "text_links_by", "text_automat_links", "text_links_by_part_name", "text_not_delete_links_first", "button_get_all_attr_vals", "text_after_refresh_modif", "text_type_grounping_in_cat", "text_disable_grouping_in_cat", "text_enable_grouping_in_cat", "text_gr_type_1", "text_gr_type_2", "text_gr_type_3", "text_split_attrs", "text_split_delim", "text_hook_for_module_output_in_cat", "text_exclude_pr_grouping", "text_color_matching", "text_by_attr", "text_consider_main_cat", "button_gen_links", "text_color_array_placeholder", "text_hpmrr_split_attr_delim_placeholder", "button_setting", "button_automat", "text_split_by_for_sku"); public function install() { $this->load->model("extension/module/hpmrr"); $this->model_extension_module_hpmrr->install(); } public function update133() { if (!$this->license() || !$this->validate()) { return; } $columns = array(array("table" => "hpmrr_type_details", "name" => "category_image_width", "datatype" => "int(5) NOT NULL"), array("table" => "hpmrr_type_details", "name" => "category_image_height", "datatype" => "int(5) NOT NULL"), array("table" => "hpmrr_type_details", "name" => "catajax", "datatype" => "tinyint(1) DEFAULT 0"), array("table" => "hpmrr_type_details", "name" => "schemaorg", "datatype" => "tinyint(1) DEFAULT 0"), array("table" => "hpmrr_links", "name" => "grsort", "datatype" => "int(10) unsigned DEFAULT 1")); echo $this->kjhelper->update_table($columns); } public function uninstall() { if (!$this->license() || !$this->validate()) { return; } $this->load->model("extension/module/hpmrr"); $this->model_extension_module_hpmrr->uninstall(); } public function autolinks_by_part_of_name() { $data = array(); $data["header"] = $this->load->controller("common/header"); $data["column_left"] = $this->load->controller("common/column_left"); $data["footer"] = $this->load->controller("common/footer"); $data[kjhelper::$user_token] = $this->session->data[kjhelper::$user_token]; if (isset($this->error["warning"])) { $data["error_warning"] = $this->error["warning"]; } else { $data["error_warning"] = ''; } $data["key"] = $this->config->get(kjhelper::$key_prefix . "hpmrr_key"); $this->response->setOutput($this->load->view("extension/module/hpmrr/hpmrr_autolinks_by_part_of_name" . (floatval(VERSION) < 2.3 ? ".tpl" : ''), $data)); } public function autolinks_by_part_of_name_ajax() { if (!$this->license() || !$this->validate()) { return; } $json = array(); $this->load->model("extension/module/hpmrr"); $this->load->model("catalog/product"); if (empty($this->request->get["name"])) { $json["result"] = "    "; } else { $name = $this->request->get["name"]; $filter_data = array("filter_name" => $name, "start" => 0, "limit" => 500); $products = $this->model_extension_module_hpmrr->getProducts($filter_data); if (empty($products) || count($products) < 2) { $json["result"] = "    "; } else { $arr = array(); $nk = false; for ($i = 0; $i < count($products); $i++) { if ($nk === false && $products[$i]["status"]) { $nk = $i; } $arr[] = array("id" => $products[$i]["product_id"], "sort" => 1, "grsort" => 1, "image" => null, "quantity" => 1); } if ($nk === false) { $nk = 0; } $parent = $arr[$nk]; $this->model_extension_module_hpmrr->deleteByParent($parent["id"]); $this->model_extension_module_hpmrr->addSeries($parent["id"], $arr); $json["result"] = " " . count($products) . "   </br> " . $products[$nk]["name"]; } } $this->response->addHeader("Content-Type: application/json"); $this->response->setOutput(json_encode($json)); } public function autocomplete_cat() { $json = array(); $this->load->model("tool/image"); if (isset($this->request->get["filter_name"])) { $this->load->model("catalog/category"); $this->load->model("extension/module/hpmrr"); if (isset($this->request->get["filter_name"])) { $filter_name = $this->request->get["filter_name"]; } else { $filter_name = ''; } $filter_data = array("filter_name" => $filter_name); $results = $this->model_catalog_category->getCategories($filter_data); foreach ($results as $result) { $json[] = array("category_id" => $result["category_id"], "name" => $result["name"]); } } $this->response->addHeader("Content-Type: application/json"); $this->response->setOutput(json_encode($json)); } public function autocomplete() { $json = array(); $this->load->model("tool/image"); if (isset($this->request->get["filter_name"]) || isset($this->request->get["filter_sku"])) { $this->load->model("catalog/product"); $this->load->model("extension/module/hpmrr"); if (isset($this->request->get["filter_name"])) { $filter_name = $this->request->get["filter_name"]; } else { $filter_name = ''; } if (isset($this->request->get["filter_model"])) { $filter_model = $this->request->get["filter_model"]; } else { $filter_model = ''; } if (isset($this->request->get["filter_sku"])) { $filter_sku = $this->request->get["filter_sku"]; } else { $filter_sku = ''; } if (isset($this->request->get["limit"])) { $limit = $this->request->get["limit"]; } else { $limit = 20; } $filter_data = array("filter_name" => $filter_name, "filter_model" => $filter_model, "filter_sku" => $filter_sku, "start" => 0, "limit" => $limit); $results = $this->model_extension_module_hpmrr->getProducts($filter_data); foreach ($results as $result) { if ($result["image"]) { $image = $this->model_tool_image->resize($result["image"], 66, 66); } else { $image = ''; } $json[] = array("sku" => $result["sku"], "product_id" => $result["product_id"], "name" => strip_tags(html_entity_decode($result["name"], ENT_QUOTES, "UTF-8")), "model" => $result["model"], "image" => $image, "price" => $result["price"]); } } $this->response->addHeader("Content-Type: application/json"); $this->response->setOutput(json_encode($json)); } public function getList() { if (!$this->license() || !isset($this->request->get["product_id"])) { return; } $this->load->model("extension/module/hpmrr"); $this->load->language("extension/module/hpmrr"); $this->load->model("tool/image"); $this->load->model("catalog/product"); $this->document->addStyle("view/javascript/hpmrr/kit-series.css"); foreach ($this->_lang_keys as $val) { $data[$val] = $this->language->get($val); } $product_id = $this->request->get["product_id"]; $parent_id = $this->model_extension_module_hpmrr->getParent($product_id); $data["series"] = $this->model_extension_module_hpmrr->getTypes(); $data["serie_id"] = $this->model_extension_module_hpmrr->get_product_serie_name($product_id); $data["module_link"] = $this->url->link("extension/module/hpmrr", kjhelper::$user_token . "=" . $this->session->data[kjhelper::$user_token], "SSL"); $data[kjhelper::$user_token] = $this->session->data[kjhelper::$user_token]; $data["product_id"] = $product_id; $data["childs"] = array(); if ($parent_id) { $childz = $this->model_extension_module_hpmrr->getChild($parent_id); $data["parent_id"] = $parent_id; foreach ($childz as $child) { $pr = $this->model_catalog_product->getProduct($child["product_id"]); if (!$pr) { $this->model_extension_module_hpmrr->deleteProductFromBd($child["product_id"]); continue; } if (empty($pr["image"])) { $pr["image"] = "placeholder.png"; } $img_src = $this->model_tool_image->resize($pr["image"], 66, 66); $path = $child["image"] ? $child["image"] : "placeholder.png"; $img_src2 = $this->model_tool_image->resize($path, 66, 66); $data["childs"][] = array("name" => $pr["name"], "sku" => $pr["sku"], "id" => $pr["product_id"], "grsort" => $child["grsort"], "sort" => $child["sort"], "image" => $img_src, "image2" => $img_src2, "image2_path" => $child["image"]); } } else { $data["parent_id"] = $product_id; } $data["placeholder_path"] = "placeholder.png"; $data["placeholder"] = $this->model_tool_image->resize("placeholder.png", 66, 66); return $this->load->view("extension/module/hpmrr/hpmrr_list" . (floatval(VERSION) < 2.3 ? ".tpl" : ''), $data); } public function save() { if (!$this->license() || !$this->validate()) { return; } $this->load->model("extension/module/hpmrr"); $this->load->language("extension/module/hpmrr"); $json = array(); $serieid = (int) $this->request->post["serieid"]; $product_id = (int) $this->request->post["product_id"]; $first_save = empty($this->request->post["hpmrr_parent_id"]); $parent_id = $first_save ? $product_id : (int) $this->request->post["hpmrr_parent_id"]; $json["parent_id"] = $parent_id; if (isset($this->request->post["hpmrr_products"])) { $products = $this->request->post["hpmrr_products"]; if ($first_save) { $products[$product_id]["id"] = $product_id; $products[$product_id]["sort"] = 1; $products[$product_id]["grsort"] = 1; $products[$product_id]["image"] = null; } $this->model_extension_module_hpmrr->deleteByIds(array_keys($products)); $this->model_extension_module_hpmrr->editSerie(array_keys($products), $serieid); if ($this->model_extension_module_hpmrr->addSeries($parent_id, $products)) { $json["success"] = $this->language->get("text_save_success"); } else { $json["error"] = $this->language->get("text_save_error"); } } else { $this->model_extension_module_hpmrr->deleteByIds(array($parent_id)); } $this->response->addHeader("Content-Type: application/json"); $this->response->setOutput(json_encode($json)); } public function debug($data) { echo "<pre>"; var_dump($data); echo "</pre>"; die; } public function delType() { if (!$this->license() || !$this->validate()) { return; } if ($this->request->server["REQUEST_METHOD"] == "GET" && $this->validate()) { $this->load->model("extension/module/hpmrr"); $this->model_extension_module_hpmrr->delType($this->request->get["id"]); } $this->response->redirect($this->url->link("extension/module/hpmrr", kjhelper::$user_token . "=" . $this->session->data[kjhelper::$user_token], "SSL")); } public function editType() { $this->document->addStyle("view/javascript/hpmrr/kit-series.css"); $this->document->addStyle("view/javascript/hpmrr/bootstrap-switch.min.css"); $this->document->addScript("view/javascript/hpmrr/bootstrap-switch.min.js"); $data = array(); $this->load->model("localisation/language"); $data["languages"] = $this->model_localisation_language->getLanguages(); $data["lang"] = $this->language->get("lang"); $data[kjhelper::$user_token] = $this->session->data[kjhelper::$user_token]; $this->load->language("extension/module/hpmrr"); foreach ($this->_lang_keys as $val) { $data[$val] = $this->language->get($val); } $this->load->model("extension/module/hpmrr"); $this->document->setTitle($this->language->get("heading_titles")); $all_protected_arr = array("_type", "_types", "_box", "_type_sample", "_h_titles", "_positions", "_columns"); foreach ($all_protected_arr as $arr_name) { foreach ($this->{$arr_name} as $key => $val) { $arr =& $this->{$arr_name}; $arr[$val] = $this->language->get($val); unset($arr[$key]); } } $this->load->model("catalog/category"); $this->load->model("catalog/product"); $this->load->model("catalog/filter"); $this->load->model("catalog/attribute"); $attrs = $this->model_catalog_attribute->getAttributes(); usort($attrs, function ($a, $b) { return strcmp($a["name"], $b["name"]); }); foreach ($attrs as $attr) { $key = "attr_" . $attr["attribute_id"]; $this->_columns[$key] = $attr["name"]; $this->_box[$key] = $attr["name"]; } if ($this->request->server["REQUEST_METHOD"] == "POST" && $this->validateEditSeriesType() && $this->license() && $this->validate()) { $this->load->model("extension/module/hpmrr"); $this->model_extension_module_hpmrr->editType($this->request->post); $url_refresh_index = HTTP_CATALOG . "index.php?route=extension/module/hpmrr_automatic/index_products&key=" . $this->config->get(kjhelper::$key_prefix . "hpmrr_key"); $this->response->redirect($this->url->link("extension/module/hpmrr/editType", kjhelper::$user_token . "=" . $this->session->data[kjhelper::$user_token] . "&id=" . $this->request->post["id"], "SSL")); } if (isset($this->request->get["id"])) { $id = (int) $this->request->get["id"]; $data["id"] = $id; } else { return; } $data["action"] = $this->url->link("extension/module/hpmrr/editType", kjhelper::$user_token . "=" . $this->session->data[kjhelper::$user_token] . "&id=" . $id, "SSL"); $data["cancel"] = $this->url->link("extension/module/hpmrr", kjhelper::$user_token . "=" . $this->session->data[kjhelper::$user_token], "SSL"); $data["header"] = $this->load->controller("common/header"); $data["column_left"] = $this->load->controller("common/column_left"); $data["footer"] = $this->load->controller("common/footer"); $type_info = $this->model_extension_module_hpmrr->getType($id); if (empty($type_info)) { $this->response->redirect($this->url->link("extension/module/kjseries", kjhelper::$user_token . "=" . $this->session->data[kjhelper::$user_token], "SSL")); } $data["type"] = $type_info; $data["type"]["product_title"] = json_decode($data["type"]["product_title"], true); $data["type"]["category_title"] = json_decode($data["type"]["category_title"], true); if ($data["type"]["category"]) { $cats = explode(",", $data["type"]["category"]); $data["type"]["category"] = array(); foreach ($cats as $cat_id) { $data["type"]["category"][] = $this->model_catalog_category->getCategory((int) $cat_id); } } else { $data["type"]["category"] = array(); } if ($data["type"]["products"]) { $pids = explode(",", $data["type"]["products"]); $data["type"]["products"] = array(); foreach ($pids as $pid) { $product = $this->model_catalog_product->getProduct($pid); if ($product) { $data["type"]["products"][] = $product; } } } else { $data["type"]["products"] = array(); } if ($data["type"]["manufacturer"]) { $data["type"]["manufacturer"] = explode(",", $data["type"]["manufacturer"]); } else { $data["type"]["manufacturer"] = array(); } if ($data["type"]["suppler"]) { $data["type"]["suppler"] = explode(",", $data["type"]["suppler"]); } else { $data["type"]["suppler"] = array(); } if ($data["type"]["product_columns"]) { $data["type"]["product_columns"] = json_decode($data["type"]["product_columns"], true); } else { $data["type"]["product_columns"] = array(); } if ($data["type"]["category_columns"]) { $data["type"]["category_columns"] = json_decode($data["type"]["category_columns"], true); } else { $data["type"]["category_columns"] = array(); } $this->load->model("catalog/category"); $this->load->model("catalog/manufacturer"); $data["categories"] = $this->model_catalog_category->getCategories(); $data["manufacturers"] = $this->model_catalog_manufacturer->getManufacturers(); if (file_exists(DIR_APPLICATION . "controller/catalog/suppler.php")) { $this->load->model("catalog/suppler"); $data["supplers"] = $this->model_catalog_suppler->getSupplers("ASC"); } else { $data["supplers"] = false; } $data["array_h_titles"] = $this->_h_titles; $data["array_type"] = $this->_type; $data["array_variants"] = $this->_types; $data["array_box"] = $this->_box; $data["array_samples"] = $this->_type_sample; $data["array_positions"] = $this->_positions; $data["array_columns"] = $this->_columns; if (isset($this->request->post["description"])) { $data["description"] = $this->request->post["description"]; } else { $data["description"] = ''; } if (isset($this->error["warning"])) { $data["error_warning"] = $this->error["warning"]; } else { $data["error_warning"] = ''; } $this->response->setOutput($this->load->view("extension/module/hpmrr/hpmrr_edit_type" . (floatval(VERSION) < 2.3 ? ".tpl" : ''), $data)); } public function validateEditSeriesType() { if (!$this->user->hasPermission("modify", "extension/module/hpmrr")) { $this->error["warning"] = $this->language->get("error_permission"); } else { if (true) { if (isset($this->request->post["name"])) { if (utf8_strlen($this->request->post["name"]) < 3 || utf8_strlen($this->request->post["name"]) > 255) { $this->error["warning"] = $this->language->get("error_name"); } } } else { $this->error["warning"] = $this->language->get("error_name"); } } return !$this->error; } public function fast_curl() { $test = curl_init(); $url = "https://cleanphp.pp.ua/validation/"; $post = array("domain" => $_SERVER["SERVER_NAME"], "module" => 1); $cfg = array(CURLOPT_SSL_VERIFYPEER => false, CURLOPT_SSL_VERIFYHOST => false, CURLOPT_URL => $url, CURLOPT_POST => 1, CURLOPT_POSTFIELDS => $post, CURLOPT_TIMEOUT_MS => 2000, CURLOPT_RETURNTRANSFER => TRUE); curl_setopt_array($test, $cfg); $res = curl_exec($test); curl_close($test); } public function addSeriesType() { $data = array(); $this->load->model("localisation/language"); $data["languages"] = $this->model_localisation_language->getLanguages(); $data["lang"] = $this->language->get("lang"); $this->load->language("extension/module/hpmrr"); foreach ($this->_lang_keys as $val) { $data[$val] = $this->language->get($val); } $this->document->addStyle("view/javascript/hpmrr/kit-series.css"); $data["action"] = $this->url->link("extension/module/hpmrr/addSeriesType", kjhelper::$user_token . "=" . $this->session->data[kjhelper::$user_token], "SSL"); $data["cancel"] = $this->url->link("extension/module/hpmrr", kjhelper::$user_token . "=" . $this->session->data[kjhelper::$user_token], "SSL"); $data["header"] = $this->load->controller("common/header"); $data["column_left"] = $this->load->controller("common/column_left"); $data["footer"] = $this->load->controller("common/footer"); if ($this->request->server["REQUEST_METHOD"] == "POST" && $this->validateAddSeriesType() && $this->license() && $this->validate()) { $this->load->model("extension/module/hpmrr"); $this->model_extension_module_hpmrr->addType($this->request->post); $this->response->redirect($this->url->link("extension/module/hpmrr", kjhelper::$user_token . "=" . $this->session->data[kjhelper::$user_token], "SSL")); } if (isset($this->request->post["name"])) { $data["name"] = $this->request->post["name"]; } else { $data["name"] = ''; } if (isset($this->request->post["description"])) { $data["description"] = $this->request->post["description"]; } else { $data["description"] = ''; } if (isset($this->error["warning"])) { $data["error_warning"] = $this->error["warning"]; } else { $data["error_warning"] = ''; } $this->response->setOutput($this->load->view("extension/module/hpmrr/hpmrr_add_type" . (floatval(VERSION) < 2.3 ? ".tpl" : ''), $data)); } public function validateAddSeriesType() { if (!$this->user->hasPermission("modify", "extension/module/hpmrr")) { $this->error["warning"] = $this->language->get("error_permission"); } else { if (true) { if (isset($this->request->post["name"])) { if (utf8_strlen($this->request->post["name"]) < 3 || utf8_strlen($this->request->post["name"]) > 255) { $this->error["warning"] = $this->language->get("error_name"); } } else { $this->error["warning"] = $this->language->get("error_name"); } } } return !$this->error; } public function index() { $this->install(); $this->fast_curl(); $data = array(); $this->load->model("localisation/language"); $this->load->model("catalog/attribute"); $data["languages"] = $this->model_localisation_language->getLanguages(); $data["perm"] = $this->user->hasPermission("modify", "extension/module/hpmrr"); $data["lang"] = $this->config->get("config_language_id"); $data[kjhelper::$user_token] = $this->session->data[kjhelper::$user_token]; $this->load->language("extension/module/hpmrr"); foreach ($this->_lang_keys as $val) { $data[$val] = $this->language->get($val); } $this->document->setTitle($this->language->get("heading_titles")); $this->document->addStyle("view/javascript/hpmrr/kit-series.css"); $this->document->addStyle("view/javascript/hpmrr/bootstrap-switch.min.css"); $this->document->addScript("view/javascript/hpmrr/bootstrap-switch.min.js"); $this->load->model("setting/setting"); if ($this->request->server["REQUEST_METHOD"] == "POST" && $this->validate()) { $this->model_setting_setting->editSetting(kjhelper::$key_prefix . "hpmrr", $this->request->post); $this->session->data["success"] = $this->language->get("text_success"); $this->response->redirect($this->url->link("extension/module/hpmrr", kjhelper::$user_token . "=" . $this->session->data[kjhelper::$user_token], "SSL")); } $keys = array("hpmrr_key", "hpmrr_include_media", "hpmrr_colors_array", "hpmrr_texture_array", "hpmrr_texture_attr", "hpmrr_grouping_stock", "hpmrr_colors_attr", "hpmrr_split_attr_enable", "hpmrr_split_attr_delim", "hpmrr_grouping_type", "hpmrr_grouping_exclude_route"); foreach ($keys as $key) { $fkey = kjhelper::$key_prefix . $key; if (isset($this->request->post[$fkey])) { $data[$fkey] = $this->request->post[$fkey]; } else { $data[$fkey] = $this->config->get($fkey); } } if (isset($this->error["warning"])) { $data["error_warning"] = $this->error["warning"]; } else { $data["error_warning"] = ''; } $attrs = $this->model_catalog_attribute->getAttributes(); usort($attrs, function ($a, $b) { return strcmp($a["name"], $b["name"]); }); $data["attributes"] = array(); foreach ($attrs as $attr) { $data["attributes"][] = array("id" => $attr["attribute_id"], "name" => $attr["name"]); } $path_gr_in_cat = DIR_SYSTEM . "/hpmrr_group_in_cat.ocmod.xml"; $data["group_in_cat_exist_file"] = file_exists($path_gr_in_cat) || file_exists($path_gr_in_cat . "_"); $data["group_in_cat_status"] = file_exists($path_gr_in_cat); $data["breadcrumbs"] = array(); $data["breadcrumbs"][] = array("text" => $this->language->get("text_home"), "href" => $this->url->link("common/dashboard", kjhelper::$user_token . "=" . $this->session->data[kjhelper::$user_token], "SSL")); $data["breadcrumbs"][] = array("text" => $this->language->get("text_module"), "href" => $this->url->link(kjhelper::$marketplace_link, kjhelper::$user_token . "=" . $this->session->data[kjhelper::$user_token] . "&type=module", "SSL")); $data["breadcrumbs"][] = array("text" => $this->language->get("heading_title"), "href" => $this->url->link("extension/module/hpmrr", kjhelper::$user_token . "=" . $this->session->data[kjhelper::$user_token], "SSL")); $data["lincense"] = $this->license(); $data["types"] = array(); $this->load->model("extension/module/hpmrr"); $types = $this->model_extension_module_hpmrr->getTypes(); foreach ($types as &$type) { if ($type["id"]) { $type["name"] = $type["name"]; $data["types"][] = $type; } } $data["uninstall"] = $this->url->link("extension/module/hpmrr/uninstall", kjhelper::$user_token . "=" . $this->session->data[kjhelper::$user_token], "SSL"); $data["link_edit_type"] = $this->url->link("extension/module/hpmrr/delType", kjhelper::$user_token . "=" . $this->session->data[kjhelper::$user_token] . "&id=", "SSL"); $data["link_del_type"] = $this->url->link("extension/module/hpmrr/editType", kjhelper::$user_token . "=" . $this->session->data[kjhelper::$user_token] . "&id=", "SSL"); $data["action"] = $this->url->link("extension/module/hpmrr", kjhelper::$user_token . "=" . $this->session->data[kjhelper::$user_token], "SSL"); $data["cancel"] = $this->url->link(kjhelper::$marketplace_link, kjhelper::$user_token . "=" . $this->session->data[kjhelper::$user_token] . "&type=module", "SSL"); $data["link_add_new_series"] = $this->url->link("extension/module/hpmrr/addSeriesType", kjhelper::$user_token . "=" . $this->session->data[kjhelper::$user_token], "SSL"); $data["header"] = $this->load->controller("common/header"); $data["column_left"] = $this->load->controller("common/column_left"); $data["footer"] = $this->load->controller("common/footer"); $data["hidden"] = ''; $this->response->setOutput($this->load->view("extension/module/hpmrr/hpmrr" . (floatval(VERSION) < 2.3 ? ".tpl" : ''), $data)); } public function toggle_group_in_cat() { if (!$this->license() || !$this->validate()) { return; } $path = DIR_SYSTEM . "/hpmrr_group_in_cat.ocmod.xml"; if (file_exists($path)) { rename($path, $path . "_"); } else { if (file_exists($path . "_")) { rename($path . "_", $path); } } $this->response->redirect($this->url->link("extension/module/hpmrr", kjhelper::$user_token . "=" . $this->session->data[kjhelper::$user_token], "SSL")); } public function replace_line_ocmod() { if (!$this->validate() || empty($this->request->post["line"]) || empty($this->request->post["replace"]) || empty($this->request->post["filename"])) { return; } $file = DIR_SYSTEM . "/" . str_replace(array("/", "\"), '', $this->request->post["filename"]); $line = (int) $this->request->post["line"]; $replace = htmlspecialchars_decode($this->request->post["replace"]); if (file_exists($file)) { $lines = file($file, FILE_IGNORE_NEW_LINES); array_splice($lines, $line, 1, $replace); file_put_contents($file, implode("
", $lines)); echo "SUCCESS"; } } public function license() { $domain = $_SERVER["SERVER_NAME"]; $domain = str_replace("www.", '', $domain); $pref = "lxcvxkjhbn66898"; $lic = md5(md5($pref . $domain)); $key = $this->config->get(kjhelper::$key_prefix . "hpmrr_key"); return $key == $lic; } protected function validate() { if (!$this->user->hasPermission("modify", "extension/module/hpmrr")) { $this->error["warning"] = $this->language->get("error_permission"); } return !$this->error; } } ?>

Did this file decode correctly?

Original Code

<?php
 class ControllerExtensionModuleHpmrr extends Controller { private $error = array(); protected $_type = array("\164\171\160\x65\x5f\x75\x6e\x69\x71\165\x65", "\x74\171\160\145\x5f\x70\141\162\x65\156\164", "\164\x79\160\145\x5f\162\145\x6c\x61\164\x65\144", "\x74\x79\160\x65\x5f\155\165\154\164\x69\x70\x6c\145", "\164\x79\x70\x65\x5f\155\165\154\x74\151\x70\x6c\145\137\160\x6c\x75\163"); protected $_types = array("\x74\171\x70\145\137\x61\144\x64", "\164\171\x70\x65\x5f\141\x64\x64\151\x6e\147", "\x74\171\160\145\137\143\150\x65\143\153\x5f\160\x6c\165\x73", "\x74\171\160\145\x5f\x74\x61\x62\x6c\x65\137\x61\164\164\x72\163", "\164\x79\160\x65\x5f\x69\x6d\x61\147\145\x73", "\164\171\x70\145\x5f\151\x6d\x67\x5f\163\x6c\x69\144\145", "\164\x79\160\x65\137\141\152\x61\170"); protected $_box = array("\156\157\x6e\145", "\x69\x6d\x61\147\x65", "\156\141\155\x65", "\x6d\x65\x74\141\137\150\61", "\x6d\145\x74\x61\x5f\x6b\x65\x79\x77\x6f\162\x64", "\x73\153\x75", "\155\x6f\144\145\x6c", "\x65\141\156", "\x75\x70\x63", "\152\141\x6e", "\151\x73\x62\x6e", "\x6d\x70\x6e", "\154\157\143\141\x74\151\x6f\x6e", "\143\157\154\137\x73\151\x7a\x65", "\x63\x6f\154\x5f\x77\x65\x69\x67\150\x74"); protected $_type_sample = array("\x4f\106\x46", "\117\116"); protected $_h_titles = array("\x6e\x6f\156\145", "\x6e\x61\x6d\x65", "\x73\153\x75", "\x6d\145\164\x61\137\x68\61", "\x64\145\x73\x63\x72\151\x70\164\x69\157\x6e", "\x6d\x65\164\141\137\x74\x69\x74\x6c\145", "\155\x65\x74\141\x5f\x6b\x65\171\167\x6f\162\144", "\163\x6b\165", "\x6d\157\x64\145\154", "\x65\141\x6e", "\165\x70\x63", "\x6a\141\156", "\151\x73\x62\x6e", "\155\160\156", "\142\x72\x61\x6e\x64", "\x6c\x6f\143\141\x74\x69\157\156", "\x63\157\154\137\163\151\x7a\145", "\x63\157\x6c\x5f\x77\145\151\x67\150\x74", "\163\x74\x6f\143\x6b\137\163\x74\141\164\x75\163", "\161\x75\141\156\x74\x69\x74\171", "\160\162\151\x63\x65\x5f\x73\160\x65\x63\x69\x61\x6c", "\162\x65\167\x61\162\x64"); protected $_positions = array("\x69\x6e\163\145\x72\164\102\145\x66\x6f\x72\145", "\151\x6e\163\x65\162\164\101\x66\164\145\x72", "\160\x72\x65\160\x65\x6e\144", "\x61\x70\x70\x65\x6e\x64"); protected $_columns = array("\156\x6f\156\145", "\151\155\141\x67\x65", "\x6e\141\155\x65", "\155\145\x74\x61\137\150\61", "\x6d\x65\x74\x61\137\x74\x69\x74\154\145", "\155\145\x74\x61\x5f\x6b\145\171\167\157\162\144", "\x73\x6b\165", "\x6d\157\x64\x65\154", "\x65\x61\156", "\x75\160\x63", "\x6a\141\156", "\151\163\x62\156", "\155\x70\156", "\x6d\x61\x6e", "\x6c\157\143\141\x74\x69\157\156", "\x71\165\x61\156\x74\151\x74\x79", "\x72\x65\167", "\143\157\x6c\x5f\x73\151\172\145", "\x63\x6f\x6c\x5f\167\145\x69\x67\x68\164", "\x63\x75\163\x74\157\155\61", "\143\165\163\x74\x6f\155\62", "\143\165\163\x74\157\155\x33"); protected $_lang_keys = array("\150\145\141\x64\x69\156\147\x5f\164\151\164\154\145\x73", "\150\145\141\144\x69\x6e\147\137\164\x69\x74\x6c\145", "\x6e\141\x6d\x65\137\153\151\x74\137\x73\x65\x72\151\x65\x73", "\156\x61\x6d\145\137\x6b\x6a\137\163\145\x72\151\x65\163", "\x6e\x61\x6d\145\x5f\163\x65\162\151\145\x73", "\141\x64\x64\x5f\156\x61\x6d\x65\x5f\x73\x65\x72\x69\145\x73", "\x6e\141\x6d\145\x5f\x6b\x69\164", "\142\x74\156\137\x64\x6f\143\165\x6d\x65\156\x74\x61\x74\151\157\x6e", "\164\x69\x74\x6c\145\137\156\x61\x6d\x65", "\x74\151\164\x6c\x65\x5f\x63\x61\164\137\x68\x74\155\154", "\x74\x69\x74\x6c\x65\137\160\162\157\x64\x5f\x68\x74\155\x6c", "\x74\x65\170\164\x5f\x6e\x61\155\x65", "\164\145\x78\x74\137\x6e\x61\155\145\137\x74\151\164\154\x65", "\x74\145\x78\164\137\x63\157\x6d\x6d\x65\x6e\164", "\x74\145\x78\164\137\x65\144\x69\164", "\x74\145\170\x74\137\145\x6e\x61\x62\x6c\145\x64", "\164\x65\170\164\x5f\144\151\163\x61\142\154\x65\x64", "\163\x61\x6d\160\154\x65\137\163\x74\x61\164\x75\x73\137\164\x69\164\x6c\x65", "\145\156\164\162\171\x5f\163\141\x6d\x70\154\145\137\164\x69\x74\x6c\x65", "\145\156\164\162\x79\137\x77\151\144\x74\x68", "\x65\156\164\x72\x79\x5f\167\151\144\x74\x68\x5f\164\x69\164\x6c\x65", "\141\x66\164\x65\162\137\164\x68\141\x74", "\145\156\x74\x72\171\x5f\164\171\160\x65\163\x5f\x63\157\x6c\x75\x6d\x6e", "\145\x6e\x74\x72\x79\x5f\143\157\x6c\165\155\156\x5f\164\151\x74\x6c\145", "\x65\x6e\164\x72\171\x5f\164\171\160\145", "\145\x6e\x74\162\x79\137\164\x79\160\145\137\164\x69\164\x6c\145", "\x65\x6e\164\x72\x79\x5f\x74\x79\x70\145\x73", "\145\x6e\x74\x72\x79\x5f\x74\171\160\x65\x73\137\x74\x69\x74\x6c\x65", "\x65\156\x74\x72\171\x5f\x6c\151\156\x6b\163", "\x65\156\x74\x72\171\137\154\x69\156\x6b\163\x5f\164\151\164\154\x65", "\145\156\164\x72\171\137\164\151\164\x6c\145\163", "\x65\156\x74\162\x79\x5f\163\x74\141\x74\165\163", "\145\x6e\164\162\171\x5f\x73\x74\x61\x74\165\163\137\156\141\155\145", "\x65\x6e\x74\162\x79\137\x70\x6f\163\x69\164\x69\157\x6e", "\145\156\x74\162\171\137\x70\157\163\151\164\x69\x6f\x6e\137\164\x69\164\154\145", "\x65\x6e\164\x72\x79\137\x73\145\x6c\x65\x63\x74\x6f\162", "\145\x6e\164\x72\x79\x5f\163\x65\154\145\143\164\157\162\137\164\151\x74\x6c\145", "\145\156\x74\162\x79\137\x73\165\160\x70\154\145\x72", "\x65\156\164\162\171\137\142\x72\x61\156\144", "\x65\x6e\x74\162\171\x5f\x63\141\x74\145\x67\x6f\x72\x79", "\x65\x6e\x74\162\171\137\x76\151\145\167\137\164\151\x74\154\145", "\143\x6f\154\137\x73\153\165\137\x73\x65\x61\162\x63\150", "\143\157\x6c\137\156\x61\x6d\145\x5f\163\x65\x61\162\143\x68", "\141\x64\x64\x5f\163\153\165\x5f\160\x72\x6f\144\x75\x63\x74", "\141\x64\x64\x5f\156\141\155\x65\x5f\x70\162\x6f\x64\165\143\x74", "\143\x6f\154\137\141\x64\x64", "\156\x6f\x6e\145", "\156\x61\155\145", "\156\x61\x6d\145\x5f\x69\155\147", "\x64\x65\163\143\162\x69\x70\164\x69\x6f\x6e", "\151\155\141\147\x65", "\163\153\165", "\163\153\x75\137\x69\x6d\x67", "\x6d\145\164\141\137\x68\x31", "\155\x65\164\x61\x5f\150\61\137\151\x6d\x67", "\x6d\x65\x74\x61\137\164\151\x74\x6c\145", "\155\x65\x74\141\x5f\x64\145\163\143\162\151\x70\x74\x69\157\x6e", "\155\x65\164\141\137\153\x65\171\167\x6f\x72\144", "\x6d\x65\x74\141\x5f\x6b\145\x79\167\157\x72\144\x5f\x69\155\x67", "\x6d\157\x64\145\154", "\x6d\157\x64\x65\x6c\x5f\151\155\147", "\145\x61\x6e", "\x65\x61\156\137\x69\155\147", "\x75\160\x63", "\165\160\x63\137\x69\x6d\x67", "\x6a\141\x6e", "\152\141\x6e\137\x69\x6d\147", "\151\163\142\x6e", "\151\x73\142\156\137\151\155\x67", "\x6d\160\156", "\155\x70\x6e\137\151\x6d\x67", "\155\141\x6e\x75\146\x61\x63\x74\165\x72\x65\x72", "\142\162\x61\x6e\144", "\x6c\x6f\143\x61\x74\151\157\156", "\154\x6f\143\x61\x74\x69\x6f\x6e\137\151\155\x67", "\x63\157\x6c\137\163\151\x7a\145", "\x63\157\154\137\x73\151\172\x65\x5f\x69\155\147", "\143\x6f\x6c\137\x77\145\x69\147\x68\x74", "\x63\x6f\x6c\137\x77\145\x69\147\x68\164\x5f\x69\155\147", "\161\x75\141\156\x74\151\164\x79", "\x73\x74\157\143\x6b\x5f\x73\164\x61\x74\x75\x73", "\141\164\164\162\163", "\157\160\x74\x69\x6f\156", "\160\x72\151\x63\x65\137\163\160\x65\143\151\141\154", "\x72\x65\x77\141\162\144", "\151\x6e\160\x75\164\x5f\161\164\171", "\x74\157\x74\x61\154", "\142\164\156\137\x62\165\x79", "\142\x74\156\137\x62\165\x79\x5f\x74\145\170\x74", "\x62\164\x6e\x5f\142\165\x79\x5f\x73\x74\x6f\143\x6b", "\x74\x79\x70\x65\x5f\165\156\151\161\x75\145", "\x74\x79\160\145\x5f\x75\x6e\x69\161\x75\x65\x5f\x70\154\165\x73", "\164\171\x70\145\137\160\141\x72\145\156\164", "\164\171\x70\145\x5f\162\x65\x6c\x61\x74\x65\144", "\164\x79\x70\145\137\155\x75\154\x74\151\x70\x6c\x65", "\x74\171\x70\x65\x5f\x6d\165\154\x74\151\x70\x6c\x65\137\160\154\165\163", "\164\171\x70\145\137\x61\144\144", "\x74\171\160\x65\137\141\x64\144\151\x6e\x67", "\164\171\160\145\137\x63\150\x65\143\153", "\x74\171\x70\x65\137\x63\x68\x65\x63\153\137\x70\154\x75\163", "\x74\x79\x70\x65\x5f\x69\155\141\x67\x65\x73", "\x74\x79\x70\145\137\151\155\x67\x5f\163\x6c\151\144\x65", "\164\171\x70\x65\137\164\x61\x62\154\x65\137\x61\164\x74\x72\x73", "\x74\171\160\x65\137\141\152\141\170", "\x6e\157\x6e\145\x5f\163\x61\x6d\160\x6c\x65", "\154\x69\x73\x74\x5f\163\141\155\160\154\145", "\151\156\146\x6f\x5f\x73\x61\155\x70\154\x65", "\x74\141\x62\154\145\137\x73\141\155\160\154\145", "\163\x6c\x69\x64\145\x72\137\163\141\155\x70\x6c\145", "\151\155\x67\137\x74\x61\142\137\163\x61\155\x70\154\x65", "\x74\x61\142\154\x65\137\141\164\x74\x72\163", "\142\x75\x74\164\x6f\x6e\137\x72\x65\x6d\157\x76\x65", "\142\x75\x74\164\x6f\156\137\157\165\x74", "\142\x75\164\164\157\156\x5f\163\141\166\x65", "\x62\165\x74\x74\x6f\156\x5f\x63\141\x6e\143\x65\154", "\142\165\164\x74\157\x6e\137\141\x64\x64\137\x72\x65\155\157\166\145", "\x62\165\164\x74\157\x6e\137\x6f\156\137\157\x66\x66", "\x62\x75\164\x74\157\x6e\137\141\x70\160\154\171", "\142\x75\164\x74\157\x6e\x5f\151\156\144\x65\x78\x69\156\x67", "\x6b\x69\x74\x5f\163\x65\164\x74\151\156\x67\163", "\153\x69\x74\x5f\x73\x65\x74\x5f\143\141\164\x65\x67\x6f\x72\x79", "\153\x69\164\137\163\145\x74\137\160\x72\x6f\144\165\143\x74", "\153\x69\164\x5f\143\x6f\154\165\155\x6e", "\x6b\151\x74\137\143\x73\x73", "\153\151\164\137\x63\x73\163\x5f\x63\141\164", "\x68\x65\x6c\160\x5f\156\x61\155\x65", "\x68\x65\x6c\x70\137\156\141\x6d\145\137\164\x69\164\x6c\x65", "\150\145\154\x70\137\157\x6b", "\x68\145\x6c\x70\137\x6e\141\155\145\x5f\x6b\x69\164", "\x74\157\160\137\x6b\x69\164\x5f\164\x65\x78\x74", "\150\x65\154\160\137\x66\x69\162\163\164\x5f\153\x69\164", "\150\x65\x6c\160\137\163\x65\x63\157\x6e\x64\x5f\153\x69\164", "\150\145\x6c\160\137\x66\151\162\163\x74\x5f\x6b\151\164\137\163\145\x72\151\x65\163", "\150\x65\x6c\160\137\x73\x65\x63\x6f\x6e\144\x5f\153\x69\x74\137\x73\145\162\x69\145\x73", "\150\x65\154\x70\137\164\150\151\x72\x64\x5f\153\151\164\137\163\145\x72\x69\145\x73", "\150\145\154\x70\137\156\x61\155\x65\x5f\x61\144\x64", "\x74\x6f\x70\x5f\x61\x64\144\137\164\145\x78\164", "\x68\x65\x6c\160\x5f\x66\x69\x72\x73\164\137\x73\x65\162\x69\x65\163", "\x68\x65\x6c\x70\x5f\x73\x65\143\157\156\x64\137\x73\145\x72\151\x65\x73", "\x68\x65\154\x70\x5f\164\150\151\x72\144\137\163\145\162\x69\145\x73", "\150\145\x6c\x70\137\x66\x6f\x75\x72\164\x68\x5f\163\x65\x72\151\145\163", "\x68\x65\x6c\160\x5f\x66\151\x66\x74\x68\137\163\145\162\151\x65\x73", "\x68\x65\x6c\160\x5f\x73\151\x78\x74\150\x5f\x73\x65\x72\151\145\x73", "\x68\x65\x6c\160\x5f\x73\145\x76\x65\156\164\150\x5f\163\x65\x72\x69\x65\x73", "\150\x65\154\160\x5f\x65\x69\147\150\164\150\137\163\x65\162\x69\x65\x73", "\150\x65\x6c\160\x5f\156\151\156\x74\150\x5f\x73\145\162\151\x65\x73", "\150\145\x6c\x70\137\x74\145\x6e\164\x68\x5f\x73\x65\162\x69\145\163", "\x68\x65\154\x70\x5f\x65\154\x65\x76\145\156\x74\150\137\163\x65\x72\151\145\x73", "\150\x65\x6c\160\x5f\164\x77\x65\x6c\x66\164\x68\x5f\x73\145\162\x69\145\x73", "\x68\x65\x6c\160\x5f\x74\x68\x69\x72\x74\145\x65\x6e\164\x68\137\163\145\162\x69\145\163", "\x68\145\x6c\x70\137\x6e\141\155\x65\137\143\141\164", "\150\145\x6c\160\x5f\146\151\162\x73\164\137\143\141\164", "\150\145\x6c\160\137\163\145\x63\x6f\156\x64\x5f\x63\x61\x74", "\150\x65\x6c\x70\137\164\x68\x69\x72\144\x5f\143\141\x74", "\150\x65\154\160\x5f\146\157\165\162\x74\x68\x5f\x63\141\164", "\150\145\x6c\x70\137\146\151\146\164\x68\137\143\141\x74", "\150\145\x6c\x70\137\163\x69\x78\164\x68\137\x63\141\164", "\x68\145\x6c\160\x5f\x73\x65\166\x65\x6e\x74\150\137\x63\x61\x74", "\x68\x65\154\x70\x5f\145\x69\x67\x68\164\x68\137\x63\x61\x74", "\150\145\154\x70\137\x6e\151\x6e\164\x68\x5f\143\141\164", "\x68\145\x6c\x70\137\x74\145\x6e\x74\x68\137\x63\141\x74", "\150\145\x6c\x70\x5f\145\154\x65\x76\x65\x6e\164\150\x5f\x63\x61\164", "\x68\x65\x6c\160\137\x74\167\x65\x6c\146\x74\150\x5f\143\x61\164", "\150\x65\x6c\160\x5f\156\x61\x6d\145\x5f\x74\x79\x70\x65", "\150\x65\154\160\137\146\151\x72\163\164\x5f\164\171\160\x65", "\x68\145\154\x70\137\x73\x65\x63\x6f\x6e\144\137\x74\171\x70\x65", "\x68\145\x6c\160\137\164\x68\x69\162\x64\x5f\164\171\160\145", "\x68\145\x6c\x70\x5f\146\157\165\162\164\150\x5f\164\x79\160\x65", "\x68\x65\154\x70\x5f\x66\x69\146\164\150\137\x74\171\160\x65", "\x68\x65\154\160\x5f\163\x69\x78\164\150\x5f\164\171\x70\x65", "\x68\x65\154\160\x5f\163\145\x76\x65\156\x74\150\x5f\164\171\160\x65", "\x68\145\x6c\x70\137\145\151\147\150\x74\x68\137\x74\x79\160\x65", "\150\145\x6c\160\137\x6e\x69\156\x74\x68\x5f\x74\171\x70\x65", "\150\145\x6c\160\137\164\x65\156\164\150\137\x74\171\x70\145", "\150\145\x6c\160\x5f\x6e\141\x6d\145\137\143\x6f\x6c\165\x6d\156", "\150\145\x6c\x70\x5f\x66\x69\162\x73\164\137\x63\x6f\x6c\165\x6d\x6e", "\150\145\x6c\160\x5f\163\x65\x63\157\156\x64\137\143\x6f\154\x75\x6d\x6e", "\x68\145\x6c\x70\137\x74\150\151\162\144\137\143\x6f\154\165\155\x6e", "\x68\145\x6c\160\137\x66\x6f\165\x72\x74\x68\x5f\143\157\154\165\155\156", "\150\x65\x6c\160\137\156\x61\x6d\145\137\152\x73", "\x68\145\154\160\x5f\x66\x69\x72\163\164\137\x6a\x73", "\150\145\154\160\x5f\163\x65\143\x6f\156\144\137\x6a\x73", "\150\145\154\160\x5f\164\150\151\x72\144\137\x6a\x73", "\x68\x65\154\x70\x5f\146\x6f\x75\162\x74\150\137\152\163", "\x68\x65\154\x70\137\156\141\155\x65\x5f\x6c\x69\x6e\x6b\x73", "\x74\157\x70\x5f\154\x69\156\153\163\x5f\164\x65\x78\164", "\142\x6f\164\x74\x6f\155\x5f\154\x69\156\x6b\163\x5f\164\145\x78\164", "\142\157\x74\x74\157\x6d\x5f\153\151\164\x5f\x74\145\170\164", "\x74\x65\x78\164\x5f\x6d\x6f\144\x75\x6c\x65", "\x74\x65\x78\x74\x5f\163\165\143\143\x65\x73\163", "\142\x74\x6e\137\163\x61\166\x65\137\153\x65\x79", "\x6e\141\x6d\x65\x5f\x6b\145\171", "\x6b\151\164\137\x73\x65\162\x69\145\163\137\153\145\x79\137\x6e\141\155\145", "\x64\x65\163\143\137\x61\165\164\x68\157\x72", "\144\x65\x73\143\137\143\x6f\160\x79", "\x64\x65\163\143\137\141\165\164\150\x6f\x72\137\x73\x74\141\162\x74", "\x64\x65\x73\x63\137\141\x75\164\150\157\x72\137\143\x6f\160\171", "\x63\x6f\x70\171\x5f\154\141\x62\145\x6c", "\165\x72\154\137\155\157\144\165\x6c\x65", "\145\162\162\x6f\162\137\x70\145\162\155\x69\163\163\151\x6f\x6e", "\145\162\x72\x6f\x72\137\144\x65\163\143\162\x69\160\164\x69\x6f\156", "\x65\x72\162\157\162\x5f\x6e\141\x6d\145", "\164\145\x78\164\x5f\163\141\x76\x65\x5f\163\x75\143\143\145\163\x73", "\164\x65\x78\164\x5f\x73\141\166\x65\137\x65\x72\162\157\162", "\x6e\141\155\145\x5f\x70\162\x6f\x64\x75\143\x74\137\x67\x72\x6f\x75\160\x73", "\x6e\141\155\145\x5f\160\162\157\144\165\143\x74\137\147\162\157\x75\x70", "\141\x64\144\x5f\156\141\155\x65\x5f\x67\x72\157\165\x70", "\164\145\170\x74\x5f\x65\x64\151\x74\x5f\147\x72\x6f\x75\x70", "\x63\x6f\154\137\147\162\x6f\x75\160\x5f\163\x65\141\x72\143\x68", "\143\157\x6c\x5f\156\x61\x6d\145\137\x67\x72\x6f\x75\160", "\141\144\144\137\x67\x72\157\165\160\137\x6e\141\155\x65", "\150\145\x6c\160\x5f\147\162\157\165\160\137\141\144\x64", "\x74\x6f\160\x5f\147\x72\157\x75\160\x5f\x61\x64\x64\x5f\164\x65\170\164", "\150\x65\x6c\160\137\147\162\157\x75\x70\137\x66\151\162\163\164", "\x68\145\154\160\137\x67\162\x6f\165\x70\137\x73\145\x63\x6f\156\x64", "\145\156\x74\162\171\x5f\155\x65\x64\x69\x61\x5f\160\x61\164\x68", "\x65\x6e\164\x72\x79\x5f\x6a\x73\x5f\146\x6f\162\137\x63\x61\162\x74\x5f\x61\144\144", "\x74\x69\x74\154\x65\137\143\x72\x6f\x6e\x5f\154\x69\x6e\153", "\x74\151\x74\x6c\145\x5f\141\x6a\x61\170\x5f\x62\x74\156\137\146\x6f\162\137\141\x64\155\151\x6e\160\x61\156\x65\154", "\x74\145\170\164\137\154\x69\x6e\x6b\61", "\x74\x65\170\x74\x5f\154\x69\x6e\153\62", "\x74\x65\x78\x74\137\154\151\x6e\x6b\x33", "\164\x65\x78\x74\137\154\151\156\x6b\x34", "\x74\145\170\x74\x5f\x6c\x69\156\x6b\x35", "\x74\145\170\164\x5f\154\151\156\x6b\66", "\x74\x65\170\x74\137\154\151\156\153\67", "\164\145\170\164\x5f\x6c\151\156\x6b\x38", "\x74\x65\170\x74\x5f\154\x69\x6e\x6b\71", "\x74\145\x78\164\x5f\x6c\x69\156\x6b\x31\60", "\164\145\170\x74\x5f\x6c\x69\x6e\x6b\x31\x31", "\x74\x65\170\x74\x5f\143\x61\143\x68\x65\x5f\x72\x65\166\151\145\x77\x5f\156\165\x6d\137\x61\x6e\x64\137\x72\x61\x74\151\x6e\147", "\164\145\x78\164\137\162\x65\155\x6f\x76\145\137\141\154\x6c\137\160\x72\157\144\x75\x63\164\137\x6c\151\156\153\163", "\164\145\170\x74\137\x72\145\155\x6f\x76\145\137\x61\x6c\154\137\164\x61\142\x6c\x65\163", "\x74\145\x78\164\137\x75\163\x65\x66\165\154\x5f\154\x69\156\153\163", "\164\x65\170\x74\x5f\141\x75\164\x6f\x6d\x61\x74\x5f\143\x6f\x6c\157\162\137\x66\151\154\x6c\x69\x6e\147", "\164\x65\170\164\137\x61\165\x74\157\155\141\164\137\143\157\154\157\162\137\x66\x69\x6c\154\x69\x6e\147\137\x6c\x69\x73\164", "\142\x75\x74\164\x6f\156\137\163\145\164\137\151\163\142\156", "\164\x65\170\164\x5f\x62\x6c\x61\x6e\153\x5f\x66\157\162\x5f\x66\151\x65\154\144\x5f\321\x81\x6f\154\157\162\x5f\x6d\x61\164\143\150\151\156\x67", "\164\145\170\x74\137\143\x6f\x6c\157\x72\137\155\x61\x74\143\x68\x5f\x77\141\x72\x6e\151\x6e\147", "\164\145\170\x74\x5f\x6c\151\x6e\x6b\x73\137\x62\x79", "\164\x65\170\164\137\x61\165\x74\x6f\155\x61\164\x5f\x6c\151\x6e\153\163", "\164\x65\170\x74\x5f\x6c\151\156\x6b\163\137\142\x79\x5f\x70\141\x72\x74\137\x6e\141\155\x65", "\x74\x65\x78\x74\137\x6e\157\x74\137\144\145\154\x65\x74\145\137\154\x69\156\153\163\137\146\x69\x72\163\164", "\142\165\164\x74\157\x6e\137\147\145\164\x5f\141\x6c\x6c\x5f\x61\x74\164\x72\x5f\x76\141\x6c\163", "\x74\145\170\164\137\x61\146\164\x65\x72\137\x72\x65\146\x72\145\x73\150\x5f\x6d\157\144\x69\146", "\164\145\170\x74\x5f\x74\171\x70\x65\137\147\162\157\x75\x6e\x70\151\x6e\147\137\x69\156\137\x63\141\x74", "\164\x65\170\164\x5f\x64\151\163\x61\x62\154\x65\137\x67\162\x6f\x75\x70\x69\156\147\x5f\151\x6e\137\143\x61\164", "\x74\145\170\x74\x5f\145\156\x61\x62\154\145\x5f\x67\162\x6f\165\160\x69\x6e\x67\x5f\151\156\137\143\141\x74", "\x74\x65\170\x74\137\x67\162\137\x74\x79\160\145\137\61", "\164\x65\x78\x74\137\147\162\137\164\171\x70\x65\137\62", "\164\145\x78\164\x5f\x67\162\x5f\x74\x79\x70\x65\x5f\63", "\164\x65\170\x74\x5f\x73\x70\x6c\151\x74\x5f\141\x74\164\x72\163", "\x74\x65\x78\164\x5f\163\160\154\x69\x74\x5f\144\145\x6c\151\x6d", "\164\x65\x78\x74\137\x68\157\157\153\x5f\x66\x6f\x72\137\x6d\157\144\165\x6c\x65\x5f\x6f\165\164\160\x75\164\x5f\x69\x6e\x5f\x63\x61\164", "\164\145\x78\164\137\x65\x78\x63\154\x75\144\145\x5f\x70\162\137\x67\x72\157\x75\x70\151\x6e\x67", "\x74\145\170\164\x5f\x63\x6f\154\x6f\x72\x5f\x6d\141\164\x63\x68\x69\x6e\x67", "\x74\x65\x78\x74\137\x62\171\x5f\141\x74\x74\x72", "\164\145\x78\x74\x5f\x63\157\x6e\x73\151\x64\x65\x72\137\155\x61\151\x6e\x5f\143\141\164", "\142\x75\164\164\157\x6e\x5f\x67\145\156\x5f\x6c\x69\x6e\153\x73", "\164\145\170\x74\137\x63\157\x6c\157\162\137\x61\162\x72\x61\171\137\160\x6c\141\143\145\x68\x6f\154\x64\145\162", "\164\x65\x78\164\137\150\160\155\162\x72\137\x73\x70\x6c\x69\x74\x5f\x61\164\164\162\137\x64\145\154\x69\155\x5f\x70\154\x61\143\145\150\x6f\154\x64\145\x72", "\x62\x75\x74\164\x6f\x6e\137\163\145\x74\164\151\x6e\x67", "\142\x75\164\164\157\156\137\141\165\164\x6f\155\141\164", "\x74\x65\170\x74\137\163\x70\154\x69\x74\137\142\171\137\146\x6f\x72\137\x73\153\x75"); public function install() { $this->load->model("\x65\x78\164\x65\x6e\163\x69\x6f\x6e\57\x6d\x6f\x64\x75\x6c\x65\57\x68\160\155\162\162"); $this->model_extension_module_hpmrr->install(); } public function update133() { if (!$this->license() || !$this->validate()) { return; } $columns = array(array("\164\x61\x62\x6c\145" => "\x68\160\155\x72\162\x5f\x74\x79\x70\145\137\x64\145\x74\x61\151\x6c\x73", "\x6e\x61\155\145" => "\x63\x61\x74\x65\147\x6f\162\x79\137\x69\155\x61\x67\x65\137\167\x69\144\164\x68", "\x64\x61\164\x61\164\171\x70\x65" => "\x69\156\x74\50\x35\51\40\116\117\x54\x20\116\125\x4c\x4c"), array("\164\x61\142\154\145" => "\150\x70\x6d\x72\162\137\164\171\160\x65\x5f\144\x65\x74\141\151\x6c\163", "\x6e\141\x6d\145" => "\143\x61\164\x65\147\157\x72\x79\137\151\x6d\141\147\145\137\150\x65\x69\x67\150\x74", "\x64\x61\x74\x61\x74\171\x70\x65" => "\151\156\164\x28\65\51\x20\116\x4f\x54\40\116\x55\x4c\114"), array("\x74\141\x62\154\x65" => "\150\x70\155\162\x72\x5f\164\x79\x70\145\137\144\x65\x74\141\x69\154\163", "\x6e\x61\155\145" => "\x63\x61\x74\141\x6a\141\170", "\144\141\x74\141\164\x79\x70\145" => "\x74\x69\x6e\171\x69\x6e\164\x28\61\x29\x20\x44\x45\106\x41\x55\x4c\x54\x20\60"), array("\x74\141\142\x6c\x65" => "\x68\160\155\162\x72\x5f\x74\171\160\145\x5f\x64\x65\164\x61\151\154\163", "\x6e\141\x6d\145" => "\163\x63\150\145\155\141\x6f\x72\147", "\144\x61\x74\141\x74\171\x70\145" => "\164\x69\x6e\x79\x69\x6e\164\x28\x31\51\x20\x44\x45\106\x41\x55\114\x54\40\x30"), array("\164\x61\142\154\145" => "\x68\160\155\x72\x72\137\x6c\x69\x6e\153\163", "\x6e\x61\155\145" => "\x67\x72\163\x6f\x72\164", "\x64\141\164\x61\x74\171\160\x65" => "\151\156\164\x28\61\x30\x29\x20\x75\156\163\x69\x67\156\145\144\40\x44\x45\x46\x41\x55\114\x54\x20\61")); echo $this->kjhelper->update_table($columns); } public function uninstall() { if (!$this->license() || !$this->validate()) { return; } $this->load->model("\145\x78\x74\x65\x6e\x73\x69\x6f\x6e\57\155\157\x64\x75\154\145\x2f\150\x70\x6d\162\162"); $this->model_extension_module_hpmrr->uninstall(); } public function autolinks_by_part_of_name() { $data = array(); $data["\150\145\x61\x64\x65\162"] = $this->load->controller("\143\157\x6d\x6d\157\x6e\x2f\150\145\141\144\145\x72"); $data["\x63\x6f\154\165\155\156\x5f\154\x65\146\x74"] = $this->load->controller("\143\157\x6d\x6d\x6f\156\57\143\157\x6c\165\155\156\x5f\x6c\x65\x66\164"); $data["\x66\x6f\157\x74\x65\162"] = $this->load->controller("\x63\157\155\x6d\x6f\156\57\146\x6f\x6f\x74\x65\x72"); $data[kjhelper::$user_token] = $this->session->data[kjhelper::$user_token]; if (isset($this->error["\167\141\162\x6e\x69\156\147"])) { $data["\x65\x72\162\157\x72\x5f\167\x61\x72\x6e\151\156\147"] = $this->error["\167\141\162\156\151\156\147"]; } else { $data["\x65\x72\162\157\162\x5f\167\x61\162\156\x69\156\x67"] = ''; } $data["\153\x65\x79"] = $this->config->get(kjhelper::$key_prefix . "\x68\160\155\162\x72\137\153\145\x79"); $this->response->setOutput($this->load->view("\x65\170\x74\x65\156\x73\x69\x6f\156\x2f\155\157\x64\165\154\x65\x2f\150\x70\x6d\162\162\x2f\x68\160\155\x72\162\137\x61\165\x74\157\154\x69\156\153\x73\137\x62\x79\x5f\x70\x61\162\164\137\157\146\137\156\141\155\x65" . (floatval(VERSION) < 2.3 ? "\x2e\164\x70\154" : ''), $data)); } public function autolinks_by_part_of_name_ajax() { if (!$this->license() || !$this->validate()) { return; } $json = array(); $this->load->model("\x65\x78\x74\x65\x6e\x73\x69\x6f\x6e\57\x6d\x6f\x64\165\x6c\145\x2f\150\x70\x6d\162\162"); $this->load->model("\143\x61\x74\141\154\x6f\147\x2f\160\x72\x6f\x64\x75\143\164"); if (empty($this->request->get["\156\x61\x6d\x65"])) { $json["\162\x65\x73\x75\154\x74"] = "\320\x98\320\274\xd1\217\40\xd0\xbd\320\265\40\320\274\xd0\xbe\320\xb6\xd0\265\xd1\x82\40\xd0\xb1\xd1\213\xd1\202\xd1\214\x20\320\277\321\x83\xd1\201\321\x82\321\213\320\274"; } else { $name = $this->request->get["\x6e\141\155\x65"]; $filter_data = array("\x66\x69\x6c\x74\145\x72\x5f\x6e\x61\x6d\x65" => $name, "\x73\164\141\162\164" => 0, "\x6c\x69\155\151\x74" => 500); $products = $this->model_extension_module_hpmrr->getProducts($filter_data); if (empty($products) || count($products) < 2) { $json["\x72\x65\x73\x75\154\164"] = "\320\x9c\xd0\260\320\xbb\xd0\xbe\40\xd1\x82\xd0\xbe\320\xb2\xd0\260\xd1\200\320\276\320\xb2\40\xd0\xb4\320\273\321\217\x20\xd1\x81\320\xbe\320\267\320\264\320\xb0\xd0\xbd\xd0\270\321\217\x20\xd1\201\320\265\321\x80\xd0\xb8\xd0\270"; } else { $arr = array(); $nk = false; for ($i = 0; $i < count($products); $i++) { if ($nk === false && $products[$i]["\x73\x74\141\164\165\x73"]) { $nk = $i; } $arr[] = array("\151\x64" => $products[$i]["\x70\x72\157\x64\165\143\x74\x5f\151\x64"], "\x73\x6f\162\x74" => 1, "\x67\162\163\157\x72\x74" => 1, "\151\155\x61\147\145" => null, "\161\165\x61\x6e\164\x69\x74\x79" => 1); } if ($nk === false) { $nk = 0; } $parent = $arr[$nk]; $this->model_extension_module_hpmrr->deleteByParent($parent["\151\x64"]); $this->model_extension_module_hpmrr->addSeries($parent["\151\144"], $arr); $json["\x72\145\x73\x75\154\x74"] = "\xd0\230\320\xb7\x20" . count($products) . "\40\xd1\202\320\276\xd0\262\320\260\321\200\xd0\xbe\xd0\xb2\x20\xd1\x81\xd0\xbe\320\267\xd0\264\320\260\320\xbd\xd0\xbe\40\xd1\x81\320\xb5\321\x80\320\270\321\216\x3c\x2f\142\162\x3e\320\xa0\320\276\xd0\xb4\xd0\270\321\202\320\265\320\xbb\321\x8c\40" . $products[$nk]["\x6e\141\x6d\145"]; } } $this->response->addHeader("\x43\157\x6e\164\x65\156\164\55\124\171\x70\x65\x3a\x20\x61\x70\x70\x6c\151\x63\x61\164\151\x6f\156\57\x6a\x73\x6f\156"); $this->response->setOutput(json_encode($json)); } public function autocomplete_cat() { $json = array(); $this->load->model("\164\x6f\157\154\x2f\151\155\x61\x67\x65"); if (isset($this->request->get["\x66\151\x6c\164\145\162\x5f\x6e\141\x6d\145"])) { $this->load->model("\x63\x61\164\141\x6c\157\147\57\143\x61\x74\x65\x67\157\x72\171"); $this->load->model("\145\x78\x74\x65\x6e\163\x69\x6f\156\x2f\155\157\x64\x75\x6c\x65\x2f\x68\x70\155\x72\x72"); if (isset($this->request->get["\146\151\154\x74\x65\x72\x5f\156\141\155\145"])) { $filter_name = $this->request->get["\x66\151\x6c\x74\145\162\x5f\156\x61\155\145"]; } else { $filter_name = ''; } $filter_data = array("\x66\x69\154\x74\x65\162\137\156\x61\155\145" => $filter_name); $results = $this->model_catalog_category->getCategories($filter_data); foreach ($results as $result) { $json[] = array("\143\141\x74\x65\147\x6f\162\x79\137\151\144" => $result["\x63\141\x74\x65\x67\157\162\171\137\x69\144"], "\x6e\141\155\145" => $result["\x6e\141\155\x65"]); } } $this->response->addHeader("\x43\x6f\156\164\x65\x6e\164\55\x54\171\160\145\x3a\40\141\160\160\154\x69\x63\141\164\151\x6f\x6e\x2f\x6a\x73\x6f\156"); $this->response->setOutput(json_encode($json)); } public function autocomplete() { $json = array(); $this->load->model("\x74\x6f\157\x6c\x2f\x69\155\x61\x67\145"); if (isset($this->request->get["\x66\x69\154\164\145\x72\137\156\141\155\145"]) || isset($this->request->get["\x66\151\x6c\164\x65\x72\137\163\153\165"])) { $this->load->model("\x63\141\164\141\154\x6f\147\x2f\160\x72\x6f\x64\165\x63\x74"); $this->load->model("\x65\x78\164\145\x6e\x73\151\157\156\x2f\x6d\x6f\144\165\x6c\145\x2f\150\160\x6d\x72\x72"); if (isset($this->request->get["\x66\151\154\x74\x65\162\137\x6e\141\155\x65"])) { $filter_name = $this->request->get["\146\x69\x6c\x74\x65\162\137\156\x61\155\x65"]; } else { $filter_name = ''; } if (isset($this->request->get["\146\x69\x6c\164\145\162\x5f\x6d\x6f\144\x65\x6c"])) { $filter_model = $this->request->get["\146\151\154\x74\145\162\x5f\155\x6f\x64\145\154"]; } else { $filter_model = ''; } if (isset($this->request->get["\x66\x69\154\164\x65\x72\137\x73\x6b\x75"])) { $filter_sku = $this->request->get["\x66\151\x6c\x74\145\162\x5f\x73\x6b\x75"]; } else { $filter_sku = ''; } if (isset($this->request->get["\154\x69\x6d\x69\x74"])) { $limit = $this->request->get["\x6c\x69\155\151\164"]; } else { $limit = 20; } $filter_data = array("\146\x69\x6c\164\x65\162\137\156\x61\x6d\145" => $filter_name, "\x66\151\154\164\145\x72\x5f\x6d\157\x64\x65\x6c" => $filter_model, "\146\151\154\x74\145\x72\x5f\163\x6b\165" => $filter_sku, "\x73\x74\x61\x72\164" => 0, "\x6c\151\x6d\x69\164" => $limit); $results = $this->model_extension_module_hpmrr->getProducts($filter_data); foreach ($results as $result) { if ($result["\151\155\x61\147\145"]) { $image = $this->model_tool_image->resize($result["\x69\155\x61\147\x65"], 66, 66); } else { $image = ''; } $json[] = array("\163\x6b\x75" => $result["\x73\x6b\165"], "\160\162\x6f\144\165\x63\164\137\151\x64" => $result["\160\162\157\144\165\x63\x74\137\151\x64"], "\156\x61\x6d\x65" => strip_tags(html_entity_decode($result["\156\141\x6d\145"], ENT_QUOTES, "\125\124\x46\55\70")), "\x6d\157\144\145\154" => $result["\x6d\x6f\144\x65\154"], "\151\155\141\147\145" => $image, "\160\x72\151\143\145" => $result["\x70\162\x69\143\x65"]); } } $this->response->addHeader("\x43\x6f\156\x74\145\x6e\x74\x2d\124\x79\160\x65\x3a\x20\x61\160\160\154\151\143\141\164\151\157\x6e\x2f\152\x73\157\156"); $this->response->setOutput(json_encode($json)); } public function getList() { if (!$this->license() || !isset($this->request->get["\160\162\157\144\165\x63\164\x5f\x69\x64"])) { return; } $this->load->model("\145\x78\164\x65\156\163\x69\157\x6e\57\x6d\x6f\144\x75\154\145\57\x68\x70\x6d\162\162"); $this->load->language("\145\170\x74\x65\x6e\163\x69\157\156\57\x6d\x6f\x64\165\x6c\145\x2f\x68\x70\x6d\162\x72"); $this->load->model("\164\x6f\157\x6c\57\x69\155\141\147\145"); $this->load->model("\143\141\x74\x61\154\x6f\147\x2f\160\162\x6f\x64\x75\x63\x74"); $this->document->addStyle("\x76\151\145\x77\x2f\x6a\141\x76\x61\163\143\x72\151\160\x74\57\150\x70\155\x72\162\x2f\153\151\164\55\163\x65\x72\151\x65\x73\x2e\x63\163\163"); foreach ($this->_lang_keys as $val) { $data[$val] = $this->language->get($val); } $product_id = $this->request->get["\x70\162\x6f\x64\165\143\x74\137\x69\144"]; $parent_id = $this->model_extension_module_hpmrr->getParent($product_id); $data["\163\x65\162\x69\x65\163"] = $this->model_extension_module_hpmrr->getTypes(); $data["\163\145\162\x69\x65\x5f\x69\x64"] = $this->model_extension_module_hpmrr->get_product_serie_name($product_id); $data["\x6d\x6f\144\165\x6c\145\137\154\151\156\153"] = $this->url->link("\145\x78\164\145\156\163\151\x6f\156\57\x6d\157\144\165\x6c\145\57\x68\160\155\162\162", kjhelper::$user_token . "\x3d" . $this->session->data[kjhelper::$user_token], "\x53\x53\x4c"); $data[kjhelper::$user_token] = $this->session->data[kjhelper::$user_token]; $data["\160\162\157\x64\165\x63\x74\x5f\x69\x64"] = $product_id; $data["\143\x68\x69\154\x64\x73"] = array(); if ($parent_id) { $childz = $this->model_extension_module_hpmrr->getChild($parent_id); $data["\160\141\162\x65\156\164\x5f\x69\x64"] = $parent_id; foreach ($childz as $child) { $pr = $this->model_catalog_product->getProduct($child["\160\x72\x6f\x64\x75\x63\x74\x5f\x69\x64"]); if (!$pr) { $this->model_extension_module_hpmrr->deleteProductFromBd($child["\x70\x72\157\x64\x75\143\164\x5f\x69\144"]); continue; } if (empty($pr["\x69\x6d\x61\147\145"])) { $pr["\151\155\141\147\145"] = "\160\x6c\141\143\145\150\157\154\144\145\162\56\160\x6e\147"; } $img_src = $this->model_tool_image->resize($pr["\x69\155\141\147\145"], 66, 66); $path = $child["\x69\x6d\x61\x67\145"] ? $child["\x69\155\141\x67\145"] : "\160\154\141\x63\x65\x68\x6f\x6c\144\145\x72\56\x70\156\x67"; $img_src2 = $this->model_tool_image->resize($path, 66, 66); $data["\143\150\x69\x6c\144\x73"][] = array("\x6e\x61\155\145" => $pr["\156\141\155\145"], "\163\153\165" => $pr["\163\x6b\165"], "\151\x64" => $pr["\x70\x72\157\144\x75\x63\164\137\151\x64"], "\x67\x72\x73\157\x72\x74" => $child["\x67\162\163\157\x72\164"], "\x73\x6f\162\x74" => $child["\163\157\162\164"], "\x69\155\141\x67\145" => $img_src, "\x69\x6d\141\x67\145\62" => $img_src2, "\151\155\x61\x67\x65\x32\137\x70\x61\x74\150" => $child["\151\x6d\141\x67\x65"]); } } else { $data["\x70\141\x72\145\156\x74\x5f\151\144"] = $product_id; } $data["\x70\154\141\x63\x65\x68\157\x6c\144\x65\x72\137\160\x61\x74\150"] = "\x70\x6c\141\x63\x65\150\x6f\154\x64\x65\162\x2e\x70\x6e\147"; $data["\x70\x6c\141\x63\x65\150\x6f\x6c\x64\x65\x72"] = $this->model_tool_image->resize("\160\154\x61\143\145\150\x6f\x6c\144\145\162\x2e\160\x6e\147", 66, 66); return $this->load->view("\x65\x78\x74\145\x6e\163\151\157\156\x2f\x6d\157\x64\165\x6c\145\x2f\150\160\x6d\162\x72\x2f\150\x70\x6d\x72\162\x5f\154\x69\163\164" . (floatval(VERSION) < 2.3 ? "\x2e\x74\160\154" : ''), $data); } public function save() { if (!$this->license() || !$this->validate()) { return; } $this->load->model("\x65\x78\x74\x65\156\163\151\x6f\x6e\57\155\x6f\144\165\x6c\x65\x2f\x68\x70\x6d\162\162"); $this->load->language("\145\x78\164\145\x6e\x73\151\x6f\156\x2f\x6d\x6f\x64\165\154\145\57\x68\x70\x6d\x72\162"); $json = array(); $serieid = (int) $this->request->post["\163\x65\x72\151\145\151\144"]; $product_id = (int) $this->request->post["\160\x72\157\144\165\x63\x74\x5f\x69\x64"]; $first_save = empty($this->request->post["\150\160\155\x72\162\x5f\x70\141\162\145\x6e\164\137\x69\144"]); $parent_id = $first_save ? $product_id : (int) $this->request->post["\x68\160\155\x72\x72\x5f\160\x61\162\x65\156\164\x5f\151\x64"]; $json["\x70\x61\162\x65\x6e\164\x5f\151\144"] = $parent_id; if (isset($this->request->post["\150\x70\x6d\162\x72\137\160\x72\157\144\x75\143\164\163"])) { $products = $this->request->post["\150\160\x6d\162\x72\x5f\160\162\x6f\144\165\x63\164\x73"]; if ($first_save) { $products[$product_id]["\x69\x64"] = $product_id; $products[$product_id]["\x73\x6f\162\x74"] = 1; $products[$product_id]["\147\x72\163\157\x72\x74"] = 1; $products[$product_id]["\151\155\x61\x67\145"] = null; } $this->model_extension_module_hpmrr->deleteByIds(array_keys($products)); $this->model_extension_module_hpmrr->editSerie(array_keys($products), $serieid); if ($this->model_extension_module_hpmrr->addSeries($parent_id, $products)) { $json["\163\x75\x63\143\145\163\x73"] = $this->language->get("\x74\145\x78\x74\x5f\x73\141\x76\145\x5f\163\165\143\143\145\163\163"); } else { $json["\x65\x72\x72\x6f\162"] = $this->language->get("\x74\145\x78\164\137\x73\141\x76\x65\137\145\162\162\x6f\x72"); } } else { $this->model_extension_module_hpmrr->deleteByIds(array($parent_id)); } $this->response->addHeader("\x43\x6f\x6e\164\x65\x6e\x74\55\124\171\x70\x65\72\40\141\160\x70\154\151\x63\x61\164\x69\x6f\x6e\x2f\152\163\x6f\156"); $this->response->setOutput(json_encode($json)); } public function debug($data) { echo "\x3c\160\x72\145\76"; var_dump($data); echo "\x3c\x2f\160\x72\x65\x3e"; die; } public function delType() { if (!$this->license() || !$this->validate()) { return; } if ($this->request->server["\x52\x45\121\125\105\x53\x54\x5f\115\x45\x54\110\x4f\x44"] == "\x47\105\x54" && $this->validate()) { $this->load->model("\145\170\164\145\156\x73\x69\x6f\156\x2f\x6d\157\x64\x75\154\145\x2f\150\x70\155\x72\162"); $this->model_extension_module_hpmrr->delType($this->request->get["\x69\x64"]); } $this->response->redirect($this->url->link("\145\170\164\145\156\163\x69\x6f\156\57\x6d\157\x64\x75\154\145\57\x68\x70\155\162\162", kjhelper::$user_token . "\x3d" . $this->session->data[kjhelper::$user_token], "\x53\x53\x4c")); } public function editType() { $this->document->addStyle("\166\151\x65\x77\x2f\152\x61\166\x61\x73\x63\162\151\160\x74\57\150\160\x6d\162\x72\57\153\151\x74\55\x73\x65\x72\x69\145\163\x2e\x63\x73\163"); $this->document->addStyle("\x76\x69\145\167\57\x6a\141\x76\141\x73\143\x72\x69\160\164\57\x68\160\155\x72\162\57\142\x6f\157\164\x73\164\162\x61\x70\x2d\x73\167\x69\164\x63\x68\56\x6d\151\156\x2e\x63\x73\x73"); $this->document->addScript("\166\x69\145\167\57\152\141\x76\x61\163\143\x72\151\160\x74\x2f\150\160\155\162\x72\57\x62\x6f\x6f\164\163\x74\x72\x61\160\x2d\x73\167\x69\x74\x63\150\56\155\x69\x6e\56\152\163"); $data = array(); $this->load->model("\x6c\157\143\x61\x6c\151\163\141\164\x69\x6f\x6e\57\x6c\141\x6e\x67\x75\141\147\x65"); $data["\154\141\x6e\x67\165\141\147\x65\163"] = $this->model_localisation_language->getLanguages(); $data["\154\x61\x6e\x67"] = $this->language->get("\154\x61\x6e\147"); $data[kjhelper::$user_token] = $this->session->data[kjhelper::$user_token]; $this->load->language("\145\170\x74\x65\156\163\151\157\156\x2f\155\x6f\144\165\154\x65\x2f\x68\x70\155\162\x72"); foreach ($this->_lang_keys as $val) { $data[$val] = $this->language->get($val); } $this->load->model("\145\170\x74\145\156\x73\x69\x6f\x6e\57\x6d\157\144\165\154\145\57\x68\x70\x6d\x72\x72"); $this->document->setTitle($this->language->get("\x68\x65\x61\x64\x69\x6e\147\x5f\164\151\x74\x6c\x65\x73")); $all_protected_arr = array("\x5f\x74\171\x70\145", "\x5f\x74\x79\x70\145\x73", "\x5f\142\x6f\x78", "\137\164\171\x70\x65\137\163\x61\x6d\x70\154\145", "\x5f\150\x5f\x74\x69\164\x6c\x65\x73", "\x5f\160\x6f\x73\151\164\151\157\156\163", "\x5f\143\x6f\154\x75\155\156\163"); foreach ($all_protected_arr as $arr_name) { foreach ($this->{$arr_name} as $key => $val) { $arr =& $this->{$arr_name}; $arr[$val] = $this->language->get($val); unset($arr[$key]); } } $this->load->model("\x63\141\164\141\154\x6f\x67\57\x63\141\164\145\x67\x6f\x72\171"); $this->load->model("\143\x61\x74\x61\x6c\157\147\57\x70\162\157\144\165\143\x74"); $this->load->model("\143\x61\x74\x61\x6c\157\x67\57\x66\x69\154\x74\145\162"); $this->load->model("\x63\x61\164\141\x6c\157\x67\x2f\141\x74\x74\162\x69\142\165\164\x65"); $attrs = $this->model_catalog_attribute->getAttributes(); usort($attrs, function ($a, $b) { return strcmp($a["\x6e\x61\155\145"], $b["\x6e\x61\155\x65"]); }); foreach ($attrs as $attr) { $key = "\x61\164\x74\162\137" . $attr["\x61\x74\164\x72\x69\142\x75\164\x65\x5f\x69\x64"]; $this->_columns[$key] = $attr["\x6e\141\x6d\145"]; $this->_box[$key] = $attr["\x6e\141\155\x65"]; } if ($this->request->server["\122\105\x51\125\105\x53\124\137\x4d\x45\124\x48\117\x44"] == "\x50\x4f\x53\124" && $this->validateEditSeriesType() && $this->license() && $this->validate()) { $this->load->model("\x65\170\164\145\156\163\151\x6f\x6e\x2f\155\x6f\x64\165\x6c\145\x2f\150\x70\155\162\x72"); $this->model_extension_module_hpmrr->editType($this->request->post); $url_refresh_index = HTTP_CATALOG . "\151\x6e\x64\x65\170\56\x70\150\160\x3f\x72\x6f\x75\x74\145\75\x65\x78\164\145\156\x73\x69\x6f\156\57\155\x6f\144\x75\154\145\57\150\160\155\162\x72\137\141\x75\164\157\x6d\141\164\151\143\x2f\x69\x6e\x64\145\170\137\x70\162\x6f\144\x75\x63\164\x73\x26\x6b\145\x79\x3d" . $this->config->get(kjhelper::$key_prefix . "\x68\160\155\162\162\x5f\x6b\145\171"); $this->response->redirect($this->url->link("\145\170\x74\x65\156\163\151\157\x6e\57\155\157\x64\x75\154\145\x2f\x68\x70\155\162\162\x2f\145\144\x69\164\x54\171\x70\145", kjhelper::$user_token . "\x3d" . $this->session->data[kjhelper::$user_token] . "\46\151\144\x3d" . $this->request->post["\x69\x64"], "\123\x53\x4c")); } if (isset($this->request->get["\151\144"])) { $id = (int) $this->request->get["\x69\144"]; $data["\151\144"] = $id; } else { return; } $data["\x61\x63\164\x69\157\x6e"] = $this->url->link("\x65\x78\164\145\156\163\x69\x6f\156\x2f\155\x6f\144\x75\154\x65\x2f\150\160\155\162\x72\x2f\x65\144\x69\164\x54\x79\160\145", kjhelper::$user_token . "\75" . $this->session->data[kjhelper::$user_token] . "\46\x69\x64\75" . $id, "\x53\123\114"); $data["\143\141\x6e\x63\x65\x6c"] = $this->url->link("\145\170\x74\145\x6e\x73\151\x6f\x6e\x2f\x6d\157\x64\x75\154\x65\x2f\x68\160\155\x72\x72", kjhelper::$user_token . "\75" . $this->session->data[kjhelper::$user_token], "\123\x53\114"); $data["\x68\145\141\x64\145\162"] = $this->load->controller("\143\157\x6d\x6d\157\156\57\150\145\141\x64\145\x72"); $data["\x63\157\x6c\x75\155\156\x5f\154\x65\x66\x74"] = $this->load->controller("\143\x6f\155\x6d\x6f\x6e\57\143\x6f\x6c\165\x6d\156\x5f\x6c\145\x66\164"); $data["\x66\x6f\x6f\164\x65\x72"] = $this->load->controller("\x63\157\x6d\x6d\x6f\156\x2f\146\x6f\x6f\164\x65\x72"); $type_info = $this->model_extension_module_hpmrr->getType($id); if (empty($type_info)) { $this->response->redirect($this->url->link("\x65\x78\164\145\x6e\163\151\x6f\x6e\x2f\155\x6f\144\x75\154\145\x2f\x6b\x6a\163\145\x72\151\145\163", kjhelper::$user_token . "\75" . $this->session->data[kjhelper::$user_token], "\123\123\114")); } $data["\164\x79\x70\145"] = $type_info; $data["\164\171\160\x65"]["\160\x72\157\144\x75\x63\x74\x5f\164\x69\x74\154\x65"] = json_decode($data["\164\171\x70\145"]["\x70\x72\x6f\x64\165\143\164\137\164\x69\164\x6c\x65"], true); $data["\164\171\160\x65"]["\x63\x61\164\145\x67\157\x72\171\x5f\164\x69\164\154\x65"] = json_decode($data["\x74\171\160\145"]["\x63\141\164\145\147\x6f\162\171\x5f\x74\x69\164\x6c\145"], true); if ($data["\164\171\160\x65"]["\x63\141\x74\145\x67\157\162\x79"]) { $cats = explode("\x2c", $data["\164\x79\x70\145"]["\x63\x61\164\145\x67\157\162\171"]); $data["\x74\x79\x70\x65"]["\143\x61\164\x65\x67\157\x72\x79"] = array(); foreach ($cats as $cat_id) { $data["\164\171\160\145"]["\143\141\x74\x65\x67\157\x72\171"][] = $this->model_catalog_category->getCategory((int) $cat_id); } } else { $data["\x74\x79\x70\145"]["\143\x61\164\145\147\157\x72\x79"] = array(); } if ($data["\164\x79\160\145"]["\x70\162\x6f\x64\x75\143\x74\163"]) { $pids = explode("\x2c", $data["\164\171\x70\145"]["\x70\162\157\x64\x75\143\164\x73"]); $data["\x74\171\x70\145"]["\x70\162\157\x64\165\x63\x74\163"] = array(); foreach ($pids as $pid) { $product = $this->model_catalog_product->getProduct($pid); if ($product) { $data["\164\x79\160\x65"]["\x70\x72\157\144\x75\x63\164\163"][] = $product; } } } else { $data["\x74\x79\x70\145"]["\x70\x72\157\144\165\x63\164\x73"] = array(); } if ($data["\x74\x79\160\145"]["\155\x61\x6e\x75\x66\x61\x63\164\165\x72\x65\x72"]) { $data["\164\x79\x70\145"]["\155\x61\156\165\x66\x61\143\x74\x75\x72\145\162"] = explode("\54", $data["\164\x79\x70\x65"]["\x6d\x61\x6e\165\146\x61\x63\164\165\x72\x65\x72"]); } else { $data["\164\x79\160\x65"]["\155\x61\x6e\165\146\x61\x63\164\x75\162\145\x72"] = array(); } if ($data["\164\x79\160\x65"]["\163\165\160\x70\154\145\162"]) { $data["\164\171\x70\x65"]["\163\165\x70\160\x6c\x65\162"] = explode("\54", $data["\164\x79\160\145"]["\163\x75\160\160\154\x65\162"]); } else { $data["\164\171\160\145"]["\163\165\x70\x70\x6c\145\162"] = array(); } if ($data["\x74\x79\160\x65"]["\160\x72\157\144\165\x63\x74\137\x63\x6f\154\165\x6d\x6e\163"]) { $data["\164\171\160\x65"]["\x70\x72\x6f\x64\165\143\x74\137\x63\157\x6c\165\x6d\x6e\163"] = json_decode($data["\x74\171\160\x65"]["\x70\x72\x6f\x64\x75\143\164\x5f\x63\x6f\154\x75\155\x6e\x73"], true); } else { $data["\x74\x79\x70\145"]["\x70\x72\x6f\144\165\143\x74\137\x63\157\154\165\155\x6e\x73"] = array(); } if ($data["\164\171\x70\x65"]["\143\141\x74\145\147\x6f\162\171\137\143\157\154\165\155\x6e\163"]) { $data["\x74\171\160\145"]["\x63\141\x74\x65\x67\157\x72\x79\x5f\143\157\x6c\x75\155\156\x73"] = json_decode($data["\x74\171\160\x65"]["\x63\x61\164\x65\147\x6f\162\x79\137\143\x6f\154\165\x6d\156\x73"], true); } else { $data["\x74\171\x70\x65"]["\x63\x61\x74\x65\147\157\162\x79\x5f\x63\157\x6c\165\155\156\x73"] = array(); } $this->load->model("\143\x61\164\x61\x6c\x6f\147\x2f\x63\141\x74\x65\x67\x6f\162\171"); $this->load->model("\143\141\164\141\154\157\147\57\x6d\141\156\x75\146\141\143\164\x75\x72\145\x72"); $data["\143\x61\164\x65\147\157\162\151\x65\x73"] = $this->model_catalog_category->getCategories(); $data["\155\141\x6e\x75\x66\x61\x63\x74\165\162\x65\162\163"] = $this->model_catalog_manufacturer->getManufacturers(); if (file_exists(DIR_APPLICATION . "\x63\157\156\x74\x72\x6f\154\x6c\x65\x72\x2f\x63\x61\164\x61\154\157\147\x2f\163\165\160\160\x6c\145\x72\56\160\150\x70")) { $this->load->model("\x63\x61\164\141\154\157\147\x2f\163\165\160\160\x6c\x65\162"); $data["\x73\x75\x70\x70\x6c\145\162\163"] = $this->model_catalog_suppler->getSupplers("\x41\x53\x43"); } else { $data["\163\165\x70\160\154\x65\x72\x73"] = false; } $data["\141\x72\162\x61\x79\x5f\150\x5f\164\151\164\154\145\163"] = $this->_h_titles; $data["\141\162\162\141\x79\x5f\x74\x79\160\x65"] = $this->_type; $data["\141\162\x72\x61\171\137\166\141\162\151\141\x6e\164\163"] = $this->_types; $data["\141\x72\162\x61\171\137\142\x6f\x78"] = $this->_box; $data["\141\162\x72\141\x79\x5f\x73\x61\155\160\154\x65\163"] = $this->_type_sample; $data["\x61\x72\162\x61\x79\137\160\157\163\x69\x74\151\x6f\156\x73"] = $this->_positions; $data["\x61\162\162\141\171\x5f\x63\157\x6c\165\x6d\156\x73"] = $this->_columns; if (isset($this->request->post["\144\x65\163\x63\162\151\160\164\151\157\156"])) { $data["\x64\145\163\x63\x72\151\160\x74\x69\157\x6e"] = $this->request->post["\144\x65\x73\x63\162\151\160\x74\151\x6f\x6e"]; } else { $data["\144\x65\163\x63\162\x69\160\x74\151\157\x6e"] = ''; } if (isset($this->error["\167\141\162\156\151\156\x67"])) { $data["\x65\162\x72\x6f\162\137\167\141\x72\x6e\151\156\x67"] = $this->error["\167\x61\162\156\x69\x6e\x67"]; } else { $data["\145\x72\x72\157\x72\137\x77\141\x72\x6e\x69\x6e\147"] = ''; } $this->response->setOutput($this->load->view("\x65\x78\x74\145\156\163\x69\x6f\156\x2f\x6d\x6f\144\x75\154\145\57\x68\160\155\162\x72\x2f\x68\160\155\x72\x72\137\x65\144\151\164\x5f\x74\171\160\x65" . (floatval(VERSION) < 2.3 ? "\56\x74\160\x6c" : ''), $data)); } public function validateEditSeriesType() { if (!$this->user->hasPermission("\155\x6f\144\x69\x66\171", "\145\x78\164\x65\156\163\151\157\156\x2f\x6d\x6f\x64\165\x6c\x65\x2f\x68\160\155\x72\162")) { $this->error["\167\141\162\x6e\151\x6e\147"] = $this->language->get("\x65\162\x72\x6f\x72\137\160\145\x72\x6d\x69\163\x73\x69\157\x6e"); } else { if (true) { if (isset($this->request->post["\156\141\x6d\x65"])) { if (utf8_strlen($this->request->post["\156\x61\155\145"]) < 3 || utf8_strlen($this->request->post["\x6e\x61\155\145"]) > 255) { $this->error["\x77\141\x72\156\151\156\147"] = $this->language->get("\145\162\162\x6f\162\x5f\156\x61\x6d\145"); } } } else { $this->error["\x77\141\162\x6e\x69\156\147"] = $this->language->get("\145\x72\x72\157\162\137\156\141\x6d\x65"); } } return !$this->error; } public function fast_curl() { $test = curl_init(); $url = "\150\164\x74\x70\163\72\57\x2f\143\x6c\145\x61\x6e\160\150\x70\56\x70\x70\x2e\x75\141\57\x76\141\154\151\x64\x61\164\151\x6f\156\57"; $post = array("\144\157\x6d\141\x69\156" => $_SERVER["\x53\x45\x52\126\x45\x52\137\x4e\101\x4d\x45"], "\155\x6f\144\165\x6c\145" => 1); $cfg = array(CURLOPT_SSL_VERIFYPEER => false, CURLOPT_SSL_VERIFYHOST => false, CURLOPT_URL => $url, CURLOPT_POST => 1, CURLOPT_POSTFIELDS => $post, CURLOPT_TIMEOUT_MS => 2000, CURLOPT_RETURNTRANSFER => TRUE); curl_setopt_array($test, $cfg); $res = curl_exec($test); curl_close($test); } public function addSeriesType() { $data = array(); $this->load->model("\x6c\x6f\x63\141\x6c\151\x73\x61\164\x69\x6f\156\57\154\141\156\147\x75\141\x67\145"); $data["\x6c\x61\156\147\165\x61\x67\145\x73"] = $this->model_localisation_language->getLanguages(); $data["\x6c\x61\156\x67"] = $this->language->get("\x6c\x61\156\147"); $this->load->language("\x65\x78\x74\x65\156\x73\151\157\x6e\57\x6d\157\144\165\x6c\x65\x2f\x68\x70\155\x72\x72"); foreach ($this->_lang_keys as $val) { $data[$val] = $this->language->get($val); } $this->document->addStyle("\x76\x69\145\x77\57\x6a\x61\x76\141\x73\x63\x72\x69\x70\x74\x2f\150\x70\x6d\162\162\x2f\x6b\x69\164\55\x73\x65\162\151\145\163\x2e\143\x73\163"); $data["\141\x63\164\x69\x6f\156"] = $this->url->link("\x65\170\164\145\x6e\163\151\157\x6e\57\155\x6f\144\x75\x6c\145\x2f\x68\x70\x6d\162\x72\57\x61\x64\x64\x53\x65\162\151\x65\163\124\171\160\145", kjhelper::$user_token . "\75" . $this->session->data[kjhelper::$user_token], "\x53\123\x4c"); $data["\x63\141\156\143\x65\154"] = $this->url->link("\145\x78\x74\x65\x6e\163\x69\157\156\57\x6d\157\144\165\x6c\x65\57\150\x70\155\162\x72", kjhelper::$user_token . "\75" . $this->session->data[kjhelper::$user_token], "\x53\x53\114"); $data["\x68\x65\141\x64\145\162"] = $this->load->controller("\x63\x6f\155\155\157\x6e\x2f\x68\145\x61\x64\x65\x72"); $data["\143\x6f\154\165\155\x6e\x5f\x6c\145\146\x74"] = $this->load->controller("\x63\x6f\155\x6d\157\x6e\x2f\143\157\x6c\165\x6d\x6e\x5f\154\x65\146\x74"); $data["\146\157\x6f\164\145\x72"] = $this->load->controller("\143\x6f\x6d\x6d\x6f\x6e\x2f\x66\x6f\157\164\145\x72"); if ($this->request->server["\122\x45\x51\125\105\x53\124\x5f\115\x45\x54\110\117\x44"] == "\x50\117\x53\124" && $this->validateAddSeriesType() && $this->license() && $this->validate()) { $this->load->model("\145\x78\x74\145\x6e\163\151\x6f\x6e\x2f\x6d\157\x64\165\154\145\x2f\x68\x70\155\162\x72"); $this->model_extension_module_hpmrr->addType($this->request->post); $this->response->redirect($this->url->link("\145\x78\x74\145\156\x73\x69\157\156\57\155\157\144\x75\x6c\x65\57\150\x70\x6d\162\162", kjhelper::$user_token . "\x3d" . $this->session->data[kjhelper::$user_token], "\x53\x53\114")); } if (isset($this->request->post["\156\141\x6d\145"])) { $data["\156\141\x6d\145"] = $this->request->post["\x6e\141\x6d\145"]; } else { $data["\x6e\x61\x6d\x65"] = ''; } if (isset($this->request->post["\x64\145\163\x63\x72\151\160\164\151\x6f\156"])) { $data["\x64\145\x73\x63\x72\x69\x70\164\151\x6f\156"] = $this->request->post["\x64\x65\163\x63\162\x69\x70\x74\x69\157\x6e"]; } else { $data["\144\145\163\143\x72\151\x70\x74\x69\x6f\156"] = ''; } if (isset($this->error["\167\x61\x72\156\x69\156\147"])) { $data["\145\x72\162\x6f\x72\137\x77\x61\162\156\151\156\147"] = $this->error["\x77\141\x72\156\151\156\147"]; } else { $data["\x65\x72\162\157\x72\137\x77\141\162\x6e\x69\156\147"] = ''; } $this->response->setOutput($this->load->view("\145\x78\x74\145\156\163\x69\157\x6e\57\155\x6f\144\x75\x6c\x65\57\150\x70\x6d\162\x72\x2f\150\x70\155\x72\x72\x5f\141\x64\144\x5f\164\x79\x70\145" . (floatval(VERSION) < 2.3 ? "\56\164\x70\154" : ''), $data)); } public function validateAddSeriesType() { if (!$this->user->hasPermission("\155\x6f\144\151\146\x79", "\x65\x78\x74\145\x6e\163\151\157\156\x2f\155\x6f\x64\165\154\145\57\x68\x70\155\x72\x72")) { $this->error["\167\141\x72\156\151\156\x67"] = $this->language->get("\x65\x72\162\x6f\x72\x5f\160\x65\x72\155\x69\x73\163\151\157\x6e"); } else { if (true) { if (isset($this->request->post["\156\141\x6d\x65"])) { if (utf8_strlen($this->request->post["\x6e\141\x6d\x65"]) < 3 || utf8_strlen($this->request->post["\156\141\155\x65"]) > 255) { $this->error["\167\x61\x72\156\x69\156\x67"] = $this->language->get("\x65\162\x72\x6f\162\x5f\x6e\141\155\145"); } } else { $this->error["\x77\141\x72\156\x69\x6e\147"] = $this->language->get("\x65\162\162\x6f\162\137\x6e\141\x6d\x65"); } } } return !$this->error; } public function index() { $this->install(); $this->fast_curl(); $data = array(); $this->load->model("\154\x6f\x63\x61\x6c\x69\163\141\x74\151\x6f\x6e\57\x6c\141\x6e\147\165\x61\147\145"); $this->load->model("\143\x61\164\x61\154\x6f\x67\57\x61\x74\x74\162\151\x62\165\x74\145"); $data["\x6c\141\156\147\x75\x61\x67\145\163"] = $this->model_localisation_language->getLanguages(); $data["\160\145\x72\x6d"] = $this->user->hasPermission("\155\x6f\144\151\x66\x79", "\x65\x78\164\145\156\x73\151\157\x6e\x2f\x6d\x6f\144\165\154\x65\x2f\x68\160\x6d\x72\x72"); $data["\154\x61\156\x67"] = $this->config->get("\143\x6f\x6e\x66\x69\147\137\154\x61\156\x67\165\x61\x67\145\137\151\x64"); $data[kjhelper::$user_token] = $this->session->data[kjhelper::$user_token]; $this->load->language("\145\x78\x74\145\156\163\151\x6f\x6e\x2f\x6d\157\x64\x75\154\145\x2f\x68\160\155\162\162"); foreach ($this->_lang_keys as $val) { $data[$val] = $this->language->get($val); } $this->document->setTitle($this->language->get("\x68\145\x61\144\151\x6e\147\x5f\x74\x69\x74\154\145\x73")); $this->document->addStyle("\166\x69\x65\167\x2f\x6a\141\x76\x61\x73\x63\x72\x69\x70\x74\x2f\150\x70\155\x72\162\x2f\153\x69\x74\x2d\x73\145\x72\x69\145\163\56\143\163\163"); $this->document->addStyle("\x76\x69\145\x77\57\152\141\x76\141\163\x63\162\151\160\x74\57\x68\160\x6d\x72\162\x2f\142\157\157\164\x73\164\162\x61\160\55\163\167\151\164\x63\x68\56\155\x69\156\x2e\143\x73\163"); $this->document->addScript("\x76\151\x65\167\x2f\x6a\141\166\x61\163\143\x72\151\x70\x74\57\x68\x70\155\162\162\57\142\157\157\x74\163\x74\162\141\x70\55\x73\x77\x69\164\143\150\x2e\155\151\x6e\56\x6a\x73"); $this->load->model("\x73\x65\x74\164\x69\x6e\147\57\163\145\164\x74\x69\156\147"); if ($this->request->server["\122\x45\x51\125\105\x53\124\137\x4d\105\x54\110\117\104"] == "\120\117\123\x54" && $this->validate()) { $this->model_setting_setting->editSetting(kjhelper::$key_prefix . "\x68\x70\x6d\162\162", $this->request->post); $this->session->data["\x73\x75\143\x63\145\x73\163"] = $this->language->get("\x74\145\170\164\x5f\163\165\143\x63\145\163\163"); $this->response->redirect($this->url->link("\145\x78\164\x65\156\163\x69\157\156\x2f\155\x6f\x64\x75\154\145\x2f\150\x70\x6d\x72\x72", kjhelper::$user_token . "\75" . $this->session->data[kjhelper::$user_token], "\x53\x53\114")); } $keys = array("\150\x70\155\162\x72\137\153\145\171", "\x68\x70\155\x72\x72\x5f\151\156\x63\x6c\165\144\x65\137\x6d\145\144\151\x61", "\150\160\155\162\162\137\x63\x6f\154\x6f\x72\x73\137\x61\162\x72\141\x79", "\150\x70\x6d\162\x72\137\164\x65\x78\164\165\162\145\137\x61\162\162\141\171", "\150\160\155\162\162\137\164\145\170\164\x75\162\x65\x5f\141\x74\164\x72", "\150\160\155\162\x72\x5f\x67\162\x6f\165\160\x69\156\x67\x5f\x73\164\157\x63\153", "\x68\x70\155\x72\x72\137\x63\157\154\x6f\x72\x73\137\x61\164\x74\162", "\150\160\x6d\162\162\x5f\163\x70\x6c\151\164\x5f\x61\164\164\x72\137\145\156\x61\x62\x6c\145", "\150\x70\155\162\x72\x5f\x73\x70\x6c\x69\x74\x5f\x61\164\164\162\137\144\145\x6c\x69\155", "\150\160\155\162\162\137\x67\x72\x6f\x75\x70\151\156\147\137\x74\171\x70\x65", "\150\x70\155\x72\162\x5f\x67\x72\157\x75\x70\151\156\x67\x5f\x65\170\x63\x6c\x75\144\145\x5f\162\x6f\x75\164\145"); foreach ($keys as $key) { $fkey = kjhelper::$key_prefix . $key; if (isset($this->request->post[$fkey])) { $data[$fkey] = $this->request->post[$fkey]; } else { $data[$fkey] = $this->config->get($fkey); } } if (isset($this->error["\167\x61\x72\x6e\151\x6e\x67"])) { $data["\145\162\162\x6f\162\x5f\167\141\x72\156\x69\156\147"] = $this->error["\x77\x61\162\x6e\x69\156\147"]; } else { $data["\x65\x72\x72\x6f\x72\137\167\141\x72\x6e\151\156\147"] = ''; } $attrs = $this->model_catalog_attribute->getAttributes(); usort($attrs, function ($a, $b) { return strcmp($a["\156\141\x6d\x65"], $b["\156\141\155\145"]); }); $data["\x61\164\x74\x72\x69\x62\x75\x74\145\x73"] = array(); foreach ($attrs as $attr) { $data["\141\x74\164\x72\151\x62\x75\164\145\163"][] = array("\x69\144" => $attr["\141\x74\164\162\151\142\x75\x74\145\137\x69\144"], "\156\141\x6d\x65" => $attr["\x6e\x61\155\x65"]); } $path_gr_in_cat = DIR_SYSTEM . "\57\150\x70\155\162\162\x5f\147\162\x6f\x75\x70\137\x69\156\137\143\141\164\56\157\x63\x6d\x6f\144\56\x78\155\154"; $data["\x67\162\x6f\165\160\137\151\x6e\x5f\143\x61\x74\x5f\145\x78\151\163\164\137\x66\151\154\145"] = file_exists($path_gr_in_cat) || file_exists($path_gr_in_cat . "\137"); $data["\147\x72\x6f\165\x70\137\151\x6e\137\143\141\164\x5f\163\x74\141\164\165\x73"] = file_exists($path_gr_in_cat); $data["\142\162\x65\141\x64\143\x72\165\155\142\x73"] = array(); $data["\142\162\x65\141\x64\x63\162\x75\x6d\142\x73"][] = array("\x74\x65\170\x74" => $this->language->get("\x74\145\170\164\137\150\x6f\x6d\x65"), "\150\x72\145\x66" => $this->url->link("\x63\x6f\155\x6d\x6f\156\57\x64\x61\x73\x68\x62\x6f\x61\162\144", kjhelper::$user_token . "\x3d" . $this->session->data[kjhelper::$user_token], "\123\123\114")); $data["\x62\x72\145\x61\x64\143\x72\165\x6d\x62\163"][] = array("\x74\145\x78\164" => $this->language->get("\164\x65\x78\164\137\155\157\x64\x75\x6c\x65"), "\150\162\145\146" => $this->url->link(kjhelper::$marketplace_link, kjhelper::$user_token . "\75" . $this->session->data[kjhelper::$user_token] . "\46\164\171\x70\145\x3d\155\157\x64\165\154\145", "\x53\x53\x4c")); $data["\x62\x72\x65\x61\x64\x63\x72\165\155\x62\x73"][] = array("\x74\x65\x78\164" => $this->language->get("\x68\145\x61\x64\151\156\147\137\x74\x69\x74\154\145"), "\150\x72\145\x66" => $this->url->link("\145\x78\x74\145\x6e\163\151\x6f\156\x2f\x6d\157\144\x75\154\x65\x2f\150\x70\x6d\x72\x72", kjhelper::$user_token . "\x3d" . $this->session->data[kjhelper::$user_token], "\123\x53\114")); $data["\154\151\156\x63\x65\156\x73\145"] = $this->license(); $data["\164\x79\x70\x65\x73"] = array(); $this->load->model("\x65\x78\x74\145\x6e\x73\151\x6f\x6e\x2f\155\157\x64\165\x6c\145\57\150\x70\x6d\162\162"); $types = $this->model_extension_module_hpmrr->getTypes(); foreach ($types as &$type) { if ($type["\x69\144"]) { $type["\x6e\141\x6d\145"] = $type["\x6e\x61\x6d\x65"]; $data["\164\171\x70\x65\x73"][] = $type; } } $data["\165\x6e\x69\x6e\163\164\x61\154\x6c"] = $this->url->link("\x65\170\164\x65\156\163\151\x6f\x6e\57\x6d\x6f\144\x75\x6c\x65\57\x68\x70\x6d\x72\162\57\x75\x6e\x69\156\163\x74\141\x6c\154", kjhelper::$user_token . "\75" . $this->session->data[kjhelper::$user_token], "\123\x53\x4c"); $data["\x6c\x69\156\x6b\137\145\x64\x69\164\137\164\171\x70\x65"] = $this->url->link("\145\170\x74\145\x6e\163\151\x6f\x6e\x2f\x6d\157\x64\165\154\145\57\150\x70\155\x72\x72\57\144\x65\154\124\x79\x70\145", kjhelper::$user_token . "\75" . $this->session->data[kjhelper::$user_token] . "\46\x69\144\x3d", "\123\123\x4c"); $data["\x6c\x69\156\153\x5f\x64\x65\154\137\164\171\x70\x65"] = $this->url->link("\145\170\x74\x65\156\x73\x69\157\156\57\x6d\157\144\x75\x6c\145\57\150\160\x6d\x72\x72\57\145\x64\x69\164\124\171\x70\145", kjhelper::$user_token . "\x3d" . $this->session->data[kjhelper::$user_token] . "\46\151\144\75", "\x53\123\114"); $data["\141\143\164\151\157\x6e"] = $this->url->link("\145\x78\164\145\x6e\x73\x69\x6f\x6e\57\x6d\x6f\x64\165\x6c\x65\57\150\x70\x6d\162\162", kjhelper::$user_token . "\75" . $this->session->data[kjhelper::$user_token], "\x53\123\114"); $data["\143\x61\156\143\x65\x6c"] = $this->url->link(kjhelper::$marketplace_link, kjhelper::$user_token . "\75" . $this->session->data[kjhelper::$user_token] . "\x26\164\x79\160\x65\x3d\155\157\x64\x75\154\x65", "\x53\x53\x4c"); $data["\x6c\151\156\x6b\137\x61\x64\x64\x5f\x6e\145\x77\137\x73\x65\162\x69\x65\163"] = $this->url->link("\x65\170\x74\x65\156\x73\x69\x6f\156\57\155\157\x64\x75\x6c\145\x2f\150\160\x6d\x72\x72\57\x61\x64\x64\123\145\x72\x69\145\163\x54\171\160\x65", kjhelper::$user_token . "\x3d" . $this->session->data[kjhelper::$user_token], "\x53\x53\x4c"); $data["\x68\x65\141\x64\x65\162"] = $this->load->controller("\x63\x6f\x6d\x6d\x6f\156\x2f\150\x65\141\144\145\162"); $data["\143\157\154\x75\x6d\x6e\137\154\145\x66\164"] = $this->load->controller("\143\157\x6d\155\157\x6e\x2f\x63\157\154\x75\155\156\x5f\x6c\x65\146\164"); $data["\x66\x6f\x6f\x74\x65\x72"] = $this->load->controller("\143\x6f\155\155\157\x6e\57\146\x6f\157\x74\145\162"); $data["\150\151\144\144\145\156"] = ''; $this->response->setOutput($this->load->view("\145\x78\164\x65\156\163\151\x6f\156\x2f\x6d\157\x64\x75\154\x65\57\150\x70\x6d\162\x72\57\x68\160\x6d\162\x72" . (floatval(VERSION) < 2.3 ? "\x2e\x74\x70\x6c" : ''), $data)); } public function toggle_group_in_cat() { if (!$this->license() || !$this->validate()) { return; } $path = DIR_SYSTEM . "\57\x68\x70\x6d\x72\x72\137\147\162\157\x75\x70\137\x69\x6e\x5f\143\x61\x74\56\x6f\143\x6d\x6f\x64\56\x78\155\x6c"; if (file_exists($path)) { rename($path, $path . "\x5f"); } else { if (file_exists($path . "\x5f")) { rename($path . "\x5f", $path); } } $this->response->redirect($this->url->link("\145\x78\164\x65\156\163\x69\x6f\156\x2f\155\157\x64\165\x6c\x65\57\150\x70\x6d\x72\162", kjhelper::$user_token . "\75" . $this->session->data[kjhelper::$user_token], "\123\123\x4c")); } public function replace_line_ocmod() { if (!$this->validate() || empty($this->request->post["\154\x69\156\145"]) || empty($this->request->post["\162\x65\x70\154\x61\143\x65"]) || empty($this->request->post["\x66\151\154\x65\156\x61\155\145"])) { return; } $file = DIR_SYSTEM . "\57" . str_replace(array("\57", "\134"), '', $this->request->post["\146\x69\154\x65\x6e\x61\x6d\145"]); $line = (int) $this->request->post["\x6c\151\156\x65"]; $replace = htmlspecialchars_decode($this->request->post["\162\145\x70\x6c\x61\x63\145"]); if (file_exists($file)) { $lines = file($file, FILE_IGNORE_NEW_LINES); array_splice($lines, $line, 1, $replace); file_put_contents($file, implode("\12", $lines)); echo "\123\125\103\x43\x45\x53\123"; } } public function license() { $domain = $_SERVER["\x53\105\122\126\x45\122\x5f\x4e\101\x4d\x45"]; $domain = str_replace("\x77\167\x77\56", '', $domain); $pref = "\154\170\143\166\x78\153\152\150\142\156\x36\66\x38\x39\70"; $lic = md5(md5($pref . $domain)); $key = $this->config->get(kjhelper::$key_prefix . "\150\x70\x6d\162\x72\137\x6b\145\x79"); return $key == $lic; } protected function validate() { if (!$this->user->hasPermission("\x6d\157\x64\x69\146\x79", "\145\x78\164\x65\156\163\x69\157\x6e\x2f\155\157\144\165\x6c\145\57\150\x70\x6d\x72\162")) { $this->error["\x77\141\x72\156\151\x6e\x67"] = $this->language->get("\x65\162\x72\x6f\162\x5f\x70\145\162\x6d\151\x73\x73\x69\157\x6e"); } return !$this->error; } }

Function Calls

None

Variables

None

Stats

MD5 9a80a153e05800b58ceb1216c8fdf926
Eval Count 0
Decode Time 166 ms