当前位置: 首页>>代码示例>>PHP>>正文


PHP request\requestClass类代码示例

本文整理汇总了PHP中mvc\request\requestClass的典型用法代码示例。如果您正苦于以下问题:PHP requestClass类的具体用法?PHP requestClass怎么用?PHP requestClass使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了requestClass类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: execute

 public function execute()
 {
     try {
         $fields = array(pagoEmpleadosTableClass::ID, pagoEmpleadosTableClass::ID_EMPLEADO, pagoEmpleadosTableClass::NOMBRE, pagoEmpleadosTableClass::FECHA_INICIO, pagoEmpleadosTableClass::FECHA_FIN, pagoEmpleadosTableClass::FECHA_PAGO, pagoEmpleadosTableClass::TOTAL);
         $fieldsEmpleado = array(empleadoTableClass::ID, empleadoTableClass::NUMERO_DOC);
         $fields2 = array(empleadoTableClass::ID);
         $fJoin1 = pagoEmpleadosTableClass::ID_EMPLEADO;
         $fJoin2 = empleadoTableClass::ID;
         $orderBy = array(pagoEmpleadosTableClass::ID);
         $page = 0;
         if (request::getInstance()->hasGet('page')) {
             $page = request::getInstance()->getGet('page') - 1;
             $page = $page * config::getRowGrid();
         }
         $f = array(pagoEmpleadosTableClass::ID);
         $lines = config::getRowGrid();
         $this->cntPages = pagoEmpleadosTableClass::getAllCount($f, false, $lines);
         if (request::getInstance()->hasGet('page')) {
             $this->page = request::getInstance()->getGet('page');
         } else {
             $this->page = $page;
         }
         $this->objPago = pagoEmpleadosTableClass::getAllJoin($fields, $fields2, null, null, $fJoin1, $fJoin2, null, null, null, null, false, $orderBy, 'ASC', config::getRowGrid(), $page);
         $this->objEmpleado = empleadoTableClass::getAll($fieldsEmpleado, true);
         $this->defineView('index', 'pago', session::getInstance()->getFormatOutput());
     } catch (PDOException $exc) {
         session::getInstance()->setFlash('exc', $exc);
         routing::getInstance()->forward('shfSecurity', 'exception');
     }
 }
开发者ID:rooseveltDiaz,项目名称:proyecto_porcicola,代码行数:30,代码来源:indexPagoActionClass.php

示例2: execute

 public function execute()
 {
     try {
         if (request::getInstance()->hasRequest(pVentaTableClass::ID)) {
             $idFactura = request::getInstance()->getRequest(pVentaTableClass::ID);
             $fields = array(dpVentaTableClass::NUMERO_DOCUMENTO, dpVentaTableClass::PESO_ANIMAL, dpVentaTableClass::PRECIO_ANIMAL, dpVentaTableClass::ANIMAL_ID);
             $orderBy = array(dpVentaTableClass::ID);
             $where = array(dpVentaTableClass::NUMERO_DOCUMENTO => $idFactura);
             $page = 0;
             if (request::getInstance()->hasGet('page')) {
                 $page = request::getInstance()->getGet('page') - 1;
                 $page = $page * config::getRowGrid();
             }
             $f = array(detalleVacunacionTableClass::ID);
             $whereCnt = array(detalleVacunacionTableClass::ID => $id);
             $lines = config::getRowGrid();
             $this->cntPages = detalleVacunacionTableClass::getAllCount($f, true, $lines, $whereCnt);
             $this->objVacunacion = vacunacionTableClass::getAll($fieldsVacunacion, true, null, null, null, null, $whereVacunacion);
             $this->objDetalleVacunacion = detalleVacunacionTableClass::getAll($fields, true, $orderBy, 'ASC', 10, $page, $where);
             $this->defineView('view', 'vacunacion', session::getInstance()->getFormatOutput());
         } else {
             session::getInstance()->setError('pailas');
             routing::getInstance()->redirect('vacunacion', 'indexVacunacion');
         }
     } catch (PDOException $exc) {
         session::getInstance()->setFlash('exc', $exc);
         routing::getInstance()->forward('shfSecurity', 'exception');
     }
 }
