コード例 #1
0
 public function detalle($form = '')
 {
     $this->_view->form = $form;
     Buscador::validar($form);
     $programas = $this->loadModel('programa');
     if ($this->getInt('__SP_id__')) {
         $sql = "EXEC TS_GET_PROGRAMAS_ID " . $this->getInt('__SP_id__');
         Session::set('sess_TS_GET_PROGRAMAS_ID', $sql);
         $this->_view->objProgramas = $programas->exeTS_GET_PROGRAMAS($sql);
         //echo$sql;exit;
         if (WEB) {
             //WEB
             $sql = "EXEC TS_GET_DETALLEPROG " . $this->getInt('__SP_id__') . ", '', '" . Functions::invertirFecha(Session::get('sess_BP_fechaIn_PRG'), '/', '-') . "' ";
         } else {
             //Local
             $sql = "EXEC TS_GET_DETALLEPROG " . $this->getInt('__SP_id__') . ", '', '" . Session::get('sess_BP_fechaIn_PRG') . "' ";
         }
         Session::set('sess_TS_GET_DETALLEPROG', $sql);
         //echo $sql; exit;
         $objOpcProgramas = $programas->exeTS_GET_DETALLEPROG($sql);
         if ($objOpcProgramas) {
             if ($objOpcProgramas[0]->getError()) {
                 throw new Exception('<b>Error</b>: [' . $objOpcProgramas[0]->getError() . '] <br> <b>Mensaje</b>: [' . $objOpcProgramas[0]->getMensaje() . ']');
             } else {
                 $rutaPDF = ROOT . 'public' . DS . 'pdf' . DS . 'upl_' . str_replace(' ', '_', $this->_view->objProgramas[0]->getCodigo()) . '.pdf';
                 $this->_view->_PDF = false;
                 if (is_readable($rutaPDF)) {
                     $this->_view->_PDF = true;
                 }
                 $this->_view->objOpcProgramas = $objOpcProgramas;
                 $this->_view->pago = true;
                 //cambiar condicion false
                 /* if (Session::get('sess_boton_pago')) {
                    $this->_view->pago = true;
                    } */
                 //$this->_view->hoteles= $this->_view->objOpcProgramas[0]->getNombreHotel();
                 $this->_view->renderingCenterBox('detalleProg');
             }
         } else {
             throw new Exception('Error al cargar las opciones');
         }
     } else {
         throw new Exception('Error al cargar las opciones');
     }
 }
コード例 #2
0
 public function condicionesGenerales($form = '')
 {
     Buscador::validar($form);
     $idPrg = $this->getTexto('varCenterBox');
     if ($idPrg) {
         $CG_programa = $this->loadModel('programa');
         $this->_view->objPrograma = $CG_programa->getNota($idPrg);
         $this->_view->renderingCenterBox('condicionesGenerales');
     } else {
         throw new Exception('Error al ver las condiciones generales.');
     }
 }