function Inicializar()
 {
     $retorno = 'Novo';
     @session_start();
     $this->pessoa_logada = $_SESSION['id_pessoa'];
     @session_write_close();
     $this->cod_matricula = $_GET['cod_matricula'];
     $this->ref_cod_aluno = $_GET['ref_cod_aluno'];
     $obj_aluno = new clsPmieducarAluno($this->ref_cod_aluno);
     if (!$obj_aluno->existe()) {
         header('Location: educar_aluno_lst.php');
         die;
     }
     $url = 'educar_aluno_det.php?cod_aluno=' . $this->ref_cod_aluno;
     $obj_permissoes = new clsPermissoes();
     $obj_permissoes->permissao_cadastra(578, $this->pessoa_logada, 7, $url);
     if (is_numeric($this->cod_matricula)) {
         if ($obj_permissoes->permissao_excluir(578, $this->pessoa_logada, 7)) {
             $this->Excluir();
         }
     }
     $this->url_cancelar = $url;
     $nomeMenu = $retorno == "Editar" ? $retorno : "Cadastrar";
     $localizacao = new LocalizacaoSistema();
     $localizacao->entradaCaminhos(array($_SERVER['SERVER_NAME'] . "/intranet" => "Início", "educar_index.php" => "i-Educar - Escola", "" => "{$nomeMenu} matrícula"));
     $this->enviaLocalizacao($localizacao->montar());
     $this->nome_url_cancelar = 'Cancelar';
     return $retorno;
 }
Esempio n. 2
0
 function Inicializar()
 {
     $retorno = 'Novo';
     @session_start();
     $this->pessoa_logada = $_SESSION['id_pessoa'];
     @session_write_close();
     $this->cod_matricula = $_GET['cod_matricula'];
     $this->ref_cod_aluno = $_GET['ref_cod_aluno'];
     $obj_aluno = new clsPmieducarAluno($this->ref_cod_aluno);
     if (!$obj_aluno->existe()) {
         header('Location: educar_aluno_lst.php');
         die;
     }
     $url = 'educar_aluno_det.php?cod_aluno=' . $this->ref_cod_aluno;
     $obj_permissoes = new clsPermissoes();
     $obj_permissoes->permissao_cadastra(578, $this->pessoa_logada, 7, $url);
     if (is_numeric($this->cod_matricula)) {
         if ($obj_permissoes->permissao_excluir(578, $this->pessoa_logada, 7)) {
             $this->Excluir();
         }
     }
     $this->url_cancelar = $url;
     $this->nome_url_cancelar = 'Cancelar';
     return $retorno;
 }