开发者ID:rooseveltDiaz,项目名称:proyecto_porcicola,代码行数:29,代码来源:viewActionClass.php

示例3: execute

 public function execute()
 {
     try {
         $fields = array(loteTableClass::ID, loteTableClass::NOMBRE);
         $orderBy = array(loteTableClass::ID);
         $page = 0;
         if (request::getInstance()->hasGet('page')) {
             $page = request::getInstance()->getGet('page') - 1;
             $page = $page * config::getRowGrid();
         }
         $f = array(loteTableClass::ID);
         if (request::getInstance()->hasGet('page')) {
             $this->page = request::getInstance()->getGet('page');
         } else {
             $this->page = $page;
         }
         $lines = config::getRowGrid();
         $this->cntPages = loteTableClass::getAllCount($f, true, $lines);
         //$this->page = request::getInstance()->getGet('page');
         $this->objLote = loteTableClass::getAll($fields, true, $orderBy, 'ASC', config::getRowGrid(), $page);
         $this->defineView('index', 'lote', session::getInstance()->getFormatOutput());
     } catch (PDOException $exc) {
         session::getInstance()->setFlash('exc', $exc);
         routing::getInstance()->forward('shfSecurity', 'exception');
     }
 }
开发者ID:rooseveltDiaz,项目名称:proyecto_porcicola,代码行数:26,代码来源:indexLoteActionClass.php

示例4: execute

 public function execute()
 {
     try {
         $where = null;
         if (request::getInstance()->hasRequest('filter')) {
             $report = request::getInstance()->getPost('filter');
             if (isset($report['numero']) and $report['numero'] !== null and $report['numero'] !== '') {
                 $where[registroPesoTableClass::getNameTable() . '.' . registroPesoTableClass::ANIMAL] = $report['numero'];
             }
             //close if
         }
         //close if
         $fields = array(registroPesoTableClass::FECHA, registroPesoTableClass::ID, registroPesoTableClass::KILO, registroPesoTableClass::PESO, registroPesoTableClass::VALOR);
         $fieldsEmpleado = array(empleadoTableClass::ID, empleadoTableClass::NOMBRE);
         $fieldsAnimal = array(animalTableClass::ID, animalTableClass::NUMERO);
         $fJoin1 = registroPesoTableClass::EMPLEADO;
         $fJoin2 = empleadoTableClass::ID;
         $fJoin3 = registroPesoTableClass::ANIMAL;
         $fJoin4 = animalTableClass::ID;
         $orderBy = array(registroPesoTableClass::FECHA);
         $this->mensaje = "Informe de Registros de Peso Diario del Cerdo";
         $this->objRegistroPeso = registroPesoTableClass::getAllJoin($fields, $fieldsEmpleado, $fieldsAnimal, null, $fJoin1, $fJoin2, $fJoin3, $fJoin4, null, null, true, $orderBy, 'ASC', null, null, $where);
         log::register(i18n::__('reporte'), registroPesoTableClass::getNameTable());
         $this->defineView('indexRegistroPeso', 'animal', session::getInstance()->getFormatOutput());
     } catch (PDOException $exc) {
         session::getInstance()->setFlash('exc', $exc);
         routing::getInstance()->forward('shfSecurity', 'exception');
     }
 }
开发者ID:rooseveltDiaz,项目名称:proyecto_porcicola,代码行数:29,代码来源:reportRegistroPesoActionClass.php

