contenedor ( 'NAVControllerNewsletters'.$edi.'.tpl', DIR_PRIVATE_MEDIO . 'NAV/templates/', DIR_RW_MEDIO . '/pres/NAV' ); $this->setHeader ( 'NAVHeaderNewsletters'.$edi.'.tpl', DIR_PRIVATE_MEDIO . 'NAV/templates/', DIR_RW_MEDIO . '/pres/NAV' ); $this->setFoot ( 'NAVFootNewsletters'.$edi.'.tpl', DIR_PRIVATE_MEDIO . 'NAV/templates/', DIR_RW_MEDIO . '/pres/NAV' ); $this->salida = new SUSNWEscaparateOU(); $vars = $this->salida->getDatalayerVars(); $this->setDtmDataLayer([ 'sysEnv' => 'web', 'publisher' => 'Los40', 'domain' => 'los40.com', 'org' => 'prisa', 'businessUnit' => 'radio', 'geoRegion' => $vars['geoRegion'], 'thematic' => 'musical', 'ssl'=> '1', 'server' => 'los40.com', 'siteID' => 'los40com', 'pageInstanceID' => $vars['pageInstanceID'], 'pageName' => 'los40com/newsletters', 'primaryCat' => 'newsletter', 'subCat1' => 'newsletter>escaparate', 'subCat2' => '', 'secondaryCategories' => $vars['secondaryCategories'], 'pageType' => 'suscripcion', 'pageTypology' => '', 'canonicalURL' => $vars['canonicalURL'], 'destinationURL' => $vars['destinationURL'], 'editionNavigation' => 'los40', 'edition' => '', 'pageTitle' => 'Newsletter | LOS40: noticias musicales y radio online con todos los éxitos', 'referringURL' => $vars['referringURL'], 'registeredUser' => $vars['registeredUser'], 'userID' => $vars['userID'], 'profileID' => $vars['profileID'], 'userType' => $vars['userType'], ]); parent::__construct(false,false,false); } public function inicio(){ $this->addCss('/css/estilos.css'); $this->addScript("js/jquery-2.1.4.min.js"); $this->addScript("js/jquery-ui.min.js"); $this->content = $this->salida->getOutput(); if ($this->addHeaderJS) $this->addAllJS(); } public function run(){ $this->inicio(); $this->paintUpperHeader(); $this->paintContent($this->content); $this->end(); } public function end(){ } public function addAllCSS(){ $css = $this->salida->getCSS(); if (empty($css)) return; foreach ($css as $route => $show){ if ($show) $this->addCss($route); } } public function addAllJS(){ $jss = $this->salida->getJS(); if (empty($jss)) return; foreach ($jss as $route => $show){ if ($show) $this->addScript($route); } } private function paintUpperHeader(){ $arrValidEdi = explode(',', ACTIVE_SECTIONS); $edi = (isset($_GET['cp']) && $_GET['cp'] != '1' && in_array($_GET['cp'], $arrValidEdi)) ? $_GET['cp'] : ''; $queryStr = $this->cleanQueryParams(array('event', 'event_log')); $extra = (!empty($queryStr)) ? '?' . $queryStr : ''; $objCipher = new \CRMCipher(SECRET_KEY_ENC_DEC_BACKURL); if ($this->salida->resVerify){ $url = URL_SUS_NEWS . $extra; $backURL=$objCipher->encrypt($url); $this->paintFrontHeader(NULL,NULL,NULL,TRUE, urlencode($backURL), $this->salida->getUserName(), $edi); } else { $url = URL_SUS_NEWS_NOSECURE . $extra; $backURL=$objCipher->encrypt($url); $this->paintFrontHeader(NULL,NULL,NULL,FALSE, urlencode($backURL), NULL, $edi); } } } $page = new EscaparateNews(); $page->run(); ?>