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 use vendor\ekipisi\googleimagesitemap\config as Config; class ControllerExtensio..
Decoded Output download
<?php
use vendor\ekipisi\googleimagesitemap\config as Config;
class ControllerExtensionFeedGoogleImageSitemap extends Controller
{
public function index()
{
if ($this->config->get('feed_google_image_sitemap_status') == 'on') {
$this->load->model('setting/setting');
$this->load->model('setting/store');
$this->load->model('extension/feed/google_image_sitemap');
$store_id = 0;
if (isset($this->request->get['store_id'])) {
$store_id = $this->request->get['store_id'];
}
$config = $this->model_setting_setting->getSetting(Config::google_image_sitemap_name_small, $store_id);
$store = $this->getCurrentStore($store_id);
if (!$config) {
return;
}
if (!isset($config['feed_google_image_sitemap'])) {
echo 'To ensure proper functioning, access support, and receive updates, you need to enter your license code.<br />' .
'You can request a <a href="https://support.ekipisi.com.tr/submit-ticket/4-licence-code-lisans-kodu" target="_blank">license code</a> for the Google Image Sitemap v1 module free of charge.';
die();
}
$output = '<?xml version="1.0" encoding="UTF-8"?>';
$output .='<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">';
$data = ['store_id' => $store_id];
$categories = $this->model_extension_feed_google_image_sitemap->getCategories($data);
foreach ($categories as $category) {
$output .= "<url>";
$output .=
"<loc>" .
$this->url->link(
"product/category",
"path=" .
$category[
"category_id"
]
) .
"</loc>";
$output .= "<image:image>";
$output .=
"<image:loc>" .
$store["ssl"] .
"image/" .
$category["image"] .
"</image:loc>";
$output .=
"</image:image>";
$output .= "</url>";
}
$products = $this->model_extension_feed_google_image_sitemap->getProducts(
$data
);
foreach ($products as $product) {
$output .= '<url>';
$output .=
"<loc>" .
$this->url->link(
"product/product",
"product_id=" .
$product["product_id"]
) .
"</loc>";
$output .= "<image:image>";
$output .=
"<image:loc>" .
$store["ssl"] .
"image/" .
$product["image"] .
"</image:loc>";
$output .=
"</image:image>";
$images = $this->model_extension_feed_google_image_sitemap->getProductImages(
$product["product_id"]
);
foreach ($images as $image) {
$output .= '<image:image>';
$output .= '<image:loc>' . $store['ssl'] . 'image/' . $image['image'] . '</image:loc>';
$output .= '</image:image>';
}
$output .= '</url>';
}
$output .= '</urlset>';
header('Content-type: text/xml; charset=utf-8');
echo trim($output);
}
}
private function getCurrentStore($store_id)
{
if ($store_id && $store_id != 0) {
$store = $this->model_extension_feed_google_image_sitemap->getStores(
$store_id
);
} else {
$store['store_id'] = 0;
$store['name'] = $this->config->get('config_name');
$store['ssl'] = HTTPS_SERVER;
}
return $store;
}
}
Did this file decode correctly?
Original Code
<?php
use vendor\ekipisi\googleimagesitemap\config as Config;
class ControllerExtensionFeedGoogleImageSitemap extends Controller
{
public function index()
{
if ($this->config->get('feed_google_image_sitemap_status') == 'on') {
$this->load->model('setting/setting');
$this->load->model('setting/store');
$this->load->model('extension/feed/google_image_sitemap');
$store_id = 0;
if (isset($this->request->get['store_id'])) {
$store_id = $this->request->get['store_id'];
}
$config = $this->model_setting_setting->getSetting(Config::google_image_sitemap_name_small, $store_id);
$store = $this->getCurrentStore($store_id);
if (!$config) {
return;
}
if (!isset($config['feed_google_image_sitemap'])) {
echo 'To ensure proper functioning, access support, and receive updates, you need to enter your license code.<br />' .
'You can request a <a href="https://support.ekipisi.com.tr/submit-ticket/4-licence-code-lisans-kodu" target="_blank">license code</a> for the Google Image Sitemap v1 module free of charge.';
die();
}
$output = '<?xml version="1.0" encoding="UTF-8"?>';
$output .='<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">';
$data = ['store_id' => $store_id];
$categories = $this->model_extension_feed_google_image_sitemap->getCategories($data);
foreach ($categories as $category) {
$output .= "\74\x75\162\x6c\x3e";
$output .=
"\74\154\x6f\x63\76" .
$this->url->link(
"\x70\162\157\144\x75\x63\x74\57\143\x61\164\x65\x67\x6f\x72\x79",
"\x70\141\x74\150\75" .
$category[
"\x63\141\164\x65\147\157\x72\x79\x5f\151\144"
]
) .
"\74\x2f\154\157\143\x3e";
$output .= "\74\x69\155\141\147\145\x3a\151\155\141\147\x65\76";
$output .=
"\x3c\151\x6d\x61\x67\145\72\154\x6f\x63\x3e" .
$store["\x73\x73\x6c"] .
"\x69\x6d\141\147\145\x2f" .
$category["\x69\x6d\141\147\145"] .
"\x3c\57\x69\x6d\141\147\x65\72\154\157\x63\76";
$output .=
"\74\57\151\x6d\141\x67\145\72\x69\x6d\x61\x67\145\76";
$output .= "\74\x2f\165\x72\154\x3e";
}
$products = $this->model_extension_feed_google_image_sitemap->getProducts(
$data
);
foreach ($products as $product) {
$output .= '<url>';
$output .=
"\74\154\x6f\143\76" .
$this->url->link(
"\160\x72\157\144\x75\143\x74\57\x70\x72\x6f\x64\165\x63\164",
"\160\x72\157\x64\x75\143\164\x5f\151\144\x3d" .
$product["\x70\162\157\144\x75\143\164\x5f\x69\x64"]
) .
"\74\x2f\x6c\157\143\76";
$output .= "\74\x69\x6d\141\147\x65\72\x69\155\141\147\x65\x3e";
$output .=
"\x3c\151\x6d\141\x67\x65\72\x6c\x6f\143\x3e" .
$store["\163\x73\154"] .
"\151\155\x61\x67\x65\57" .
$product["\151\155\141\x67\145"] .
"\74\57\x69\155\x61\x67\145\x3a\154\x6f\143\76";
$output .=
"\74\57\x69\155\141\x67\x65\x3a\x69\x6d\x61\x67\x65\x3e";
$images = $this->model_extension_feed_google_image_sitemap->getProductImages(
$product["\x70\162\x6f\144\165\x63\x74\137\x69\x64"]
);
foreach ($images as $image) {
$output .= '<image:image>';
$output .= '<image:loc>' . $store['ssl'] . 'image/' . $image['image'] . '</image:loc>';
$output .= '</image:image>';
}
$output .= '</url>';
}
$output .= '</urlset>';
header('Content-type: text/xml; charset=utf-8');
echo trim($output);
}
}
private function getCurrentStore($store_id)
{
if ($store_id && $store_id != 0) {
$store = $this->model_extension_feed_google_image_sitemap->getStores(
$store_id
);
} else {
$store['store_id'] = 0;
$store['name'] = $this->config->get('config_name');
$store['ssl'] = HTTPS_SERVER;
}
return $store;
}
}
Function Calls
None |
Stats
MD5 | 6d5ec82c57d4ce0cd25e5fb85c39f37c |
Eval Count | 0 |
Decode Time | 65 ms |