示例5: execute

 public function execute()
 {
     try {
         $where = null;
         if (request::getInstance()->hasRequest('filter')) {
             $report = request::getInstance()->getPost('filter');
             if (isset($report['fecha_inicio']) and $report['fecha_inicio'] !== null and $report['fecha_inicio'] !== '' and isset($report['fecha_fin']) and $report['fecha_fin'] !== null and $report['fecha_fin'] !== '') {
                 $where[salidaBodegaTableClass::getNameTable() . '.' . salidaBodegaTableClass::FECHA] = array(date(config::getFormatTimestamp(), strtotime($report['fecha_inicio'] . ' 00.00.00')), date(config::getFormatTimestamp(), strtotime($report['fecha_fin'] . ' 23.59.59')));
             }
             //close if
             if (isset($report['empleado']) and $report['empleado'] !== null and $report['empleado'] !== '') {
                 $where[salidaBodegaTableClass::getNameTable() . '.' . salidaBodegaTableClass::EMPLEADO] = $report['empleado'];
             }
         }
         $fields = array(salidaBodegaTableClass::ID, salidaBodegaTableClass::FECHA, salidaBodegaTableClass::EMPLEADO);
         $fieldsEmpleado = array(empleadoTableClass::ID, empleadoTableClass::NOMBRE);
         $fJoin1 = salidaBodegaTableClass::EMPLEADO;
         $fJoin2 = empleadoTableClass::ID;
         $orderBy = array(salidaBodegaTableClass::ID);
         $this->mensaje = "Informe de Salidas de Bodega";
         $this->objSalida = salidaBodegaTableClass::getAllJoin($fields, $fieldsEmpleado, null, null, $fJoin1, $fJoin2, null, null, null, null, true, $orderBy, 'ASC', null, null, $where);
         log::register(i18n::__('reporte'), salidaBodegaTableClass::getNameTable());
         $this->defineView('index', 'salidaBodega', session::getInstance()->getFormatOutput());
     } catch (PDOException $exc) {
         session::getInstance()->setFlash('exc', $exc);
         routing::getInstance()->forward('shfSecurity', 'exception');
     }
 }
开发者ID:rooseveltDiaz,项目名称:proyecto_porcicola,代码行数:28,代码来源:reportSalidaBodegaActionClass.php

示例6: execute

 public function execute()
 {
     try {
         if (request::getInstance()->isMethod('POST')) {
             $id_registro = request::getInstance()->getPost(detalleEntradaBodegaTableClass::getNameField(detalleEntradaBodegaTableClass::ID_ENTRADA, true));
             $tipo_insumo = request::getInstance()->getPost(detalleEntradaBodegaTableClass::getNameField(detalleEntradaBodegaTableClass::TIPO_INSUMO, true));
             $id_insumo = request::getInstance()->getPost(detalleEntradaBodegaTableClass::getNameField(detalleEntradaBodegaTableClass::ID_INSUMO, true));
             $cantidad = request::getInstance()->getPost(detalleEntradaBodegaTableClass::getNameField(detalleEntradaBodegaTableClass::CANDITDAD, true));
             detalleEntradaBodegaTableClass::validateCreate($tipo_insumo, $id_insumo, $cantidad);
             //Manejo de inventario
             $fieldsInventario = array(insumoTableClass::CANTIDAD);
             $whereInventario = array(insumoTableClass::ID => $id_insumo);
             $objInsumoInventario = insumoTableClass::getAll($fieldsInventario, true, null, null, null, null, $whereInventario);
             $insumoInventario = $objInsumoInventario[0]->cantidad + $cantidad;
             $id_inventario_insumo = array(insumoTableClass::ID => $id_insumo);
             $data_inventario_insuom = array(insumoTableClass::CANTIDAD => $insumoInventario);
             insumoTableClass::update($id_inventario_insumo, $data_inventario_insuom);
             $data = array(detalleEntradaBodegaTableClass::CANDITDAD => $cantidad, detalleEntradaBodegaTableClass::ID_ENTRADA => $id_registro, detalleEntradaBodegaTableClass::ID_INSUMO => $id_insumo, detalleEntradaBodegaTableClass::TIPO_INSUMO => $tipo_insumo);
             //                print_r($data);
             //                  exit();
             detalleEntradaBodegaTableClass::insert($data);
             session::getInstance()->setSuccess(i18n::__('succesCreate2', null, 'bodega'));
             log::register(i18n::__('create'), detalleEntradaBodegaTableClass::getNameTable());
             routing::getInstance()->redirect('bodega', 'indexEntrada');
         } else {
             log::register(i18n::__('create'), detalleEntradaBodegaTableClass::getNameTable(), i18n::__('errorCreateBitacora'));
             session::getInstance()->setError('El Detalle de Vacunación no pudo ser insertado');
             routing::getInstance()->redirect('bodega', 'indexEntrada');
         }
         //close if
     } catch (PDOException $exc) {
         session::getInstance()->setFlash('exc', $exc);
         routing::getInstance()->forward('shfSecurity', 'exception');
     }
 }
