public function init() { parent::init(); $this->_numero = $this->obtenerNumero(); if ($this->_numero != '') { $registroUsuario = new App_Model_Registro(); $post = $registroUsuario->getusuario($this->_numero); if (!empty($post["nombres"])) { $this->view->usuario = $post["nombres"]; } } $this->_GetResultSoap = $this->_helper->getHelper('GetResultSoap'); $SoapMusica = $this->_GetResultSoap->_seccionMusicaTop(); $SoapTonos = $this->view->SoapTonos = $this->_GetResultSoap->_seccionTonos(); $config = $this->getConfig(); $ua = $_SERVER['HTTP_USER_AGENT']; $model = new App_Model_ConfigPerfil(); $model->saveCdr($ua, $config->app->siteUrl); $estado = $this->_getParam('estado', ''); if (isset($estado) && $estado != '') { $this->mensaje($estado); $this->_redirect('/'); } $this->forward($this->mobileDetect()); $this->view->numero = $this->_numero; $this->view->perfil = $this->mobileDetect(); $this->view->SoapMusica = $SoapMusica->seccionMusicaTopResult->albumDetalleBE; $this->view->SoapTonos = $SoapTonos->seccionTonosResult->albumDetalleBE; }
public function init() { $this->noCache(); parent::init(); $telefono = isset($_SERVER['HTTP_X_UP_CALLING_LINE_ID']) ? $_SERVER['HTTP_X_UP_CALLING_LINE_ID'] : '111111'; if ($telefono != '') { $registroModel = new App_Model_Registro(); $data = $registroModel->obtenerRegistro($telefono); if ($data) { $this->view->estado = $data['nombre']; } $this->view->telefono = 1; } else { $this->view->telefono = 0; } $pathMUSICA = $this->_config->app->jsonMusica; $SoapMusica = json_decode(file_get_contents($pathMUSICA), true); $pathSERVICIO = $this->_config->app->jsonServicio; $SoapServicio = json_decode(file_get_contents($pathSERVICIO), true); $pathJUEGO = $this->_config->app->jsonJuego; $SoapJuego = json_decode(file_get_contents($pathJUEGO), true); $pathTEXT = $this->_config->app->jsonText; $SoapText = json_decode(file_get_contents($pathTEXT), true); $pathLINK = $this->_config->app->jsonLink; $SoapLink = json_decode(file_get_contents($pathLINK), true); $this->view->SoapMusica = $SoapMusica; $this->view->SoapJuego = $SoapJuego; $this->view->SoapText = $SoapText; $this->view->SoapServicio = $SoapServicio; $this->view->SoapLink = $SoapLink; $this->view->urlServer = $this->_config->resources->view->urlServer; }
public function init() { parent::init(); $this->_config = $this->getConfig(); $this->_numero = $this->obtenerNumero(); $ua = $_SERVER['HTTP_USER_AGENT']; $model = new App_Model_ConfigPerfil(); $controller = $this->getParam('controller'); $model->saveCdr($ua, $controller); switch ($this->mobileDetect()) { case 'basico240': $this->_helper->layout->setLayout('layout-basico240'); $this->_perfil = 1; break; case 'basico360': $this->_helper->layout->setLayout('layout-basico360'); $this->_perfil = 2; break; case 'avanzado': $this->_helper->layout->setLayout('layout-avanzado'); $this->_perfil = 3; break; } }
public function init() { parent::init(); }
public function init() { parent::init(); $ua = $_SERVER['HTTP_USER_AGENT']; $model = new App_Model_ConfigPerfil(); $controller = $this->getParam('controller'); $result = $model->getPerfil($ua, $controller); $this->view->perfil = $result["perfil"]; $perfil = $result["perfil"]; //echo "-".$perfil."-"; $this->_config = Zend_Registry::get('config'); $config = $this->getConfig(); $siteUrl = $config->app->siteUrl; $elementsUrl = $config->app->elementsUrl; $mediaRoot = $config->app->mediaRoot; $mediaUrl = $config->app->mediaUrl; $elementsRoot = $config->app->elementsRoot; /* var_dump(array('$siteUrl'=>$siteUrl, '$mediaUrl'=>$mediaUrl, '$elementsUrl'=>$elementsUrl, 'mediaRoot'=>$mediaRoot, '$elementsRoot'=>$elementsRoot) );exit; */ switch ($perfil) { case '1': $this->forward('basico'); break; case '2': $this->forward('basico128'); break; case '3': $this->forward('basico240'); break; case '4': $this->forward('basico360'); break; case '5': $this->forward('avanzado'); break; default: $this->forward('basico240'); break; } //$this->forward('avanzado'); $config = $this->getConfig(); $path = $config->app->xmlJuegos; $this->view->juegos = simplexml_load_file($path); $pathMus = $config->app->xmlMusica; $this->view->musica = simplexml_load_file($pathMus); $pathSer = $config->app->xmlServicios; $this->view->servicios = simplexml_load_file($pathSer); $a = date('s'); if (($a >= 0 and $a <= 5) || ($a > 15 and $a <= 20) || ($a > 30 and $a <= 35) || ($a > 45 and $a <= 50)) { $pathBan = $config->app->xmlBanner; } if (($a > 5 and $a <= 10) || ($a > 20 and $a <= 25) || ($a > 35 and $a <= 40) || ($a > 50 and $a <= 55)) { $pathBan = $config->app->xmlBanner2; } if (($a > 10 and $a <= 15) || ($a > 25 and $a <= 30) || ($a > 40 and $a <= 45) || ($a > 55 and $a <= 60)) { $pathBan = $config->app->xmlBanner3; } var_dump($pathBan); exit; $this->view->banner = simplexml_load_file($pathBan); }