public function getForm() { if (f::isEmpty(v::getError())) { $codPermiso = f::request('post', 'decode', f::id('codPermiso')); v::valida($codPermiso, 'codPermiso', 'required,maxSize[11]'); } if (!f::isEmpty(v::getError())) { $codPermiso = 0; v::clearError(); } $table = DAO_Permiso::getForm($codPermiso); if (f::isEmpty($table)) { $table[0]['codPermiso'] = null; $table[0]['estado'] = null; $table[0]['descripcion'] = null; $table[0]['fechaSolicitud'] = null; $table[0]['motivo'] = null; $table[0]['direccion'] = null; $table[0]['numeroDias'] = null; $table[0]['fechaInicio'] = null; $table[0]['fechaFin'] = null; $table[0]['codPersonal'] = null; $table[0]['nombres'] = null; $table[0]['apellidoPat'] = null; $table[0]['apellidoMat'] = null; $table[0]['dni'] = null; $table[0]['edad'] = null; $table[0]['tipoSangre'] = null; $table[0]['grado'] = null; $table[0]['codCIP'] = null; } return $table; }
public function getForm() { if (f::isEmpty(v::getError())) { $codEvacuacion = f::request('post', 'decode', f::id('codEvacuacion')); v::valida($codEvacuacion, 'codEvacuacion', 'required,maxSize[11]'); } if (!f::isEmpty(v::getError())) { $codEvacuacion = 0; v::clearError(); } $table = DAO_Evacuacion::getForm($codEvacuacion); if (f::isEmpty($table)) { $table[0]['codEvacuacion'] = null; $table[0]['fecha'] = null; $table[0]['estado'] = null; $table[0]['fechaInicio'] = null; $table[0]['fechaFin'] = null; $table[0]['motivo'] = null; $table[0]['observaciones'] = null; $table[0]['codPersonal'] = null; $table[0]['codTipoEvacuacion'] = null; $table[0]['codMedioEvacuacion'] = null; $table[0]['codPersonalAcompaniante'] = null; $table[0]['codCIP'] = null; $table[0]['grado'] = null; $table[0]['nombres'] = null; $table[0]['apellidoPat'] = null; $table[0]['apellidoMat'] = null; $table[0]['nombresAcompaniante'] = null; $table[0]['apellidoPatAcompaniante'] = null; $table[0]['apellidoMatAcompaniante'] = null; $table[0]['medioEvacuacion'] = null; $table[0]['lugarOrigen'] = null; $table[0]['lugarDestino'] = null; $table[0]['dni'] = null; $table[0]['edad'] = null; $table[0]['tipoSangre'] = null; } return $table; }
private function validaKeyPublico() { $keyPublico = f::request('post', 'normal', 'l' . f::encode('Base64KeyPublico', false)); if (!f::isEmpty($keyPublico)) { if (f::llaveMaestra($keyPublico) === false) { foreach ($_SESSION as $k => $v) { unset($_SESSION[$k]); } $message = 'Caducó la credencial de la aplicación, cargue otra vez esta página'; if (f::request('post', 'decode', f::id('typeResponse')) == 'json') { v::setFalseJSON(); v::setJSON('tag', 'body, form'); v::setJSON('refrescar', true); v::setJSON('descripcion', $message); v::printJSON(); } else { v::clearError(); v::setError($message); v::printUL(); } die; } } }