function Inicializar()
 {
     $retorno = 'Novo';
     @session_start();
     $this->pessoa_logada = $_SESSION['id_pessoa'];
     @session_write_close();
     $this->cod_compensado = $_GET['cod_compensado'];
     $this->ref_cod_servidor = $_GET['ref_cod_servidor'];
     $this->ref_cod_escola = $_GET['ref_cod_escola'];
     $this->ref_cod_instituicao = $_GET['ref_cod_instituicao'];
     $obj_permissoes = new clsPermissoes();
     $obj_permissoes->permissao_cadastra(635, $this->pessoa_logada, 7, sprintf('educar_falta_atraso_det.php?ref_cod_servidor=%d&ref_cod_escola=%d&ref_cod_instituicao=%d', $this->ref_cod_servidor, $this->ref_cod_escola, $this->ref_cod_instituicao));
     if (is_numeric($this->cod_compensado)) {
         $obj = new clsPmieducarFaltaAtrasoCompensado($this->cod_compensado);
         $registro = $obj->detalhe();
         if ($registro) {
             // passa todos os valores obtidos no registro para atributos do objeto
             foreach ($registro as $campo => $val) {
                 $this->{$campo} = $val;
             }
             $this->data_inicio = dataFromPgToBr($this->data_inicio);
             $this->data_fim = dataFromPgToBr($this->data_fim);
             $this->data_cadastro = dataFromPgToBr($this->data_cadastro);
             $this->data_exclusao = dataFromPgToBr($this->data_exclusao);
             $obj_permissoes = new clsPermissoes();
             if ($obj_permissoes->permissao_excluir(635, $this->pessoa_logada, 7)) {
                 $this->fexcluir = TRUE;
             }
             $retorno = 'Editar';
         }
     }
     $this->url_cancelar = sprintf('educar_falta_atraso_det.php?ref_cod_servidor=%d&ref_cod_escola=%d&ref_cod_instituicao=%d', $this->ref_cod_servidor, $this->ref_cod_escola, $this->ref_cod_instituicao);
     $this->nome_url_cancelar = 'Cancelar';
     return $retorno;
 }