开发者ID:rooseveltDiaz,项目名称:proyecto_porcicola,代码行数:35,代码来源:createDetalleEntradaActionClass.php

示例7: execute

 public function execute()
 {
     try {
         if (request::getInstance()->isMethod('POST')) {
             $id = request::getInstance()->getPost(usuarioTableClass::getNameField(usuarioTableClass::ID, true));
             $password = request::getInstance()->getPost(usuarioTableClass::getNameField(usuarioTableClass::PASSWORD, true));
             $rePassword = request::getInstance()->getPost(usuarioTableClass::getNameField(usuarioTableClass::SECOND_PASSWORD, true));
             $idPregunta = request::getInstance()->getPost(usuarioTableClass::getNameField(usuarioTableClass::RESTAURAR_ID, true));
             $respuesta = request::getInstance()->getPost(usuarioTableClass::getNameField(usuarioTableClass::RESPUESTA_SECRETA, true));
             $flag = true;
             if ($flag == true) {
                 request::getInstance()->setMethod('GET');
             }
             $ids = array(usuarioTableClass::ID => $id);
             $data = array(usuarioTableClass::PASSWORD => md5($password), usuarioTableClass::RESTAURAR_ID => $idPregunta, usuarioTableClass::RESPUESTA_SECRETA => $respuesta);
             usuarioTableClass::update($ids, $data);
             routing::getInstance()->getUrlObj('shfSecurity', 'index');
         } else {
             routing::getInstance()->forward('recuperar', 'consultar');
         }
     } catch (PDOException $exc) {
         session::getInstance()->setFlash('exc', $exc);
         routing::getInstance()->forward('shfSecurity', 'exception');
     }
 }
开发者ID:rooseveltDiaz,项目名称:proyecto_porcicola,代码行数:25,代码来源:recuperarActionClass.php

