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;
 }
Beispiel #2
0
 public function obtenerPerfil($Banners)
 {
     $ua = $_SERVER['HTTP_USER_AGENT'];
     $model = new App_Model_ConfigPerfil();
     $controller = $this->getParam('controller');
     $model->getPerfil($ua, $controller, 'index', 'home', 'index');
     $result = $model->getPerfil($ua, $controller, $Banners);
     return $result["perfil"];
 }
Beispiel #3
0
 public function indexAction()
 {
     $enlace = $this->getParam('enlace');
     $perfil = $this->getParam('perfil');
     if ($this->validaPerfil($perfil) and $enlace) {
         $model = new App_Model_ConfigPerfil();
         $data['perfil'] = $perfil;
         $result = $model->registerCdr($_SERVER['HTTP_USER_AGENT'], $data, $enlace);
         if ($result) {
             $this->_redirect($enlace);
         } else {
             $this->_redirect('/index');
         }
     } else {
         $this->_redirect('/index');
     }
 }
 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);
 }
 public function goAction()
 {
     $_getVars = $_GET;
     $_key = array_keys($_getVars);
     $_valor = array_values($_getVars);
     $numGet = count($_getVars);
     $bucleGet = $numGet - 1;
     $link = '';
     for ($x = 2; $x <= $bucleGet; $x++) {
         if ($x == 2) {
             $link .= $_valor[$x];
         } else {
             $link .= "&" . $_key[$x] . "=" . $_valor[$x];
         }
     }
     $ua = $_SERVER['HTTP_USER_AGENT'];
     $model = new App_Model_ConfigPerfil();
     $controller = $this->getParam('controller');
     $model->getPerfil($ua, $controller, $link, $_GET['categoria'], $_GET['descripcion']);
     header("Location: " . $link);
     exit;
 }
 public function goAction()
 {
     $_getVars = $_GET;
     $_key = array_keys($_getVars);
     $_valor = array_values($_getVars);
     $numGet = count($_getVars);
     $bucleGet = $numGet - 1;
     for ($x = 0; $x <= $bucleGet; $x++) {
         if ($x == 0) {
             $link .= $_valor[$x];
         } else {
             $link .= "&" . $_key[$x] . "=" . $_valor[$x];
         }
     }
     $ua = $_SERVER['HTTP_USER_AGENT'];
     $model = new App_Model_ConfigPerfil();
     $model->saveCdr($ua, $link);
     header("Location: " . $link);
     exit;
 }