public function buscar_datos() { $this->sql = "SELECT cedula, nombre, apellido, sexo, telefono, celular, correo, estatus,fecha_nac\n \t\t\t\t\tFROM persona where cedula='{$this->get_cedula}'"; $this->retornar = parent::consulta($this->sql); $auxexis = pg_num_rows($this->retornar); if ($auxexis > 0) { $resultado = parent::listar($this->retornar); return $resultado; } else { return false; } }
public function validar_usuario() { $this->sql = "SELECT u.id,rec.descripcion as des,rec.ruta, per.cedula, per.nombre, per.apellido, rec.cod_recur as recur, rec.id as idmenu, rec.nivel\n\t\t\t\t\tFROM usuario as u \n\t\t\t\t\tINNER JOIN clave as c on c.cod_usuario=u.id\n\t\t\t\t\tINNER JOIN d_rol_recurso as drr on drr.cod_rol=u.cod_rol\n\t\t\t\t\tINNER JOIN recursos as rec on rec.id = drr.cod_recurso\n\t\t\t\t\tINNER JOIN persona as per on per.cedula=u.cod_cedula\n WHERE u.usuario='{$this->get_usuario}' AND c.clave='{$this->get_clave}' AND rec.estatus = 'A'"; $this->retornar = parent::consulta($this->sql); $auxexis = pg_num_rows($this->retornar); if ($auxexis > 0) { $resultado = parent::listar($this->retornar); return $resultado; } else { return false; } }