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 Infortis_Fortis_Model_Cssgen_Generator extends Mage_Core_Model_Abstract{ publi..

Decoded Output download

<?php class Infortis_Fortis_Model_Cssgen_Generator extends Mage_Core_Model_Abstract{ public function __construct(){parent::__construct(); } public function generateCss($x0b, $x0c, $x0d){if ($x0c){ if ($x0d) {$this->_generateStoreCss($x0b, $x0d); } else {$this->_generateWebsiteCss($x0b, $x0c); }}else{$x0e = Mage::app()->getWebsites(false, true);foreach ($x0e as $x0f => $x10) {$this->_generateWebsiteCss($x0b, $x0f); }} } protected function _generateWebsiteCss($x0b, $x0c) {$x10 = Mage::app()->getWebsite($x0c);foreach ($x10->getStoreCodes() as $x0f){ $this->_generateStoreCss($x0b, $x0f);} } protected function _generateStoreCss($x0b, $x0d){if (!Mage::app()->getStore($x0d)->getIsActive()) return;$x11 = '_' . $x0d;$x12 = $x0b . $x11 . '.css';$x13 = Mage::helper('fortis/cssgen')->getGeneratedCssDir() . $x12;$x14 = Mage::helper('fortis/cssgen')->getTemplatePath() . $x0b . '.phtml';Mage::register('cssgen_store', $x0d);try{ $x15 = Mage::app()->getLayout()->createBlock("core/template")->setData('area', 'frontend')->setTemplate($x14)->toHtml();if (empty($x15)) {throw new Exception( Mage::helper('fortis')->__("Template file is empty or doesn't exist: %s", $x14) ); }$x16 = new Varien_Io_File(); $x16->setAllowCreateFolders(true); $x16->open(array( 'path' => Mage::helper('fortis/cssgen')->getGeneratedCssDir() )); $x16->streamOpen($x13, 'w+'); $x16->streamLock(true); $x16->streamWrite($x15); $x16->streamUnlock(); $x16->streamClose(); }catch (Exception $x17){ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('fortis')->__('Failed generating CSS file: %s in %s', $x12, Mage::helper('fortis/cssgen')->getGeneratedCssDir()). '<br/>Message: ' . $x17->getMessage()); Mage::logException($x17);}Mage::unregister('cssgen_store'); } } ?>

Did this file decode correctly?

Original Code

<?php class Infortis_Fortis_Model_Cssgen_Generator extends Mage_Core_Model_Abstract{ public function __construct(){parent::__construct(); } public function generateCss($x0b, $x0c, $x0d){if ($x0c){ if ($x0d) {$this->_generateStoreCss($x0b, $x0d); } else {$this->_generateWebsiteCss($x0b, $x0c); }}else{$x0e = Mage::app()->getWebsites(false, true);foreach ($x0e as $x0f => $x10) {$this->_generateWebsiteCss($x0b, $x0f); }} } protected function _generateWebsiteCss($x0b, $x0c) {$x10 = Mage::app()->getWebsite($x0c);foreach ($x10->getStoreCodes() as $x0f){ $this->_generateStoreCss($x0b, $x0f);} } protected function _generateStoreCss($x0b, $x0d){if (!Mage::app()->getStore($x0d)->getIsActive()) return;$x11 = '_' . $x0d;$x12 = $x0b . $x11 . '.css';$x13 = Mage::helper('fortis/cssgen')->getGeneratedCssDir() . $x12;$x14 = Mage::helper('fortis/cssgen')->getTemplatePath() . $x0b . '.phtml';Mage::register('cssgen_store', $x0d);try{ $x15 = Mage::app()->getLayout()->createBlock("\x63\157\162\x65\x2ft\x65m\x70l\141\164\x65")->setData('area', 'frontend')->setTemplate($x14)->toHtml();if (empty($x15)) {throw new Exception( Mage::helper('fortis')->__("\124\x65\155\x70\154\x61\164\x65 f\x69\154\x65 i\x73\x20e\x6dpt\x79\x20\157\x72\040d\157\x65sn't\x20\145\170\151\x73\164\072\040%\x73", $x14) ); }$x16 = new Varien_Io_File(); $x16->setAllowCreateFolders(true); $x16->open(array( 'path' => Mage::helper('fortis/cssgen')->getGeneratedCssDir() )); $x16->streamOpen($x13, 'w+'); $x16->streamLock(true); $x16->streamWrite($x15); $x16->streamUnlock(); $x16->streamClose(); }catch (Exception $x17){ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('fortis')->__('Failed generating CSS file: %s in %s', $x12, Mage::helper('fortis/cssgen')->getGeneratedCssDir()). '<br/>Message: ' . $x17->getMessage()); Mage::logException($x17);}Mage::unregister('cssgen_store'); } }

Function Calls

None

Variables

None

Stats

MD5 323d829937b87582783e17f6bd69fd26
Eval Count 0
Decode Time 54 ms