示例8: execute

 public function execute()
 {
     try {
         if (request::getInstance()->isMethod('POST')) {
             $id = request::getInstance()->getPost(registroPartoTableClass::getNameField(registroPartoTableClass::ID, true));
             $fecha = request::getInstance()->getPost(registroPartoTableClass::getNameField(registroPartoTableClass::FECHA_NACIMIENTO, true));
             $hembras = request::getInstance()->getPost(registroPartoTableClass::getNameField(registroPartoTableClass::HEMBRAS_NACIDAS_VIVAS, true));
             $machos = request::getInstance()->getPost(registroPartoTableClass::getNameField(registroPartoTableClass::MACHOS_NACIDOS_VIVOS, true));
             $muertos = request::getInstance()->getPost(registroPartoTableClass::getNameField(registroPartoTableClass::NACIDOS_MUERTOS, true));
             //                $raza = request::getInstance()->getPost(registroPartoTableClass::getNameField(registroPartoTableClass::RAZA_ID, true));
             $animal_id = request::getInstance()->getPost(registroPartoTableClass::getNameField(registroPartoTableClass::ANIMAL_ID, true));
             //  $fecha = request::getInstance()->getPost(registroPartoTableClass::getNameField(registroPartoTableClass::FECHA_NACIMIENTO, true));
             //                $caracteres = validator::getInstance()->validatorCharactersSpecial($nombre);
             //
             //                if ($caracteres == true) {
             //                    throw new PDOException(i18n::__(10005, null, 'errors', null, 10005));
             //                }
             $ids = array(registroPartoTableClass::ID => $id);
             $data = array(registroPartoTableClass::FECHA_NACIMIENTO => $fecha, registroPartoTableClass::HEMBRAS_NACIDAS_VIVAS => $hembras, registroPartoTableClass::MACHOS_NACIDOS_VIVOS => $machos, registroPartoTableClass::NACIDOS_MUERTOS => $muertos, registroPartoTableClass::ANIMAL_ID => $animal_id);
             registroPartoTableClass::update($ids, $data);
             session::getInstance()->setSuccess(i18n::__('succesUpdate', null, 'parto'));
             log::register(i18n::__('update'), registroPartoTableClass::getNameTable());
             routing::getInstance()->redirect('animal', 'indexRegistroParto');
         } else {
             log::register(i18n::__('update'), registroPartoTableClass::getNameTable(), i18n::__('errorUpdateBitacora'));
             session::getInstance()->setError(i18n::__('errorUpdate'));
             routing::getInstance()->redirect('animal', 'indexRegistroParto');
         }
     } catch (PDOException $exc) {
         session::getInstance()->setFlash('exc', $exc);
         routing::getInstance()->forward('shfSecurity', 'exception');
     }
 }
开发者ID:rooseveltDiaz,项目名称:proyecto_porcicola,代码行数:33,代码来源:updateRegistroPartoActionClass.php

示例9: execute

 public function execute()
 {
     try {
         if (request::getInstance()->hasRequest(ciudadTableClass::ID)) {
             $fields = array(datosUsuarioTableClass::APELLIDOS, datosUsuarioTableClass::TIPO_DOC, datosUsuarioTableClass::NUMERO_DOCUMENTO, datosUsuarioTableClass::CREATED_AT, datosUsuarioTableClass::DIRECCION, datosUsuarioTableClass::ID, datosUsuarioTableClass::NOMBRE, datosUsuarioTableClass::TELEFONO, datosUsuarioTableClass::CORREO);
             $whereDatos = array(datosUsuarioTableClass::ID => request::getInstance()->getRequest(datosUsuarioTableClass::ID));
             $fields2 = array(ciudadTableClass::ID, ciudadTableClass::NOMBRE);
             $fields3 = array(usuarioTableClass::ID, usuarioTableClass::USER);
             $whereUsuario = array(usuarioTableClass::ID => request::getInstance()->getRequest(datosUsuarioTableClass::ID));
             $fields4 = array(tipoDocumentoUsuarioTableClass::ID, tipoDocumentoUsuarioTableClass::DESCRIPCION);
             $this->objTipoDoc = tipoDocumentoUsuarioTableClass::getAll($fields4, false);
             $this->objUsuario = usuarioTableClass::getAll($fields3, false, null, null, null, null, $whereUsuario);
             $this->objCiudad = ciudadTableClass::getAll($fields2);
             $this->objDatos = datosUsuarioTableClass::getAll($fields, false, null, null, null, null, $whereDatos);
             $this->defineView('edit', 'dataUser', session::getInstance()->getFormatOutput());
         } else {
             routing::getInstance()->redirect('dataUser', 'index');
         }
     } catch (PDOException $exc) {
         echo $exc->getMessage();
         echo '<br>';
         echo '<pre>';
         print_r($exc->getTrace());
         echo '</pre>';
     }
 }
