public function index($form = '') { $this->_view->_stilo = 'left: 169px;'; $item = Buscador::validar($form); $this->_view->url = Buscador::getUrl(); //echo "IFRAME= ".Session::get('sess_iframe'); $this->_view->form = $form; $this->_view->setJS(array('validaCampos', 'bloqueos', 'json')); //$this->getLibrary('kint/Kint.class'); $this->_view->ML_fechaIni = Session::get('sess_BP_fechaIn'); $this->_view->ML_fechaFin = Session::get('sess_BP_fechaOut'); $this->_view->objCiudades = $this->_ciudad->getCiudadesBloq(); $this->_view->objCiudadesPRG = $this->_ciudad->getCiudadesPRG(); if (Session::get('sess_BP_ciudadDes')) { $this->loadDTO('incluye'); $bloqueos = $this->loadModel('bloqueo'); $valFechaIn = Functions::validarFecha(Session::get('sess_BP_fechaIn')); $valFechaOut = Functions::validarFecha(Session::get('sess_BP_fechaOut')); if (!$valFechaIn || !$valFechaOut) { Session::set('sess_error_fechas', true); $this->redireccionar('system'); } if (WEB) { //Web $sql = "exec TS_GET_BLOQUEOS_PROG '" . Session::get('sess_BP_ciudadDes') . "', " . "'" . Functions::invertirFecha(Session::get('sess_BP_fechaIn'), '/', '-') . "', " . "'" . Functions::invertirFecha(Session::get('sess_BP_fechaOut'), '/', '-') . "', " . "'" . Session::get('sess_BP_hotel') . "'"; } else { //Local $sql = "exec TS_GET_BLOQUEOS_PROG '" . Session::get('sess_BP_ciudadDes') . "', " . "'" . str_replace('/', '-', Session::get('sess_BP_fechaIn')) . "', " . "'" . str_replace('/', '-', Session::get('sess_BP_fechaOut')) . "', " . "'" . Session::get('sess_BP_hotel') . "'"; } for ($i = 1; $i <= 3; $i++) { $sql .= ", '" . Session::get('sess_BP_Adl_' . $i) . "', '" . Session::get('sess_BP_edadChd_1_' . $i) . "', \n '" . Session::get('sess_BP_edadChd_2_' . $i) . "', '" . Session::get('sess_BP_Inf_' . $i) . "'"; //habitaciones } Session::set('sess_sql_TraeProg', $sql); //echo $sql; exit; //$this->_view->objCiudadBloq= $this->_ciudad->getCiudadesBloq(Session::get('sess_BP_ciudadDes_PRG')); $this->_view->objBloqueos = $bloqueos->TS_GET_BLOQUEOS_PROG($sql, true); $this->_view->objBloqueosCNT = count($this->_view->objBloqueos); } else { $this->_view->objBloqueos = ''; } $us = $this->loadModel('usuario'); $tcambio = $us->getPaisTc(Session::get('sess_BP_ciudadDes')); $TcambioSess = $us->getTcambio($tcambio); Session::set('sess_tcambio', $TcambioSess->getTipoCambio()); //Session::destroy('sess_BP_ciudadDes_PRG'); $this->_view->currentMenu = 11; //$this->_view->procesoTerminado=false; $this->_view->titulo = 'ORISTRAVEL - PANAMERICANA'; $this->_view->renderingSystem('bloqueos', $item); }
public function index($form = '') { $item = Buscador::validar($form); $this->_view->form = $form; $this->_view->url = Buscador::getUrl(); $this->_view->setJS(array('validaCampos', 'programas')); //$this->getLibrary('kint/Kint.class'); $this->_view->ML_fechaIni_PRG = Session::get('sess_BP_fechaIn_PRG'); $this->_view->ML_fechaFin_PRG = Session::get('sess_BP_fechaOut_PRG'); $this->_view->objCiudades = $this->_ciudad->getCiudadesBloq(); $this->_view->objCiudadesPRG = $this->_ciudad->getCiudadesPRG(); $this->_view->CiudadPrg = Session::get('sess_BP_ciudadDes_PRG'); $this->_view->pago = true; // cambiar a false /* if (Session::get('sess_boton_pago')) { $this->_view->pago = true; } */ if (Session::get('sess_BP_ciudadDes_PRG')) { //$this->loadDTO('incluye'); $programas = $this->loadModel('programa'); if (WEB) { //WEB $sql = "EXEC TS_GET_PROGRAMAS '" . Session::get('sess_BP_ciudadDes_PRG') . "', '', '" . Functions::invertirFecha(Session::get('sess_BP_fechaIn_PRG'), '/', '-') . "' "; } else { //Local $sql = "EXEC TS_GET_PROGRAMAS '" . Session::get('sess_BP_ciudadDes_PRG') . "', '', '" . str_replace('/', '-', Session::get('sess_BP_fechaIn_PRG')) . "' "; } Session::set('sess_TS_GET_PROGRAMAS', $sql); //echo $sql; exit; //Kint::dump( $programas->exeTS_GET_PROGRAMAS($sql) ); $this->_view->objCiudadBs = $this->_ciudad->getCiudad(Session::get('sess_BP_ciudadDes_PRG')); $this->_view->objProgramas = $programas->exeTS_GET_PROGRAMAS($sql); //$this->_view->objProgramasCNT = count($this->_view->objProgramas); } $us = $this->loadModel('usuario'); $tcambio = $us->getPaisTcProg(Session::get('sess_BP_ciudadDes_PRG')); $TcambioSess = $us->getTcambio($tcambio); Session::set('sess_tcambio', $TcambioSess->getTipoCambio()); //Session::destroy('sess_BP_ciudadDes'); $this->_view->currentMenu = 22; $this->_view->procesoTerminado = false; $this->_view->titulo = 'ORISTRAVEL'; $this->_view->renderingSystem('programas', $item); }