function Excluir() { @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); $obj_permissoes = new clsPermissoes(); $obj_permissoes->permissao_excluir(635, $this->pessoa_logada, 7, 'educar_servidor_lst.php'); $obj_quadro_horario = new clsPmieducarQuadroHorarioHorarios(NULL, NULL, NULL, NULL, NULL, NULL, $this->cod_servidor, NULL, NULL, NULL, NULL, NULL, NULL, 1, $this->ref_cod_instituicao); if ($obj_quadro_horario->detalhe()) { $this->mensagem = "Exclusão não realizada. O servidor está vinculado a um quadro de horários.<br>"; return FALSE; } else { $obj_quadro_horario = new clsPmieducarQuadroHorarioHorarios(NULL, NULL, NULL, NULL, NULL, NULL, NULL, $this->cod_servidor, NULL, NULL, NULL, NULL, NULL, 1, NULL, $this->ref_cod_instituicao); if ($obj_quadro_horario->detalhe()) { $this->mensagem = "Exclusão não realizada. O servidor está vinculado a um quadro de horários.<br>"; return FALSE; } else { $obj = new clsPmieducarServidor($this->cod_servidor, $this->ref_cod_deficiencia, $this->ref_idesco, $this->carga_horaria, NULL, NULL, 0, $this->ref_cod_instituicao_original); $excluiu = $obj->excluir(); if ($excluiu) { $this->excluiFuncoes(); $this->mensagem .= "Exclusão efetuada com sucesso.<br>"; header("Location: educar_servidor_lst.php"); die; } } } $this->mensagem = 'Exclusão não realizada.<br>'; return FALSE; }