开发者ID:rooseveltDiaz,项目名称:proyecto_porcicola,代码行数:26,代码来源:editActionClass.php

示例10: execute

 public function execute()
 {
     try {
         if (request::getInstance()->isMethod('POST') and request::getInstance()->isAjaxRequest()) {
             $id = request::getInstance()->getPost(usuarioTableClass::getNameField(usuarioTableClass::ID, true));
             //$observacion = request::getInstance()->getPost(usuarioTableClass::getNameField(usuarioTableClass::OBSERVACION, true));
             $ids = array(usuarioTableClass::ID => $id);
             $idDato = array(datosUsuarioTableClass::USUARIO_ID => $id);
             datosUsuarioTableClass::delete($idDato, true);
             usuarioTableClass::delete($ids, true);
             $this->arrayAjax = array('code' => 11, 'msg' => 'La eliminacion ha sido exitosa');
             $this->defineView('delete', 'usuario', session::getInstance()->getFormatOutput());
             log::register(i18n::__('delete'), usuarioTableClass::getNameTable());
             session::getInstance()->setSuccess(i18n::__('succesDelete', null, 'user'));
         } else {
             session::getInstance()->setError(i18n::__('errorDelete', null, 'user'));
             routing::getInstance()->redirect('usuario', 'index');
         }
         //close if
     } catch (PDOException $exc) {
         echo $exc->getMessage();
         echo '<br>';
         echo '<pre>';
         print_r($exc->getTrace());
         echo '</pre>';
     }
 }
开发者ID:rooseveltDiaz,项目名称:proyecto_porcicola,代码行数:27,代码来源:deleteActionClass.php

示例11: execute

 public function execute()
 {
     try {
         if (request::getInstance()->isMethod('POST')) {
             $id = request::getInstance()->getPost(clienteTableClass::getNameField(clienteTableClass::ID, true));
             $TIPO_DOCUMENTO_ID = request::getInstance()->getPost(clienteTableClass::getNameField(clienteTableClass::TIPO_DOCUMENTO_ID, true));
             $IDENTIFICACION = request::getInstance()->getPost(clienteTableClass::getNameField(clienteTableClass::IDENTIFICACION, true));
             $NOMBRE = request::getInstance()->getPost(clienteTableClass::getNameField(clienteTableClass::NOMBRE, true));
             $APELLIDO = request::getInstance()->getPost(clienteTableClass::getNameField(clienteTableClass::APELLIDO, true));
             $CELULAR = request::getInstance()->getPost(clienteTableClass::getNameField(clienteTableClass::CELULAR, true));
             $TELEFONO = request::getInstance()->getPost(clienteTableClass::getNameField(clienteTableClass::TELEFONO, true));
             $DIRECCION = request::getInstance()->getPost(clienteTableClass::getNameField(clienteTableClass::DIRECCION, true));
             $CORREO = request::getInstance()->getPost(clienteTableClass::getNameField(clienteTableClass::CORREO, true));
             $FECHA_NACIMIENTO = request::getInstance()->getPost(clienteTableClass::getNameField(clienteTableClass::FECHA_NACIMIENTO, true));
             $LOCALIDAD_ID = request::getInstance()->getPost(clienteTableClass::getNameField(clienteTableClass::LOCALIDAD_ID, true));
             //        $USUARIO_ID = request::getInstance()->getPost(codeudorTableClass::getNameField(clienteTableClass::USUARIO_ID, true));
             $id = array(clienteTableClass::ID => $id);
             $data = array(clienteBaseTableClass::TIPO_DOCUMENTO_ID => $TIPO_DOCUMENTO_ID, clienteBaseTableClass::IDENTIFICACION => $IDENTIFICACION, clienteBaseTableClass::NOMBRE => $NOMBRE, clienteBaseTableClass::APELLIDO => $APELLIDO, clienteBaseTableClass::CELULAR => $CELULAR, clienteBaseTableClass::TELEFONO => $TELEFONO, clienteBaseTableClass::CORREO => $CORREO, clienteBaseTableClass::DIRECCION => $DIRECCION, clienteBaseTableClass::FECHA_NACIMIENTO => $FECHA_NACIMIENTO, clienteBaseTableClass::LOCALIDAD_ID => $LOCALIDAD_ID);
             clienteTableClass::update($id, $data);
         }
         session::getInstance()->setSuccess('El registro fue modificado exitosamente');
         routing::getInstance()->redirect('@cliente_lista');
         //$this->defineView('editBanco', 'banco', session::getInstance()->getFormatOutput());
     } catch (PDOException $exc) {
         session::getInstance()->setFlash('exc', $exc);
         routing::getInstance()->forward('shfSecurity', 'exception');
     }
 }
