Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

use vendor\ekipisi\metabase\config as Config; class ControllerExtensionFeedMetaBase extend..

Decoded Output download

<?  use vendor\ekipisi\metabase\config as Config; class ControllerExtensionFeedMetaBase extends Controller { public function index() { if ($this->config->get("feed_metabase_status") == "on") { $this->load->model("setting/setting"); $store_id = 0; if (isset($this->request->get["store_id"])) { $store_id = $this->request->get["store_id"]; } $config = $this->model_setting_setting->getSetting(Config::metabase_name_small, $store_id); if (!$config) { return; } $output = "<?xml version="1.0" encoding="utf-8"?>"; $output .= "<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0" xmlns:atom="http://www.w3.org/2005/Atom">"; $output .= "<channel>"; $output .= "<title>" . $this->config->get("config_name") . "</title>"; $output .= "<description>" . $this->config->get("config_meta_description") . "</description>"; $output .= "<link>" . $this->config->get("config_url") . "</link>"; $output .= "<atom:link href="" . $this->url->link("extension/feed/meta_base", "store_id=" . $store_id) . "" rel="self" type="application/rss+xml" />"; $this->load->model("catalog/category"); $this->load->model("catalog/product"); $this->load->model("extension/feed/meta_base"); $this->load->model("tool/image"); $currency_code = $this->config->get("feed_metabase_currency"); $currency_value = $this->currency->getValue($this->config->get("feed_metabase_currency")); $gtin = $config["feed_metabase_gtin"]; $product_data = array(); foreach ($config["feed_metabase_category"] as $category) { $filter_data = array("store_id" => $store_id, "language_id" => $config["feed_metabase_language"], "filter_category_id" => $category, "filter_filter" => false); $products = $this->model_extension_feed_meta_base->getProducts($filter_data); foreach ($products as $product) { if (!in_array($product["product_id"], $product_data)) { $product_data[] = $product["product_id"]; if (isset($config["feed_metabase_manufacturer"])) { if (!in_array($product["manufacturer_id"], $config["feed_metabase_manufacturer"])) { continue; } } $output .= "<item>"; if ($product["sku"]) { $output .= "  <g:item_group_id><![CDATA[" . $product["sku"] . "]]></g:item_group_id>"; } $gtinno = 0; if ($gtin == "default") { if ($product["upc"]) { $gtinno = $product["upc"]; } else { if ($product["ean"]) { $gtinno = $product["ean"]; } else { if ($product["jan"]) { $gtinno = $product["jan"]; } else { if ($product["isbn"]) { $gtinno = $product["isbn"]; } else { $gtinno = $product["gtin"]; } } } } } else { if ($gtin == "upc") { $gtinno = $product["upc"]; } else { if ($gtin == "ean") { $gtinno = $product["ean"]; } else { if ($gtin == "jan") { $gtinno = $product["jan"]; } else { if ($gtin == "isbn") { $gtinno = $product["isbn"]; } } } } } $output .= "<g:gtin>" . $gtinno . "</g:gtin>"; if ($product["model"]) { $output .= "  <g:model_number><![CDATA[" . $product["model"] . "]]></g:model_number>"; } $output .= "<g:id>" . $product["product_id"] . "</g:id>"; $output .= "<g:title><![CDATA[" . $product["name"] . "]]></g:title>"; if ($product["description"]) { $output .= "<g:description><![CDATA[" . $this->str_short(strip_tags(html_entity_decode($product["description"], ENT_QUOTES, "UTF-8")), 9999, 0, '') . "]]></g:description>"; } else { $output .= "<g:description><![CDATA[" . $this->str_short(strip_tags(html_entity_decode($product["name"], ENT_QUOTES, "UTF-8")), 9999, 0, '') . "]]></g:description>"; } $output .= "<g:link>" . $this->url->link("product/product", "product_id=" . $product["product_id"]) . "</g:link>"; if ($product["image"]) { $output .= "<g:image_link>" . $this->model_tool_image->resize($product["image"], $this->config->get("theme_" . $this->config->get("config_theme") . "_image_popup_width"), $this->config->get("theme_" . $this->config->get("config_theme") . "_image_popup_height")) . "</g:image_link>"; } else { $output .= "  <g:image_link></g:image_link>"; } if ($config["feed_metabase_additional_image"]) { $images = $this->model_extension_feed_meta_base->getProductImages($product["product_id"]); foreach ($images as $image) { $output .= "<additional_image_link>" . $this->model_tool_image->resize($image["image"], $this->config->get("theme_" . $this->config->get("config_theme") . "_image_popup_width"), $this->config->get("theme_" . $this->config->get("config_theme") . "_image_popup_height")) . "</additional_image_link>"; } } if ($product["manufacturer"]) { $output .= "<g:brand><![CDATA[" . html_entity_decode($product["manufacturer"], ENT_QUOTES, "UTF-8") . "]]></g:brand>"; } else { $output .= "<g:brand><![CDATA[" . html_entity_decode($this->config->get("config_name"), ENT_QUOTES, "UTF-8") . "]]></g:brand>"; } $output .= "<g:price>" . $this->currency->format($this->tax->calculate($product["price"], $product["tax_class_id"]), $currency_code, $currency_value, false) . " " . $currency_code . "</g:price>"; if ((double) $product["special"]) { $output .= "<g:sale_price>" . $this->currency->format($this->tax->calculate($product["special"], $product["tax_class_id"]), $currency_code, $currency_value, false) . " " . $currency_code . "</g:sale_price>"; } if ((double) $product["weight"]) { $output .= "<g:shipping_weight>" . $this->weight->format($product["weight"], $product["weight_class_id"]) . "</g:shipping_weight>"; } $output .= "<g:condition>new</g:condition>"; $output .= "<g:availability><![CDATA[" . ($product["quantity"] ? "in stock" : "out of stock") . "]]></g:availability>"; if ($product["mpn"]) { $output .= "  <g:mpn><![CDATA[" . $product["mpn"] . "]]></g:mpn>"; } else { $output .= "  <g:identifier_exists>false</g:identifier_exists>"; } $output .= "</item>"; } } } $output .= "</channel>"; $output .= "</rss>"; header("Content-type: text/xml; charset=utf-8"); echo trim($output); } } private function str_short($string, $length, $lastLength = 0, $symbol = "...") { $string = str_replace("
", '', $string); $string = str_replace("
", '', $string); $string = str_replace("\x9", '', $string); if (strlen($string) > $length) { $result = substr($string, 0, $length - $lastLength - strlen($symbol)) . $symbol; return $result . ($lastLength ? substr($string, -$lastLength) : ''); } return $string; } }  ?>

Did this file decode correctly?

Original Code

use vendor\ekipisi\metabase\config as Config; class ControllerExtensionFeedMetaBase extends Controller { public function index() { if ($this->config->get("\146\145\x65\144\x5f\155\145\x74\141\x62\x61\x73\x65\x5f\163\164\141\164\165\x73") == "\x6f\156") { $this->load->model("\163\145\x74\164\151\156\147\57\x73\x65\164\x74\151\156\147"); $store_id = 0; if (isset($this->request->get["\163\x74\x6f\x72\x65\137\x69\x64"])) { $store_id = $this->request->get["\x73\x74\157\x72\145\x5f\151\x64"]; } $config = $this->model_setting_setting->getSetting(Config::metabase_name_small, $store_id); if (!$config) { return; } $output = "\74\x3f\x78\155\154\x20\x76\x65\x72\163\151\157\x6e\75\x22\61\56\x30\42\40\x65\x6e\x63\x6f\144\151\x6e\x67\75\x22\x75\164\146\55\70\42\x3f\76"; $output .= "\x3c\162\x73\x73\40\166\x65\162\x73\151\157\x6e\75\x22\62\x2e\60\x22\40\170\x6d\x6c\156\x73\x3a\x67\75\42\x68\164\x74\160\x3a\x2f\57\142\141\163\145\56\147\157\157\x67\154\x65\x2e\x63\x6f\x6d\x2f\156\163\57\x31\56\60\x22\40\x78\155\x6c\x6e\x73\72\141\164\157\x6d\75\x22\150\164\164\160\x3a\57\x2f\x77\x77\x77\56\167\x33\x2e\x6f\162\147\x2f\x32\60\x30\x35\x2f\x41\x74\157\x6d\42\76"; $output .= "\x3c\x63\150\x61\156\x6e\x65\154\x3e"; $output .= "\74\164\x69\164\154\x65\x3e" . $this->config->get("\x63\157\x6e\x66\x69\x67\x5f\x6e\141\x6d\145") . "\x3c\57\x74\x69\x74\154\145\x3e"; $output .= "\x3c\x64\x65\163\143\x72\x69\x70\164\151\157\156\x3e" . $this->config->get("\x63\157\x6e\x66\151\147\x5f\x6d\x65\164\x61\137\x64\145\163\x63\162\151\160\164\151\x6f\x6e") . "\x3c\57\x64\x65\163\143\162\x69\x70\x74\151\157\156\76"; $output .= "\x3c\154\151\156\153\x3e" . $this->config->get("\x63\x6f\x6e\x66\151\147\137\165\x72\154") . "\74\57\x6c\x69\x6e\x6b\76"; $output .= "\x3c\141\164\157\155\72\154\x69\x6e\x6b\40\150\x72\145\x66\75\x22" . $this->url->link("\x65\x78\x74\145\x6e\163\x69\157\156\x2f\x66\x65\x65\x64\x2f\155\x65\164\141\137\x62\x61\163\x65", "\x73\164\157\x72\145\x5f\x69\144\x3d" . $store_id) . "\x22\40\x72\145\154\75\x22\163\x65\154\x66\x22\x20\x74\171\160\145\75\42\141\160\160\154\x69\143\x61\164\151\157\156\x2f\x72\163\x73\53\x78\155\x6c\42\40\57\76"; $this->load->model("\143\x61\164\x61\154\x6f\x67\57\x63\141\x74\x65\147\157\x72\x79"); $this->load->model("\143\141\164\x61\x6c\x6f\x67\x2f\160\x72\x6f\x64\x75\x63\164"); $this->load->model("\145\x78\x74\x65\156\163\151\157\x6e\x2f\x66\x65\145\x64\x2f\x6d\145\164\141\x5f\x62\141\x73\145"); $this->load->model("\164\x6f\157\x6c\57\x69\155\141\147\x65"); $currency_code = $this->config->get("\x66\x65\145\x64\137\155\x65\x74\x61\142\x61\163\145\x5f\x63\x75\162\x72\x65\x6e\x63\x79"); $currency_value = $this->currency->getValue($this->config->get("\146\x65\145\144\137\155\x65\164\x61\142\x61\x73\145\137\x63\165\162\162\145\156\x63\171")); $gtin = $config["\x66\145\x65\x64\x5f\x6d\x65\164\x61\142\x61\x73\x65\137\147\x74\151\156"]; $product_data = array(); foreach ($config["\x66\x65\145\x64\137\155\145\x74\141\142\141\x73\145\137\x63\141\x74\145\x67\x6f\x72\171"] as $category) { $filter_data = array("\163\x74\x6f\x72\145\x5f\151\144" => $store_id, "\x6c\141\x6e\147\x75\x61\147\145\x5f\x69\144" => $config["\x66\x65\x65\x64\137\x6d\x65\x74\141\x62\x61\163\x65\137\x6c\141\156\147\x75\x61\147\x65"], "\x66\151\154\x74\x65\162\137\143\141\x74\x65\x67\x6f\x72\x79\x5f\151\144" => $category, "\146\x69\154\164\x65\162\x5f\146\151\x6c\x74\x65\x72" => false); $products = $this->model_extension_feed_meta_base->getProducts($filter_data); foreach ($products as $product) { if (!in_array($product["\160\162\157\x64\165\x63\164\x5f\x69\144"], $product_data)) { $product_data[] = $product["\160\x72\x6f\144\x75\x63\164\x5f\151\x64"]; if (isset($config["\x66\145\145\144\x5f\x6d\145\x74\x61\x62\x61\x73\x65\x5f\155\x61\x6e\165\146\141\143\x74\x75\x72\145\x72"])) { if (!in_array($product["\155\141\x6e\165\146\141\x63\164\165\x72\x65\162\137\151\144"], $config["\x66\x65\x65\144\x5f\155\x65\164\141\x62\x61\163\x65\x5f\x6d\x61\156\x75\x66\141\x63\x74\x75\162\145\162"])) { continue; } } $output .= "\x3c\x69\164\145\x6d\x3e"; if ($product["\163\x6b\x75"]) { $output .= "\40\40\x3c\147\x3a\151\164\x65\x6d\137\147\162\x6f\165\x70\x5f\151\144\x3e\x3c\x21\133\103\x44\101\x54\x41\x5b" . $product["\x73\153\x75"] . "\x5d\x5d\76\x3c\x2f\x67\x3a\151\164\145\155\x5f\147\162\x6f\165\x70\x5f\x69\144\76"; } $gtinno = 0; if ($gtin == "\144\145\x66\x61\165\154\164") { if ($product["\x75\160\x63"]) { $gtinno = $product["\165\x70\143"]; } else { if ($product["\x65\x61\x6e"]) { $gtinno = $product["\x65\141\156"]; } else { if ($product["\x6a\141\x6e"]) { $gtinno = $product["\x6a\x61\x6e"]; } else { if ($product["\151\x73\x62\x6e"]) { $gtinno = $product["\x69\x73\x62\x6e"]; } else { $gtinno = $product["\x67\x74\x69\156"]; } } } } } else { if ($gtin == "\x75\x70\x63") { $gtinno = $product["\x75\160\x63"]; } else { if ($gtin == "\145\141\x6e") { $gtinno = $product["\x65\141\x6e"]; } else { if ($gtin == "\x6a\141\x6e") { $gtinno = $product["\152\x61\156"]; } else { if ($gtin == "\151\x73\142\x6e") { $gtinno = $product["\151\163\142\x6e"]; } } } } } $output .= "\74\147\72\x67\164\x69\156\x3e" . $gtinno . "\74\57\x67\x3a\147\x74\x69\x6e\x3e"; if ($product["\155\x6f\144\x65\154"]) { $output .= "\x20\x20\74\x67\72\x6d\157\144\145\154\x5f\x6e\x75\155\x62\145\162\76\x3c\41\133\x43\x44\x41\124\101\x5b" . $product["\x6d\x6f\144\145\x6c"] . "\135\x5d\x3e\x3c\57\x67\x3a\x6d\157\144\145\154\x5f\156\x75\x6d\x62\x65\162\76"; } $output .= "\x3c\x67\72\151\144\x3e" . $product["\x70\x72\157\144\x75\143\164\x5f\x69\144"] . "\x3c\57\147\x3a\x69\144\x3e"; $output .= "\74\147\x3a\164\151\x74\x6c\145\76\x3c\x21\133\103\x44\101\124\x41\133" . $product["\156\x61\155\x65"] . "\135\135\x3e\74\x2f\x67\72\164\x69\164\x6c\145\x3e"; if ($product["\144\x65\x73\143\162\151\x70\x74\151\x6f\x6e"]) { $output .= "\x3c\x67\72\x64\145\x73\x63\x72\x69\160\x74\151\x6f\156\x3e\x3c\x21\x5b\x43\104\101\x54\x41\x5b" . $this->str_short(strip_tags(html_entity_decode($product["\x64\145\x73\143\162\x69\x70\x74\151\x6f\156"], ENT_QUOTES, "\125\124\x46\55\70")), 9999, 0, '') . "\135\x5d\76\x3c\x2f\x67\72\144\145\x73\x63\162\x69\x70\164\x69\x6f\156\76"; } else { $output .= "\74\x67\x3a\144\145\x73\143\162\151\160\164\x69\x6f\x6e\76\74\x21\133\x43\x44\x41\x54\101\x5b" . $this->str_short(strip_tags(html_entity_decode($product["\x6e\141\155\x65"], ENT_QUOTES, "\x55\124\106\55\x38")), 9999, 0, '') . "\x5d\x5d\76\x3c\57\x67\72\x64\x65\163\x63\x72\151\x70\x74\151\x6f\x6e\76"; } $output .= "\74\147\x3a\154\151\156\x6b\x3e" . $this->url->link("\x70\162\157\x64\x75\143\x74\x2f\x70\162\157\x64\x75\143\164", "\160\x72\157\144\165\x63\164\x5f\x69\x64\75" . $product["\160\x72\157\144\165\x63\164\x5f\x69\144"]) . "\x3c\57\x67\72\x6c\x69\156\153\76"; if ($product["\151\x6d\x61\147\145"]) { $output .= "\74\147\72\151\155\141\147\x65\137\154\x69\156\x6b\76" . $this->model_tool_image->resize($product["\151\x6d\141\147\x65"], $this->config->get("\x74\x68\x65\155\x65\x5f" . $this->config->get("\x63\157\x6e\146\x69\147\137\164\x68\x65\155\x65") . "\x5f\x69\x6d\x61\x67\145\137\160\157\160\165\x70\137\x77\151\144\x74\150"), $this->config->get("\164\150\145\155\x65\137" . $this->config->get("\x63\x6f\156\x66\151\147\137\164\x68\x65\x6d\x65") . "\x5f\151\x6d\141\x67\x65\x5f\x70\x6f\x70\x75\x70\137\x68\x65\151\x67\150\x74")) . "\x3c\x2f\x67\x3a\151\x6d\x61\147\x65\137\x6c\x69\x6e\153\76"; } else { $output .= "\x20\x20\74\147\x3a\x69\x6d\141\x67\145\x5f\154\151\x6e\153\x3e\74\x2f\147\72\x69\x6d\141\x67\x65\137\x6c\151\156\153\76"; } if ($config["\146\x65\145\144\x5f\155\x65\164\141\142\x61\163\x65\x5f\141\144\x64\x69\164\151\x6f\x6e\x61\154\137\151\x6d\141\x67\145"]) { $images = $this->model_extension_feed_meta_base->getProductImages($product["\160\x72\157\x64\x75\143\164\x5f\151\x64"]); foreach ($images as $image) { $output .= "\x3c\x61\144\144\151\164\x69\157\x6e\x61\x6c\x5f\x69\x6d\141\x67\145\x5f\154\151\156\153\x3e" . $this->model_tool_image->resize($image["\x69\155\x61\147\145"], $this->config->get("\x74\x68\x65\155\145\137" . $this->config->get("\143\x6f\x6e\146\151\147\137\164\150\x65\155\145") . "\137\151\155\141\147\145\137\x70\x6f\160\x75\x70\x5f\x77\151\144\x74\150"), $this->config->get("\x74\150\145\155\x65\x5f" . $this->config->get("\x63\157\x6e\x66\x69\x67\137\164\150\145\x6d\x65") . "\x5f\x69\x6d\x61\147\x65\137\160\x6f\x70\165\160\x5f\x68\x65\151\147\150\x74")) . "\x3c\x2f\x61\144\x64\x69\x74\x69\x6f\x6e\x61\154\x5f\151\x6d\141\147\x65\x5f\154\x69\156\x6b\76"; } } if ($product["\x6d\141\x6e\165\x66\x61\x63\164\165\x72\145\162"]) { $output .= "\x3c\147\x3a\142\162\x61\x6e\144\76\74\41\133\103\x44\x41\x54\x41\x5b" . html_entity_decode($product["\155\141\x6e\165\146\141\x63\164\x75\x72\145\162"], ENT_QUOTES, "\x55\124\x46\x2d\70") . "\135\x5d\x3e\x3c\57\147\x3a\x62\x72\x61\x6e\144\x3e"; } else { $output .= "\74\147\x3a\142\x72\x61\156\x64\x3e\74\41\x5b\x43\x44\x41\124\101\x5b" . html_entity_decode($this->config->get("\x63\x6f\x6e\146\151\147\137\x6e\x61\155\145"), ENT_QUOTES, "\125\x54\106\x2d\70") . "\x5d\135\x3e\74\x2f\147\x3a\142\162\141\156\x64\x3e"; } $output .= "\74\147\72\x70\x72\151\143\x65\76" . $this->currency->format($this->tax->calculate($product["\x70\162\x69\x63\145"], $product["\x74\x61\170\x5f\x63\x6c\x61\x73\x73\137\x69\x64"]), $currency_code, $currency_value, false) . "\x20" . $currency_code . "\74\57\147\x3a\160\162\x69\x63\145\76"; if ((double) $product["\163\160\145\143\151\141\x6c"]) { $output .= "\x3c\x67\72\x73\141\x6c\145\x5f\x70\x72\x69\x63\x65\x3e" . $this->currency->format($this->tax->calculate($product["\163\x70\145\x63\151\141\x6c"], $product["\x74\x61\x78\x5f\143\x6c\141\163\x73\x5f\x69\x64"]), $currency_code, $currency_value, false) . "\x20" . $currency_code . "\74\x2f\147\72\163\x61\154\145\137\160\x72\x69\143\x65\76"; } if ((double) $product["\167\145\151\147\150\x74"]) { $output .= "\74\147\x3a\163\150\151\160\x70\x69\x6e\147\137\x77\x65\151\x67\x68\164\x3e" . $this->weight->format($product["\x77\145\151\x67\150\164"], $product["\x77\145\x69\x67\150\x74\137\x63\x6c\141\163\163\x5f\151\x64"]) . "\74\x2f\x67\x3a\x73\150\151\160\160\x69\156\x67\137\167\x65\x69\x67\x68\164\76"; } $output .= "\x3c\x67\x3a\143\x6f\x6e\x64\x69\x74\151\157\156\x3e\x6e\145\167\x3c\x2f\147\x3a\x63\157\x6e\x64\x69\x74\151\157\x6e\76"; $output .= "\x3c\x67\x3a\x61\x76\x61\x69\154\x61\x62\151\x6c\x69\164\x79\76\x3c\x21\x5b\x43\x44\101\124\101\x5b" . ($product["\x71\x75\141\x6e\x74\x69\x74\x79"] ? "\x69\x6e\x20\x73\164\157\x63\x6b" : "\157\x75\164\40\157\x66\40\x73\x74\x6f\x63\153") . "\135\135\x3e\x3c\x2f\147\x3a\x61\166\x61\x69\154\141\142\x69\154\x69\164\x79\x3e"; if ($product["\x6d\x70\x6e"]) { $output .= "\40\40\x3c\147\x3a\x6d\x70\x6e\x3e\74\41\x5b\x43\104\x41\x54\x41\133" . $product["\x6d\160\156"] . "\x5d\x5d\76\74\57\147\72\155\x70\x6e\x3e"; } else { $output .= "\40\x20\74\x67\72\x69\144\145\156\164\151\146\x69\145\162\x5f\145\170\151\x73\x74\163\x3e\146\x61\154\163\145\x3c\x2f\x67\x3a\x69\x64\145\156\164\x69\146\x69\145\162\137\145\x78\151\x73\164\x73\x3e"; } $output .= "\74\x2f\151\x74\x65\155\76"; } } } $output .= "\74\x2f\x63\x68\141\156\156\145\154\x3e"; $output .= "\74\x2f\162\x73\x73\x3e"; header("\103\157\156\x74\x65\x6e\x74\55\164\x79\160\145\72\40\164\145\170\164\57\x78\155\x6c\x3b\40\143\150\141\x72\163\145\164\75\x75\x74\146\x2d\x38"); echo trim($output); } } private function str_short($string, $length, $lastLength = 0, $symbol = "\x2e\56\56") { $string = str_replace("\15", '', $string); $string = str_replace("\12", '', $string); $string = str_replace("\x9", '', $string); if (strlen($string) > $length) { $result = substr($string, 0, $length - $lastLength - strlen($symbol)) . $symbol; return $result . ($lastLength ? substr($string, -$lastLength) : ''); } return $string; } } 

Function Calls

None

Variables

None

Stats

MD5 243c40ef8dddf56be791017b30514369
Eval Count 0
Decode Time 127 ms