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 if (!defined('_PS_VERSION_')) exit; require_once(dirname(__FILE__) . DIRECTO..

Decoded Output download

<?php 
 
if (!defined('_PS_VERSION_')) 
	exit; 
 
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'x13hurtownia.db.php'); 
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'x13hurtownia.core.php'); 
 
class x13hurtownia extends x13hurtowniaCore 
{ 
 
	public function __construct() 
	{ 
		$this->name = 'x13hurtownia'; 
		$this->tab = 'pricing_promotion'; 
		$this->version = '2.0.5'; 
		$this->author = 'X13.pl'; 
		$this->bootstrap = true; 
		$this->need_instance = 0; 
 
		parent::__construct(); 
 
		$this->displayName = $this->l('Hurtownia towarw'); 
		$this->description = $this->l('Umoliwia zarzdzanie z jednego miejsca cenami produktw dla zdefiniowanych grup klientw.'); 
		$this->ps_versions_compliancy = array('min' => '1.5', 'max' => _PS_VERSION_); 
		$this->ps_version = (float)substr(_PS_VERSION_,0,3); 
 
		// Retrocompatibility 
		if($this->ps_version < 1.5) { 
			$this->initContext(); 
		} 
	} 
 
	public function install() 
	{ 
		return  
			_x13hurtownia::installDB()  
			&& parent::install()  
			&& $this->registerHook('displayAdminListBefore') 
		; 
	} 
 
	public function uninstall() 
	{ 
		return  
			_x13hurtownia::uninstallDB()  
			&& parent::uninstall() 
		; 
	} 
 
	public function getContent() 
	{ 
		global $context; 
		if(!$context->cookie->x13hurtownia_pagination)  
			$context->cookie->x13hurtownia_pagination = 20; 
		 
		$this->context->cookie->id_shop = $this->context->shop->id; 
		 
		/* 
		echo '<pre>'; 
		print_r($_POST); 
		print_r($context->cookie); 
		echo '</pre>'; 
		exit; 
		//*/ 
		 
		if(Tools::isSubmit('updatesettings_x13hurtownia')) { 
			if(_x13hurtownia::setConfiguration()) Tools::redirectAdmin($this->getMainModuleAddress().'&x13-hurtownia-conf=1'); 
			else Tools::redirectAdmin($this->getMainModuleAddress().'&x13-hurtownia-err=1'); 
		} 
		elseif(Tools::getValue('id')) { 
			$e = explode('_', Tools::getValue('id')); 
			Tools::redirectAdmin('index.php?controller=AdminProducts&id_product='.(int)$e[0].'&updateproduct&token='.Tools::getAdminTokenLite('AdminProducts')); 
		} 
		 
		if(Tools::getIsset('applyCategoryFilterx13hurtownia')) { 
			$cats = Tools::getValue('categoryBox'); 
			$cats = ($cats) ? implode(',', $cats) : null; 
			$context->cookie->x13hurtownia_id_category = $cats; 
		} 
		elseif(Tools::getIsset('resetCategoryFilterx13hurtownia')) { 
			$context->cookie->x13hurtownia_id_category = null; 
		} 
		elseif(Tools::getIsset('submitResetx13hurtownia')) { 
			$context->cookie->x13hurtownia_pagination = 20; 
			$context->cookie->x13hurtowniaFilter_id_product = null; 
			$context->cookie->x13hurtowniaFilter_name = null; 
			$context->cookie->x13hurtowniaFilter_category = null; 
			$context->cookie->submitFilterx13hurtownia = 0; 
		} 
		elseif(Tools::getIsset('submitFilterx13hurtownia')) { 
			$context->cookie->x13hurtownia_pagination = Tools::getValue('x13hurtownia_pagination'); 
			$context->cookie->x13hurtowniaFilter_id_product = Tools::getValue('x13hurtowniaFilter_id_product'); 
			$context->cookie->x13hurtowniaFilter_name = Tools::getValue('x13hurtowniaFilter_name'); 
			$context->cookie->x13hurtowniaFilter_category = Tools::getValue('x13hurtowniaFilter_category'); 
			$context->cookie->submitFilterx13hurtownia = Tools::getValue('submitFilterx13hurtownia'); 
		} 
		 
		if(Tools::getValue('x13hurtowniaOrderby')) { 
			$context->cookie->x13hurtowniaOrderby = Tools::getValue('x13hurtowniaOrderby'); 
			$context->cookie->x13hurtowniaOrderway = strtoupper(Tools::getValue('x13hurtowniaOrderway')); 
		} 
		 
		$html = '<h2 class="module-name">'.$this->displayName.'</h2>'; 
		$html .= $this->displayMessage(); 
		if(Tools::getIsset('settingsx13hutrownia')) { 
			$html .= $this->generateHurtSettingsForm(); 
		} 
		else { 
			$html .= $this->generateHurtList(); 
		} 
		return $html; 
	} 
	 
	public function hookDisplayAdminListBefore($params) {  
		if(Tools::getValue('tab') == 'AdminModules' && Tools::getValue('configure') == $this->name) 
		return ($this->ps_version == 1.6)  
			? $this->ps16_generateHurtCategories() 
			: $this->ps15_generateHurtCategories() 
		; 
	} 
 
	/** 
	 * Retrocompatibility 1.4/1.5 
	 */ 
	private function initContext() 
	{ 
		if (class_exists('Context')) 
			$this->context = Context::getContext(); 
		else { 
			global $smarty, $cookie; 
			$this->context = new StdClass(); 
			$this->context->smarty = $smarty; 
			$this->context->cookie = $cookie; 
		} 
	} 
	 
} 
 ?>

