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RtNG5odG1sX3c1YmYycm1zLzVkNHQnLDFycjF5KCc0ZCc9Pk0xZzU6OnI1ZzRzdHJ5KCd3NWJmMnJtc19kMXQxJyktPmc1dElkKCkpKTsNCgl9DQoJDQoJcDNibDRjIGYzbmN0NDJuIGc1dEg1MWQ1clQ1eHQoKXsNCgkJNGYoIE0xZzU6OnI1ZzRzdHJ5KCdmNDVsZHNfZDF0MScpICYmIE0xZzU6OnI1ZzRzdHJ5KCdmNDVsZHNfZDF0MScpLT5nNXRJZCgpICkgew0KCQkJcjV0M3JuIE0xZzU6Omg1bHA1cigndzViZjJybXMnKS0+X18oIkVkNHQgJyVzJyBGNDVsZCAtICVzIiwgJHRoNHMtPmh0bWxFc2MxcDUoTTFnNTo6cjVnNHN0cnkoJ2Y0NWxkc19kMXQxJyktPmc1dE4xbTUoKSksICR0aDRzLT5odG1sRXNjMXA1KCR0aDRzLT5odG1sRXNjMXA1KE0xZzU6OnI1ZzRzdHJ5KCd3NWJmMnJtc19kMXQxJyktPmc1dE4xbTUoKSkpKTsNCgkJfSA1bHM1IHsNCgkJCXI1dDNybiBNMWc1OjpoNWxwNXIoJ3c1YmYycm1zJyktPl9fKCdBZGQgRjQ1bGQgLSAlcycsJHRoNHMtPmh0bWxFc2MxcDUoTTFnNTo6cjVnNHN0cnkoJ3c1YmYycm1zX2QxdDEnKS0+ZzV0TjFtNSgpKSk7DQoJCX0NCgl9DQoNCn0gIA0KPz4NCg=='; $_X=base64_decode($_X);$_X=strtr($_X,'123456aouie','aouie123456');$_R=ereg_replace('__FILE__',"'".$_F."'",$_X);echo($_R);$_R=0;$_X=0;
Output for 7.0.0 - 7.2.6
Fatal error: Uncaught Error: Call to undefined function ereg_replace() in /in/m8lch:3 Stack trace: #0 {main} thrown in /in/m8lch on line 3
Process exited with code 255.
Output for 5.3.0 - 5.6.28
Deprecated: Function ereg_replace() is deprecated in /in/m8lch on line 3 ?><?php /** * Feel free to contact me via Facebook * http://www.facebook.com/rebimol * * * @author Vladimir Popov * @copyright Copyright (c) 2011 Vladimir Popov */ class VladimirPopov_WebForms_Block_Adminhtml_Fields_Edit extends Mage_Adminhtml_Block_Widget_Form_Container { protected function _prepareLayout(){ parent::_prepareLayout(); } public function __construct(){ parent::__construct(); $this->_objectId = 'id'; $this->_blockGroup = 'webforms'; $this->_controller = 'adminhtml_fields'; $this->_addButton('saveandcontinue', array( 'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'), 'onclick' => "$('saveandcontinue').value = true; editForm.submit()", 'class' => 'save', ), -100); $fields = Mage::getModel('webforms/fields')->getCollection()->addFilter('webform_id',Mage::registry('webforms_data')->getId())->count(); if($fields>10){ $this->_removeButton('save'); $this->_removeButton('saveandcontinue'); $this->_addButton('save',array( 'label' => $this->__('Save'), 'onclick' => 'alert(\''.Mage::helper('webforms')->__('You have exceeded Community Edition limit!\nCommunity Edition allows you to have only 10 fields in web-form.\nUpgrade to Professional Edition.').'\')', )); } } public function getSaveUrl() { return $this->getUrl('*/adminhtml_webforms/save',array('webform_id'=>Mage::registry('webforms_data')->getId())); } public function getBackUrl(){ return $this->getUrl('*/adminhtml_webforms/edit',array('id'=>Mage::registry('webforms_data')->getId())); } public function getHeaderText(){ if( Mage::registry('fields_data') && Mage::registry('fields_data')->getId() ) { return Mage::helper('webforms')->__("Edit '%s' Field - %s", $this->htmlEscape(Mage::registry('fields_data')->getName()), $this->htmlEscape($this->htmlEscape(Mage::registry('webforms_data')->getName()))); } else { return Mage::helper('webforms')->__('Add Field - %s',$this->htmlEscape(Mage::registry('webforms_data')->getName())); } } } ?>
Output for 4.3.0 - 5.2.17
?><?php /** * Feel free to contact me via Facebook * http://www.facebook.com/rebimol * * * @author Vladimir Popov * @copyright Copyright (c) 2011 Vladimir Popov */ class VladimirPopov_WebForms_Block_Adminhtml_Fields_Edit extends Mage_Adminhtml_Block_Widget_Form_Container { protected function _prepareLayout(){ parent::_prepareLayout(); } public function __construct(){ parent::__construct(); $this->_objectId = 'id'; $this->_blockGroup = 'webforms'; $this->_controller = 'adminhtml_fields'; $this->_addButton('saveandcontinue', array( 'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'), 'onclick' => "$('saveandcontinue').value = true; editForm.submit()", 'class' => 'save', ), -100); $fields = Mage::getModel('webforms/fields')->getCollection()->addFilter('webform_id',Mage::registry('webforms_data')->getId())->count(); if($fields>10){ $this->_removeButton('save'); $this->_removeButton('saveandcontinue'); $this->_addButton('save',array( 'label' => $this->__('Save'), 'onclick' => 'alert(\''.Mage::helper('webforms')->__('You have exceeded Community Edition limit!\nCommunity Edition allows you to have only 10 fields in web-form.\nUpgrade to Professional Edition.').'\')', )); } } public function getSaveUrl() { return $this->getUrl('*/adminhtml_webforms/save',array('webform_id'=>Mage::registry('webforms_data')->getId())); } public function getBackUrl(){ return $this->getUrl('*/adminhtml_webforms/edit',array('id'=>Mage::registry('webforms_data')->getId())); } public function getHeaderText(){ if( Mage::registry('fields_data') && Mage::registry('fields_data')->getId() ) { return Mage::helper('webforms')->__("Edit '%s' Field - %s", $this->htmlEscape(Mage::registry('fields_data')->getName()), $this->htmlEscape($this->htmlEscape(Mage::registry('webforms_data')->getName()))); } else { return Mage::helper('webforms')->__('Add Field - %s',$this->htmlEscape(Mage::registry('webforms_data')->getName())); } } } ?>