コード例 #1
0
 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;
 }
コード例 #2
0
 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;
 }
コード例 #3
0
 public function dashboardRegistroAction()
 {
     try {
         $ModelRegistro = new App_Model_Registro();
         $registrousuario = $ModelRegistro->getUsuarioTotal();
         $this->view->registro = $registrousuario;
     } catch (Exception $e) {
         echo $e->getMessage();
     }
 }
コード例 #4
0
 public function registrateAction()
 {
     $registroModel = new App_Model_Registro();
     if ($this->_request->isPost()) {
         $dataForm = $this->_request->getPost();
         try {
             $this->validar($dataForm);
             if (!isset($dataForm['opt'])) {
                 $dataForm['opt'] = 'no';
             }
             if (!isset($dataForm['prd'])) {
                 $dataForm['opt'] = 'no';
             }
             if (!isset($dataForm['optlocalizacion'])) {
                 $dataForm['opt'] = 'no';
             }
             if (is_numeric($dataForm['dia']) && strlen($dataForm['dia']) == 2) {
                 if (is_numeric($dataForm['mes']) && strlen($dataForm['mes']) == 2) {
                     if (is_numeric($dataForm['anio']) && strlen($dataForm['anio']) == 4) {
                         $fecha_nacimiento = $dataForm['anio'] . '-' . $dataForm['mes'] . '-' . $dataForm['dia'];
                     }
                 }
             } else {
                 $this->_flashMessage->success('fecha de nacimiento invalido');
                 header("Location: /portalwap/registrate");
                 exit;
             }
             $telefono = isset($_SERVER['HTTP_X_UP_CALLING_LINE_ID']) ? $_SERVER['HTTP_X_UP_CALLING_LINE_ID'] : '';
             $registro = array('numero' => $telefono, 'nombre' => $dataForm['nombre'], 'apellido' => $dataForm['apellido'], 'dni' => $dataForm['dni'], 'correo' => $dataForm['correo'], 'opt' => $dataForm['opt'], 'prd' => $dataForm['prd'], 'fecha_nacimiento' => $fecha_nacimiento, 'sexo' => $dataForm['sexo'], 'provincia' => $dataForm['provincia'], 'estado_civil' => $dataForm['estado_civil'], 'fecha_registro' => date('Y-m-d'), 'nivel_educacion' => $dataForm['nivel_educacion'], 'profesion' => $dataForm['profesion'], 'optlocalizacion' => $dataForm['optlocalizacion']);
             $idRegistro = $registroModel->inserRegistro($registro);
             $registroModel->inserRegistroAreas($dataForm['area_interes'], $idRegistro);
             header("Location: /portalwap/");
         } catch (Exception $e) {
             echo $e->getMessage();
         }
     } else {
         $resultadoAras = $registroModel->getAreas();
         $this->view->areas = $resultadoAras;
     }
 }