Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for ionCube Encoder)
- *
- * @ Version : 1.1.3.0
- * @ Author : DeZender
- * @ Release on : 17.05.2011
- * @ Official site : http://DeZender.Net
- *
- */
- class Cerebrum_All_Model_Observer
- {
- const MODULE_NAME = "Cerebrum_All";
- public function preDispatch( $observer )
- {
- if ( Mage::getsingleton( "admin/session" )->isLoggedIn() ) {
- $feedModel = Mage::getmodel( "all/feed" );
- $feedModel->checkUpdate();
- }
- }
- public function core_block_abstract_to_html_before( $observer = NULL )
- {
- try {
- if ( "1.4.1" <= Mage::getversion() ) {
- return $this;
- }
- if ( $observer == null ) {
- return $this;
- }
- $event = $observer->getEvent();
- $block = $event->getBlock();
- $block_name = $block->getNameInLayout();
- $action = $block->getAction();
- $action_name = gettype( $action ) == "object" ? $action->getFullActionName() : "";
- $processor = "";
- if ( $action_name == "checkout_onepage_success" && strpos( $block_name, "content" ) === 0 ) {
- $processor = "SuccessPageProcessor";
- }
- if ( $processor != "" ) {
- $html = $this->GetBlockHtml( $block );
- $html = $this->$processor( $html );
- $this->SetBlockHtml( $block, $html );
- }
- if ( $action_name == "adminhtml_dashboard_index" && strpos( $block_name, "content" ) === 0 ) {
- $processor = "AdminhtmlDashboardIndex_Content";
- }
- if ( $processor != "" ) {
- $html = $this->GetBlockHtml( $block );
- $html = $this->$processor( $html );
- $this->SetBlockHtml( $block, $html );
- }
- }
- catch ( Exception $e ) {
- echo $e->getMessage();
- }
- return $this;
- }
- public function core_block_abstract_to_html_after( $observer = null )
- {
- try {
- if ( Mage::getversion() < "1.4.1" ) {
- return $this;
- }
- if ( $observer == null ) {
- return $this;
- }
- $event = $observer->getEvent();
- $block_name = $event->getBlock()->getNameInLayout();
- $action_name = gettype( $event->getBlock()->getAction() ) == "object" ? $event->getBlock()->getAction()->getFullActionName() : "";
- $transport = $event->getTransport();
- if ( $action_name == "checkout_onepage_success" && strpos( $block_name, "content" ) === 0 ) {
- $transport['html'] = $this->SuccessPageProcessor( $transport['html'] );
- }
- if ( "checkout.success" == $observer->getEvent()->getBlock()->getNameInLayout() && !Mage::getstoreconfig( "advanced/modules_disable_output/" . self::MODULE_NAME ) ) {
- $block = new Cerebrum_All_Block_Googleadwordsconversion();
- $block->setPassingTransport( $transport['html'] );
- $block->toHtml();
- $block = new Cerebrum_All_Block_Ebit();
- $block->setPassingTransport( $transport['html'] );
- $block->toHtml();
- }
- if ( $action_name == "adminhtml_dashboard_index" && strpos( $block_name, "content" ) === 0 ) {
- $transport['html'] = $this->AdminhtmlDashboardIndex_Content( $transport['html'] );
- }
- }
- catch ( Exception $e ) {
- echo $e->getMessage();
- }
- return $this;
- }
- ..............
- ......
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement