newsletter_preview.php

Go to the documentation of this file.
00001 <?php
00002 
00008 class Newsletter_Preview extends oxAdminDetails
00009 {
00010 
00018     public function render()
00019     {
00020         parent::render();
00021 
00022         $soxId = $this->getEditObjectId();
00023         if ($soxId != "-1" && isset($soxId)) {
00024             // load object
00025             $oNewsletter = oxNew("oxnewsletter");
00026             $oNewsletter->load($soxId);
00027             $this->_aViewData["edit"] = $oNewsletter;
00028 
00029             // user
00030             $sUserID = oxRegistry::getSession()->getVariable("auth");
00031 
00032             // assign values to the newsletter and show it
00033             $oNewsletter->prepare($sUserID, $this->getConfig()->getConfigParam('bl_perfLoadAktion'));
00034 
00035             $this->_aViewData["previewhtml"] = $oNewsletter->getHtmlText();
00036             $this->_aViewData["previewtext"] = $oNewsletter->getPlainText();
00037         }
00038 
00039         return "newsletter_preview.tpl";
00040     }
00041 }