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 eval(base64_decode('CiBuYW1lc3BhY2UgVGVtcGxhdGVcZWFzeVRlbXBsYXRlMzYwOyB1c2UgSlRMX..
Decoded Output download
namespace Template\easyTemplate360; use JTL\Cache\JTLCacheInterface; use JTL\DB\DbInterface; use JTL\Filter\AbstractFilter; use JTL\Shop; use Smarty; use Template\easytemplate360\src\Controllers\TemplateController; use Template\easyTemplate360\src\Services\ConfigResolver; use Template\easyTemplate360\src\Utils\DefaultsHelper; use Template\easyTemplate360\src\Utils\SettingsHelper; class Plugins { protected const LANGUAGE_VARIABLE_FALLBACKS = [ 'et360_amazon_pay_banner_left' => [ 'ger' => 'Wir akzeptieren', 'eng' => 'We accept' ], 'et360_amazon_pay_banner_right' => [ 'ger' => 'Mit Amazon Pay können Sie die Zahlungs- und Adressinformationen aus Ihrem Amazon Account nutzen, um in diesem Shop schnell und sicher einzukaufen.', 'eng' => 'With Amazon Pay, you can use the payment and shipping information stored in your Amazon account to shop quickly, safely, and securely on this site.' ], 'et360_admin_edit_widget' => [ 'ger' => 'Widget im Adminbereich ffnen', 'eng' => 'Show Widget in Admin' ], 'et360_read_more' => [ 'ger' => 'Mehr lesen', 'eng' => 'Read More' ], 'et360_dropdown_cart_more_plural' => [ 'ger' => 'weitere Positionen', 'eng' => 'additional positions' ], 'et360_dropdown_cart_more_singular' => [ 'ger' => 'weitere Position', 'eng' => 'additional position' ], 'et360_add_company_data' => [ 'ger' => 'Firmendaten hinzufgen', 'eng' => 'Add Company Data' ], 'et360_checkout_continue' => [ 'ger' => 'Weiter', 'eng' => 'Continue' ], 'et360_endless_more_back' => [ 'ger' => 'Vorige Artikel laden', 'eng' => 'Load Previous Products' ], 'et360_endless_more_forward' => [ 'ger' => 'Weitere Artikel laden', 'eng' => 'Load Next Products' ], 'et360_availability_notification_consent' => [ 'ger' => 'Bitte senden Sie mir entsprechend Ihrer <a href="%s" target="_blank">Datenschutzerklrung</a> jederzeit widerruflich Informationen zur Verfgbarkeit zu diesem Produkt per E-Mail zu.', 'eng' => 'Please email me availability information for this product in accordance with your data <a href="%s" target="_blank">privacy notice</a>. I recognise that I can revoke my permission to receive said emails at any time.' ] ]; protected $db; protected $cache; protected $templateController; public function __construct(DbInterface $db, JTLCacheInterface $cache) { $this->db = $db; $this->cache = $cache; $this->templateController = TemplateController::getInstance(); } public function registerAll(\JTL\Smarty\JTLSmarty $smarty): void { $smarty->registerPlugin(Smarty::PLUGIN_FUNCTION, 'et_renderGrid', [$this, 'renderGrid'], false); $smarty->registerPlugin(Smarty::PLUGIN_FUNCTION, 'et_getCompilationTimestamp', [$this, 'getCompilationTimestamp'], false); $smarty->registerPlugin(Smarty::PLUGIN_FUNCTION, 'et_getDevice', [$this, 'getDevice'], false); $smarty->registerPlugin(Smarty::PLUGIN_FUNCTION, 'et_language', [$this, 'language'], false); $smarty->registerPlugin(Smarty::PLUGIN_FUNCTION, 'et_getSetting', [$this, 'getSetting'], false); $smarty->registerPlugin(Smarty::PLUGIN_FUNCTION, 'et_getButtonSettings', [$this, 'getButtonSettings'], false); $smarty->registerPlugin(Smarty::PLUGIN_FUNCTION, 'et_getGlobalSettings', [$this, 'getGlobalSettings'], false); $smarty->registerPlugin(Smarty::PLUGIN_FUNCTION, 'et_getMenuSettings', [$this, 'getMenuSettings'], false); $smarty->registerPlugin(Smarty::PLUGIN_FUNCTION, 'et_getFontSettings', [$this, 'getFontSettings'], false); $smarty->registerPlugin(Smarty::PLUGIN_FUNCTION, 'et_getFonts', [$this, 'getFonts'], false); $smarty->registerPlugin(Smarty::PLUGIN_FUNCTION, 'et_getIcon', [$this, 'getIcon'], false); $smarty->registerPlugin(Smarty::PLUGIN_FUNCTION, 'et_isPreviewMode', [$this, 'isPreviewMode'], false); $smarty->registerPlugin(Smarty::PLUGIN_FUNCTION, 'et_getFavicon', [$this, 'getFavicon'], false); $smarty->registerPlugin(Smarty::PLUGIN_FUNCTION, 'et_getPluginBaseUrl', [$this, 'getPluginBaseUrl'], false); $smarty->registerPlugin(Smarty::PLUGIN_FUNCTION, 'et_shouldShowAlertList', [$this, 'shouldShowAlertList'], false); $smarty->registerPlugin(Smarty::PLUGIN_FUNCTION, 'et_getShopVersion', [$this, 'getShopVersion'],false); $smarty->registerPlugin(Smarty::PLUGIN_FUNCTION, 'et_isShopVersionAtLeast', [$this, 'isShopVersionAtLeast'], false); $smarty->registerPlugin(Smarty::PLUGIN_FUNCTION, 'et_isPencilModeEnabled', [$this, 'isPencilModeEnabled'], false); $smarty->registerPlugin(Smarty::PLUGIN_FUNCTION, 'et_getBreakpoints', [$this, 'getBreakpoints'], false); $smarty->registerPlugin(Smarty::PLUGIN_FUNCTION, 'et_getReviewCount', [$this, 'getReviewCount'], false); $smarty->registerPlugin(Smarty::PLUGIN_FUNCTION, 'et_hasConsent', [$this, 'hasConsent'], false); $smarty->registerPlugin(Smarty::PLUGIN_FUNCTION, 'et_isUselessFilter', [$this, 'isUselessFilter'], false); $smarty->registerPlugin(Smarty::PLUGIN_FUNCTION, 'et_getGlobalVariable', [$this, 'getGlobalVariable'], false); $smarty->registerPlugin(Smarty::PLUGIN_FUNCTION, 'et_getImageSize', [$this, 'getImageSize'], false); } public function renderGrid($params, $smarty): string { return $this->templateController->renderGrid($params['id'], $params['fallbackId'] ?? null, $params['context'] ?? []); } public function getCompilationTimestamp($params, $smarty): string { return $this->templateController->getCompilationTimestamp(); } public function getPluginBaseUrl($params, $smarty): string { return $this->templateController->getPluginBaseUrl(); } public function language($params, $smarty): string { $key = $params['key']; $value = Shop::Lang()->get($key, 'custom'); if ($value === '#custom.' . $key . '#') { $lang = strtolower(Shop::getLanguage(true)); return self::LANGUAGE_VARIABLE_FALLBACKS[$key][$lang] ?? $value; } return $value; } public function getSetting($params, $smarty) { $section = $params['section'] ?? null; $key = $params['key'] ?? null; if(!empty($key)) { $result = $this->templateController->getGlobalSetting($section, $key); } else { $result = $this->templateController->getGlobalSettings($section); } if (!empty($params['assign'])) { $smarty->assign($params['assign'], $result); return; } return $result; } public function getButtonSettings($params, $smarty) { $type = $params['type'] ?? null; $result = []; if(!empty($type)) { $buttonConfig = $this->templateController->getGlobalSetting('GroupButton', $type); if(empty($buttonConfig)) { $buttonConfig = [ 'borderRadius' => [], 'borderSize' => [], 'width' => [], 'height' => [], 'hoverStyle' => '', 'iconPosition' => '' ]; } $configResolver = ConfigResolver::getInstance($this->templateController->getEnvironment(), $this->templateController->getTemplate()); $result['borderRadius'] = $configResolver->resolveBreakpointValue('borderRadius', $buttonConfig['borderRadius'], 'GroupButton.' . $type); $result['borderSize'] = $configResolver->resolveBreakpointValue('borderSize', $buttonConfig['borderSize'], 'GroupButton.' . $type); $result['width'] = $configResolver->resolveBreakpointValue('width', $buttonConfig['width'], 'GroupButton.' . $type); $result['height'] = $configResolver->resolveBreakpointValue('height', $buttonConfig['height'], 'GroupButton.' . $type); $result['hoverStyle'] = $buttonConfig['hoverStyle'] === 'default' ? $configResolver->getDefaultValue('GroupButton.' . $type, 'hoverStyle') : $buttonConfig['hoverStyle']; $result['iconPosition'] = $buttonConfig['iconPosition'] === 'default' ? $configResolver->getDefaultValue('GroupButton.' . $type, 'iconPosition') : $buttonConfig['iconPosition']; } if (!empty($params['assign'])) { $smarty->assign($params['assign'], $result); return; } return $result; } public function getMenuSettings($params, $smarty) { $menuSettings = $this->templateController->getGlobalSettings('AreaMenu'); $configResolver = ConfigResolver::getInstance($this->templateController->getEnvironment(), $this->templateController->getTemplate()); $result = $menuSettings; $result['size'] = $menuSettings['size'] === 'default' ? $configResolver->getDefaultValue('AreaMenu', 'size') : $menuSettings['size']; $result['hoverStyle'] = $menuSettings['hoverStyle'] === 'default' ? $configResolver->getDefaultValue('AreaMenu', 'hoverStyle') : $menuSettings['hoverStyle']; $result['footerInMobileEnabled'] = !isset($menuSettings['footerInMobileEnabled']) || $menuSettings['footerInMobileEnabled']; $result['wishlistEnabled'] = isset($menuSettings['wishlistEnabled']) && (bool) $menuSettings['wishlistEnabled']; $result['searchEnabled'] = isset($menuSettings['searchEnabled']) &&(bool) $menuSettings['searchEnabled']; $result['currencyLanguageSelectEnabled'] = isset($menuSettings['currencyLanguageSelectEnabled']) && (bool) $menuSettings['currencyLanguageSelectEnabled']; $result['accountBasketEnabled'] = isset($menuSettings['accountBasketEnabled']) && (bool) $menuSettings['accountBasketEnabled']; $result['basketAmountEnabled'] = isset($menuSettings['basketAmountEnabled']) && (bool) $menuSettings['basketAmountEnabled']; $result['logoMaxHeight'] = $configResolver->resolveBreakpointValue('logoMaxHeight', $menuSettings['logoMaxHeight'] ?? [], 'AreaMenu'); $result['logoSource'] = $menuSettings['logoSource'] ?? 'none'; if($result['logoSource'] === 'single') { $result['logoSingle'] = $configResolver->resolveImage($menuSettings['logoSingle'] ?? []); } elseif ($result['logoSource'] === 'breakpoint') { $breakpointImages = $configResolver->resolveBreakpointValue('logoBreakpoint', $menuSettings['logoBreakpoint'] ?? [], 'AreaMenu'); if(\is_array($breakpointImages)) { $result['logoBreakpoint'] = \array_map(static function ($breakpointImage) use ($configResolver) { return $configResolver->resolveImage($breakpointImage); }, $breakpointImages); } else { $result['logoBreakpoint'] = []; } } if (!empty($params['assign'])) { $smarty->assign($params['assign'], $result); return; } return $result; } public function getGlobalSettings($params, $smarty) { $globalSettings = $this->templateController->getGlobalSettings('GroupGlobal'); $template = $this->templateController->getTemplate(); $configResolver = ConfigResolver::getInstance($this->templateController->getEnvironment(), $template); $result = $globalSettings; $result['breadCrumbSize'] = $globalSettings['breadCrumbSize'] === 'default' ? $configResolver->getDefaultValue('GroupGlobal', 'breadCrumbSize') : $globalSettings['breadCrumbSize']; $result['pushToBasketAction'] = $globalSettings['pushToBasketAction'] === 'default' ? $configResolver->getDefaultValue('GroupGlobal', 'pushToBasketAction') : $globalSettings['pushToBasketAction']; $result['backgroundImage'] = $configResolver->resolveImage($globalSettings['backgroundImage']); if(isset($globalSettings['ogImage'])) { $result['ogImage'] = $configResolver->resolveImage($globalSettings['ogImage'] ?? []); } $result['showVariationNameOnSelect'] = (!isset($globalSettings['showVariationNameOnSelect']) || $globalSettings['showVariationNameOnSelect'] === 'default') ? $configResolver->getDefaultValue('GroupGlobal', 'showVariationNameOnSelect') : $globalSettings['showVariationNameOnSelect']; if($template !== null) { $breakpoints = DefaultsHelper::getInstance($template)->getBreakpoints(); $result['breakpoints'] = [ 'xsMax' => (float)$breakpoints['sm'] - 0.02, 'smMin' => (float)$breakpoints['sm'], 'smMax' => (float)$breakpoints['md'] - 0.02, 'mdMin' => (float)$breakpoints['md'], 'mdMax' => (float)$breakpoints['lg'] - 0.02, 'lgMin' => (float)$breakpoints['lg'], 'lgMax' => (float)$breakpoints['xl'] - 0.02, 'xlMin' => (float)$breakpoints['xl'] ]; } if (!empty($params['assign'])) { $smarty->assign($params['assign'], $result); return; } return $result; } public function getFontSettings($params, $smarty) { $fontSettings = $this->templateController->getGlobalSettings('GroupFont'); $result = $fontSettings; $result['webfontLoading'] = $fontSettings['webfontLoading'] ?? 'auto'; if (!empty($params['assign'])) { $smarty->assign($params['assign'], $result); return; } return $result; } public function getDevice($params, $smarty) { $result = $this->templateController->detectDevice(); if (!empty($params['assign'])) { $smarty->assign($params['assign'], $result); return; } return $result; } public function getFonts($params, $smarty) { $activeFonts = $this->templateController->getGlobalSetting('GroupFont', 'activeFonts'); $result = []; if(!empty($activeFonts)) { $result = $activeFonts; } if (!empty($params['assign'])) { $smarty->assign($params['assign'], $result); return; } return $result; } public function getIcon($params, $smarty) { $result = ''; if(!empty($params['key'])) { $iconKey = $params['key']; $iconConfig = $this->templateController->getGlobalSetting('GroupIcon', $iconKey); $configResolver = ConfigResolver::getInstance($this->templateController->getEnvironment(), $this->templateController->getTemplate()); $result = $configResolver->resolveIcon($iconConfig); if(empty($result)) { $defaultIcon = DefaultsHelper::getInstance($this->templateController->getTemplate())->getIcon($iconKey); if(!empty($defaultIcon)) { $result = $defaultIcon; } } } if (!empty($params['assign'])) { $smarty->assign($params['assign'], $result); return; } return $result; } public function isPreviewMode($params, $smarty) { $result = isset($_COOKIE['et360preview']) && Shop::isAdmin(true); if (!empty($params['assign'])) { $smarty->assign($params['assign'], $result); return; } return $result; } public function getFavicon($params, $smarty) { $result = null; $faviconConfig = $this->templateController->getGlobalSetting('GroupGlobal', 'favicon'); if(!empty($faviconConfig)) { $configResolver = ConfigResolver::getInstance($this->templateController->getEnvironment(), $this->templateController->getTemplate()); $result = $configResolver->resolveImage($faviconConfig); } if (!empty($params['assign'])) { $smarty->assign($params['assign'], $result); return; } return $result; } public function shouldShowAlertList($params, $smarty) { $result = false; if(isset($params['alertList'])) { $alertList = $params['alertList']; if($alertList !== null) { foreach($alertList->getAlertlist() as $alert) { if($alert->getShowInAlertListTemplate()) { $result = true; break; } } } } if (!empty($params['assign'])) { $smarty->assign($params['assign'], $result); return; } return $result; } public function getShopVersion($params, $smarty) { $result = \APPLICATION_VERSION; if (!empty($params['assign'])) { $smarty->assign($params['assign'], $result); return; } return $result; } public function isShopVersionAtLeast($params, $smarty) { $result = false; if(!empty($params['value'])) { $result = version_compare(\APPLICATION_VERSION, $params['value'], '>='); } if (!empty($params['assign'])) { $smarty->assign($params['assign'], $result); return; } return $result; } public function isPencilModeEnabled($params, $smarty) { $result = SettingsHelper::isPencilModeEnabled(); if (!empty($params['assign'])) { $smarty->assign($params['assign'], $result); return; } return $result; } public function getBreakpoints($params, $smarty) { $breakpoints = DefaultsHelper::getInstance($this->templateController->getTemplate())->getBreakpoints(); $result = [ 'xsMax' => (float)$breakpoints['sm'] - 0.02, 'smMin' => (float)$breakpoints['sm'], 'smMax' => (float)$breakpoints['md'] - 0.02, 'mdMin' => (float)$breakpoints['md'], 'mdMax' => (float)$breakpoints['lg'] - 0.02, 'lgMin' => (float)$breakpoints['lg'], 'lgMax' => (float)$breakpoints['xl'] - 0.02, 'xlMin' => (float)$breakpoints['xl'] ]; if (!empty($params['assign'])) { $smarty->assign($params['assign'], $result); return; } return $result; } public function getReviewCount($params, $smarty) { $result = ''; if(!empty($params['article'])) { $article = $params['article']; if(isset($article->Bewertungen, $article->Bewertungen->oBewertungGesamt, $article->Bewertungen->oBewertungGesamt->nAnzahl)) { $result = $article->Bewertungen->oBewertungGesamt->nAnzahl; } else { $activeOnly = Shop::getSettingValue(CONF_BEWERTUNG, 'bewertung_freischalten') === 'Y'; $activateSQL = $activeOnly ? ' AND nAktiv = 1' : ''; $reviewCount = $this->db->getSingleObject( 'SELECT COUNT(*) AS nAnzahl
FROM tbewertung
WHERE kArtikel = :pid' . $activateSQL, ['pid' => (int) $article->kArtikel] ); if($reviewCount !== null && isset($reviewCount->nAnzahl)) { $result = $reviewCount->nAnzahl; } } } if (!empty($params['assign'])) { $smarty->assign($params['assign'], $result); return; } return (string) $result; } public function hasConsent($params, $smarty) { $result = false; if(!empty($params['key'])) { $result = Shop::Container()->getConsentManager()->hasConsent($params['key']); } if (!empty($params['assign'])) { $smarty->assign($params['assign'], $result); return; } return $result; } public function isUselessFilter($params, $smarty) { $result = false; $filter = $params['filter']; $resultCount = $params['resultCount']; if(!empty($params['filter']) && !empty($resultCount) && ($filter instanceof AbstractFilter) && !$filter->isActive()) { $options = $filter->getOptions(); $uselessOptionsOnly = true; foreach($options as $option) { if($option->getCount() < $resultCount) { $uselessOptionsOnly = false; break; } } $result = $uselessOptionsOnly; } if (!empty($params['assign'])) { $smarty->assign($params['assign'], $result); return; } return $result; } public function getGlobalVariable($params, $smarty): void { $result = TemplateController::getInstance()->getGlobalVariable(); if (!empty($params['assign'])) { $smarty->assign($params['assign'], $result); return; } return; } public function getImageSize($params, $smarty) { if(empty($params['src'])) { $result = [ 'width' => 0, 'height' => 0, 'attributes' => '' ]; if (!empty($params['assign'])) { $smarty->assign($params['assign'], $result); return; } return $result; } $absolutePath = PFAD_ROOT . ltrim(str_replace(Shop::getURL(), '', $params['src']), '/'); $size = null; if(!file_exists($absolutePath)) { $absolutePath = str_ireplace(['.jpg', '.jpeg', '.png'], '.webp', $absolutePath); } if(file_exists($absolutePath)) { $size = @getimagesize($absolutePath); } if(empty($size)) { $result = [ 'width' => 0, 'height' => 0, 'attributes' => '' ]; if (!empty($params['assign'])) { $smarty->assign($params['assign'], $result); return; } return $result; } $result = ['width' => $size[0], 'height' => $size[1], 'attributes' => $size[3]]; if (!empty($params['assign'])) { $smarty->assign($params['assign'], $result); return; } return $result; } }
Did this file decode correctly?
Original Code
<?php
eval(base64_decode('CiBuYW1lc3BhY2UgVGVtcGxhdGVcZWFzeVRlbXBsYXRlMzYwOyB1c2UgSlRMXENhY2hlXEpUTENhY2hlSW50ZXJmYWNlOyB1c2UgSlRMXERCXERiSW50ZXJmYWNlOyB1c2UgSlRMXEZpbHRlclxBYnN0cmFjdEZpbHRlcjsgdXNlIEpUTFxTaG9wOyB1c2UgU21hcnR5OyB1c2UgVGVtcGxhdGVcZWFzeXRlbXBsYXRlMzYwXHNyY1xDb250cm9sbGVyc1xUZW1wbGF0ZUNvbnRyb2xsZXI7IHVzZSBUZW1wbGF0ZVxlYXN5VGVtcGxhdGUzNjBcc3JjXFNlcnZpY2VzXENvbmZpZ1Jlc29sdmVyOyB1c2UgVGVtcGxhdGVcZWFzeVRlbXBsYXRlMzYwXHNyY1xVdGlsc1xEZWZhdWx0c0hlbHBlcjsgdXNlIFRlbXBsYXRlXGVhc3lUZW1wbGF0ZTM2MFxzcmNcVXRpbHNcU2V0dGluZ3NIZWxwZXI7IGNsYXNzIFBsdWdpbnMgeyBwcm90ZWN0ZWQgY29uc3QgTEFOR1VBR0VfVkFSSUFCTEVfRkFMTEJBQ0tTID0gWyAnZXQzNjBfYW1hem9uX3BheV9iYW5uZXJfbGVmdCcgPT4gWyAnZ2VyJyA9PiAnV2lyIGFremVwdGllcmVuJywgJ2VuZycgPT4gJ1dlIGFjY2VwdCcgXSwgJ2V0MzYwX2FtYXpvbl9wYXlfYmFubmVyX3JpZ2h0JyA9PiBbICdnZXInID0+ICdNaXQgQW1hem9uIFBheSBrJm91bWw7bm5lbiBTaWUgZGllIFphaGx1bmdzLSB1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