开发者ID:jordanMarin,项目名称:prestamo,代码行数:28,代码来源:updateClienteActionClass.php

示例12: execute

 public function execute()
 {
     try {
         if (request::getInstance()->isMethod('POST')) {
             $nombre = request::getInstance()->getPost(credencialTableClass::getNameField(credencialTableClass::NOMBRE, true));
             //                $fields = array(
             //                    credencialTableClass::NOMBRE
             //                );
             //                $objCreden = credencialTableClass::getAll($fields);
             $data = array(credencialTableClass::NOMBRE => $nombre);
             credencialTableClass::insert($data);
             credencialTableClass::validatCreate($nombre);
             session::getInstance()->setSuccess(i18n::__('succesCreate', null, 'default'));
             log::register(i18n::__('create'), credencialTableClass::getNameTable());
             routing::getInstance()->redirect('usuario', 'indexCredencial');
         } else {
             log::register(i18n::__('create'), credencialTableClass::getNameTable(), i18n::__('errorCreateBitacora'));
             session::getInstance()->setError(i18n::__('errorCreate', null, 'default'));
             routing::getInstance()->redirect('usuario', 'indexCredencial');
         }
     } catch (PDOException $exc) {
         session::getInstance()->setFlash('exc', $exc);
         routing::getInstance()->forward('shfSecurity', 'exception');
     }
 }
开发者ID:rooseveltDiaz,项目名称:proyecto_porcicola,代码行数:25,代码来源:createCredencialActionClass.php

示例13: execute

 public function execute()
 {
     try {
         if (request::getInstance()->hasRequest(usuarioTableClass::ID)) {
             $fields = array(usuarioTableClass::ID, usuarioTableClass::USER, usuarioTableClass::PASSWORD);
             $where = array(usuarioTableClass::ID => request::getInstance()->getRequest(usuarioTableClass::ID));
             $this->objUsuario = usuarioTableClass::getAll($fields, true, null, null, null, null, $where);
             $this->defineView('edit', 'default', session::getInstance()->getFormatOutput());
         } else {
             routing::getInstance()->redirect('prestamo', 'insert');
         }
         //      if (request::getInstance()->isMethod('POST')) {
         //
         //        $usuario = request::getInstance()->getPost(usuarioTableClass::getNameField(usuarioTableClass::USUARIO, true));
         //        $password = request::getInstance()->getPost(usuarioTableClass::getNameField(usuarioTableClass::PASSWORD, true));
         //
         //        if (strlen($usuario) > usuarioTableClass::USUARIO_LENGTH) {
         //          throw new PDOException(i18n::__(00001, null, 'errors', array(':longitud' => usuarioTableClass::USUARIO_LENGTH)), 00001);
         //        }
         //
         //        $data = array(
         //            usuarioTableClass::USUARIO => $usuario,
         //            usuarioTableClass::PASSWORD => md5($password)
         //        );
         //        usuarioTableClass::insert($data);
         //        routing::getInstance()->redirect('default', 'index');
         //      } else {
         //        routing::getInstance()->redirect('default', 'index');
         //      }
     } catch (PDOException $exc) {
         session::getInstance()->setFlash('exc', $exc);
         routing::getInstance()->forward('shfSecurity', 'exception');
     }
 }
