function Novo() { @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); $this->nm_autor = addslashes($this->nm_autor); $obj_permissoes = new clsPermissoes(); $obj_permissoes->permissao_cadastra(594, $this->pessoa_logada, 11, "educar_acervo_autor_lst.php"); $obj = new clsPmieducarAcervoAutor(null, null, $this->pessoa_logada, $this->nm_autor, $this->descricao, null, null, 1, $this->ref_cod_biblioteca); $cadastrou = $obj->cadastra(); if ($cadastrou) { $this->mensagem .= "Cadastro efetuado com sucesso.<br>"; header("Location: educar_acervo_autor_lst.php"); die; return true; } $this->mensagem = "Cadastro não realizado.<br>"; echo "<!--\nErro ao cadastrar clsPmieducarAcervoAutor\nvalores obrigatórios\nis_numeric( {$this->pessoa_logada} ) && is_string( {$this->nm_autor} )\n-->"; return false; }
function Novo() { @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); $obj_permissoes = new clsPermissoes(); $obj_permissoes->permissao_cadastra(594, $this->pessoa_logada, 11, "educar_acervo_autor_lst.php"); $obj = new clsPmieducarAcervoAutor(null, null, $this->pessoa_logada, $this->nm_autor, $this->descricao, null, null, 1, $this->ref_cod_biblioteca); $cadastrou = $obj->cadastra(); if ($cadastrou) { $this->mensagem .= "Cadastro efetuado com sucesso.<br>"; echo "<script>\n\t\t\t\t\tparent.document.getElementById('autor').value = '{$cadastrou}';\n\t\t\t\t\tparent.document.getElementById('tipoacao').value = '';\n\t\t\t\t\tparent.document.getElementById('formcadastro').submit();\n\t\t\t </script>"; die; return true; } $this->mensagem = "Cadastro não realizado.<br>"; echo "<!--\nErro ao cadastrar clsPmieducarAcervoAutor\nvalores obrigatórios\nis_numeric( {$this->pessoa_logada} ) && is_string( {$this->nm_autor} )\n-->"; return false; }