Did this file decode correctly?

Original Code

<?php

if (!defined('_PS_VERSION_'))
	exit;

require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'x13hurtownia.db.php');
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'x13hurtownia.core.php');

class x13hurtownia extends x13hurtowniaCore
{

	public function __construct()
	{
		$this->name = 'x13hurtownia';
		$this->tab = 'pricing_promotion';
		$this->version = '2.0.5';
		$this->author = 'X13.pl';
		$this->bootstrap = true;
		$this->need_instance = 0;

		parent::__construct();

		$this->displayName = $this->l('Hurtownia towarw');
		$this->description = $this->l('Umoliwia zarzdzanie z jednego miejsca cenami produktw dla zdefiniowanych grup klientw.');
		$this->ps_versions_compliancy = array('min' => '1.5', 'max' => _PS_VERSION_);
		$this->ps_version = (float)substr(_PS_VERSION_,0,3);

		// Retrocompatibility
		if($this->ps_version < 1.5) {
			$this->initContext();
		}
	}

	public function install()
	{
		return 
			_x13hurtownia::installDB() 
			&& parent::install() 
			&& $this->registerHook('displayAdminListBefore')
		;
	}

	public function uninstall()
	{
		return 
			_x13hurtownia::uninstallDB() 
			&& parent::uninstall()
		;
	}

	public function getContent()
	{
		global $context;
		if(!$context->cookie->x13hurtownia_pagination) 
			$context->cookie->x13hurtownia_pagination = 20;
		
		$this->context->cookie->id_shop = $this->context->shop->id;
		
		/*
		echo '<pre>';
		print_r($_POST);
		print_r($context->cookie);
		echo '</pre>';
		exit;
		//*/
		
		if(Tools::isSubmit('updatesettings_x13hurtownia')) {
			if(_x13hurtownia::setConfiguration()) Tools::redirectAdmin($this->getMainModuleAddress().'&x13-hurtownia-conf=1');
			else Tools::redirectAdmin($this->getMainModuleAddress().'&x13-hurtownia-err=1');
		}
		elseif(Tools::getValue('id')) {
			$e = explode('_', Tools::getValue('id'));
			Tools::redirectAdmin('index.php?controller=AdminProducts&id_product='.(int)$e[0].'&updateproduct&token='.Tools::getAdminTokenLite('AdminProducts'));
		}
		
		if(Tools::getIsset('applyCategoryFilterx13hurtownia')) {
			$cats = Tools::getValue('categoryBox');
			$cats = ($cats) ? implode(',', $cats) : null;
			$context->cookie->x13hurtownia_id_category = $cats;
		}
		elseif(Tools::getIsset('resetCategoryFilterx13hurtownia')) {
			$context->cookie->x13hurtownia_id_category = null;
		}
		elseif(Tools::getIsset('submitResetx13hurtownia')) {
			$context->cookie->x13hurtownia_pagination = 20;
			$context->cookie->x13hurtowniaFilter_id_product = null;
			$context->cookie->x13hurtowniaFilter_name = null;
			$context->cookie->x13hurtowniaFilter_category = null;
			$context->cookie->submitFilterx13hurtownia = 0;
		}
		elseif(Tools::getIsset('submitFilterx13hurtownia')) {
			$context->cookie->x13hurtownia_pagination = Tools::getValue('x13hurtownia_pagination');
			$context->cookie->x13hurtowniaFilter_id_product = Tools::getValue('x13hurtowniaFilter_id_product');
			$context->cookie->x13hurtowniaFilter_name = Tools::getValue('x13hurtowniaFilter_name');
			$context->cookie->x13hurtowniaFilter_category = Tools::getValue('x13hurtowniaFilter_category');
			$context->cookie->submitFilterx13hurtownia = Tools::getValue('submitFilterx13hurtownia');
		}
		
		if(Tools::getValue('x13hurtowniaOrderby')) {
			$context->cookie->x13hurtowniaOrderby = Tools::getValue('x13hurtowniaOrderby');
			$context->cookie->x13hurtowniaOrderway = strtoupper(Tools::getValue('x13hurtowniaOrderway'));
		}
		
		$html = '<h2 class="module-name">'.$this->displayName.'</h2>';
		$html .= $this->displayMessage();
		if(Tools::getIsset('settingsx13hutrownia')) {
			$html .= $this->generateHurtSettingsForm();
		}
		else {
			$html .= $this->generateHurtList();
		}
		return $html;
	}
	
	public function hookDisplayAdminListBefore($params) { 
		if(Tools::getValue('tab') == 'AdminModules' && Tools::getValue('configure') == $this->name)
		return ($this->ps_version == 1.6) 
			? $this->ps16_generateHurtCategories()
			: $this->ps15_generateHurtCategories()
		;
	}

	/**
	 * Retrocompatibility 1.4/1.5
	 */
	private function initContext()
	{
		if (class_exists('Context'))
			$this->context = Context::getContext();
		else {
			global $smarty, $cookie;
			$this->context = new StdClass();
			$this->context->smarty = $smarty;
			$this->context->cookie = $cookie;
		}
	}
	
}

Function Calls

defined 1

Variables

None

Stats

MD5 57dc233c50735b7f294a5626e10b7217
Eval Count 0
Decode Time 106 ms