开发者ID:jordanMarin,项目名称:prestamo,代码行数:34,代码来源:editActionClass.php

示例14: execute

 public function execute()
 {
     try {
         if (request::getInstance()->isMethod('POST')) {
             $nombre = request::getInstance()->getPost(loteTableClass::getNameField(loteTableClass::NOMBRE, true));
             //                $caracteres = validator::getInstance()->validatorCharactersSpecial($nombre);
             //
             //                if ($caracteres == true) {
             //                    throw new PDOException(i18n::__(10005, null, 'errors', null, 10005));
             //                }
             loteTableClass::validatCreate($nombre);
             $data = array(loteTableClass::NOMBRE => $nombre);
             loteTableClass::insert($data);
             session::getInstance()->setSuccess(i18n::__('succesCreate', null, 'lote'));
             log::register(i18n::__('create'), loteTableClass::getNameTable());
             routing::getInstance()->redirect('animal', 'indexLote');
         } else {
             log::register(i18n::__('create'), loteTableClass::getNameTable(), i18n::__('errorCreateBitacora'));
             session::getInstance()->setError(i18n::__('errorCreate'));
             routing::getInstance()->redirect('animal', 'indexLote');
         }
     } catch (PDOException $exc) {
         session::getInstance()->setFlash('exc', $exc);
         routing::getInstance()->forward('shfSecurity', 'exception');
     }
 }
开发者ID:rooseveltDiaz,项目名称:proyecto_porcicola,代码行数:26,代码来源:createLoteActionClass.php

示例15: execute

 public function execute()
 {
     try {
         $where = null;
         if (request::getInstance()->hasRequest('filter')) {
             $report = request::getInstance()->getPost('filter');
             if (isset($report['numero']) and $report['numero'] !== null and $report['numero'] !== '') {
                 $where[carneVacunasTableClass::getNameTable() . '.' . carneVacunasTableClass::ANIMAL] = $report['numero'];
             }
             //close if
         }
         //close if
         $fields = array(carneVacunasTableClass::ID, carneVacunasTableClass::ACCION, carneVacunasTableClass::DOSIS, carneVacunasTableClass::FECHA_VACUNACION);
         $fields2 = array(animalTableClass::NUMERO);
         $fields3 = array(veterinarioTableClass::NOMBRE);
         $fields4 = array(vacunaTableClass::NOMBRE_VACUNA);
         $fJoin1 = carneVacunasTableClass::ANIMAL;
         $fJoin2 = animalTableClass::ID;
         $fJoin3 = carneVacunasTableClass::VACUNA;
         $fJoin4 = vacunaTableClass::ID;
         $fJoin5 = carneVacunasTableClass::VETERINARIO;
         $fJoin6 = veterinarioTableClass::ID;
         $orderBy = array(carneVacunasTableClass::FECHA_VACUNACION);
         $this->objCarne = carneVacunasTableClass::getAllJoin($fields, $fields2, $fields3, $fields4, $fJoin1, $fJoin2, $fJoin3, $fJoin4, $fJoin5, $fJoin6, false, $orderBy, 'ASC', null, null, $where);
         $this->mensaje = 'Carnet de Vacunas del Cerdo';
         log::register(i18n::__('reporte'), carneVacunasTableClass::getNameTable());
         $this->defineView('indexVacunacion', 'animal', session::getInstance()->getFormatOutput());
     } catch (PDOException $exc) {
         session::getInstance()->setFlash('exc', $exc);
         routing::getInstance()->forward('shfSecurity', 'exception');
     }
 }
开发者ID:rooseveltDiaz,项目名称:proyecto_porcicola,代码行数:32,代码来源:reportCarneVacunasActionClass.php


注:本文中的mvc\request\requestClass类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。