function Editar() { @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); if ($this->matriculas_turma) { foreach ($this->ref_cod_matricula as $matricula => $campo) { $obj = new clsPmieducarMatriculaTurma($matricula, $this->ref_cod_turma, NULL, $this->pessoa_logada, NULL, NULL, 1, NULL, $campo['sequencial_']); $existe = $obj->existe(); if (!$existe) { $cadastrou = $obj->cadastra(); if (!$cadastrou) { $this->mensagem = 'Cadastro não realizado.<br>'; return FALSE; } } } $this->mensagem .= 'Cadastro efetuada com sucesso.<br>'; header('Location: educar_matriculas_turma_lst.php'); die; } header('Location: educar_matriculas_turma_lst.php'); die; }
function Editar() { @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; $this->data_enturmacao = Portabilis_Date_Utils::brToPgSQL($this->data_enturmacao); @session_write_close(); // realiza desenturmações foreach ($this->check_desenturma as $matricula) { $this->removerEnturmacao($matricula, $this->ref_cod_turma); } if ($this->matriculas_turma) { foreach ($this->ref_cod_matricula as $matricula => $campo) { $obj = new clsPmieducarMatriculaTurma($matricula, $this->ref_cod_turma, NULL, $this->pessoa_logada, NULL, NULL, 1, NULL, $campo['sequencial_']); $existe = $obj->existe(); if (!$existe) { $obj->data_enturmacao = $this->data_enturmacao; $cadastrou = $obj->cadastra(); if (!$cadastrou) { $this->mensagem = 'Cadastro não realizado.<br>'; return FALSE; } } } $this->mensagem .= 'Cadastro efetuada com sucesso.<br>'; header('Location: educar_matriculas_turma_lst.php'); die; } header('Location: educar_matriculas_turma_lst.php'); die; }