function Novo() { @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); $obj = new clsPmieducarTipoEnsino($this->cod_tipo_ensino, null, $this->pessoa_logada, $this->nm_tipo, null, null, 1, $this->ref_cod_instituicao); $cadastrou = $obj->cadastra(); if ($cadastrou) { echo "<script>\n\t\t\t\t\t\tif (parent.document.getElementById('ref_cod_tipo_ensino').disabled)\n\t\t\t\t\t\t\tparent.document.getElementById('ref_cod_tipo_ensino').options[0] = new Option('Selecione um tipo de ensino', '', false, false);\n\t\t\t\t\t\tparent.document.getElementById('ref_cod_tipo_ensino').options[parent.document.getElementById('ref_cod_tipo_ensino').options.length] = new Option('{$this->nm_tipo}', '{$cadastrou}', false, false);\n\t\t\t\t\t\tparent.document.getElementById('ref_cod_tipo_ensino').value = '{$cadastrou}';\n\t\t\t\t\t\tparent.document.getElementById('ref_cod_tipo_ensino').disabled = false;\n\t\t\t\t\t\twindow.parent.fechaExpansivel('div_dinamico_'+(parent.DOM_divs.length-1));\n\t\t\t \t</script>"; // $this->mensagem .= "Cadastro efetuado com sucesso.<br>"; // header( "Location: educar_tipo_ensino_lst.php" ); die; return true; } $this->mensagem = "Cadastro não realizado.<br>"; echo "<!--\nErro ao cadastrar clsPmieducarTipoEnsino\nvalores obrigatorios\nis_numeric( {$this->ref_usuario_cad} ) && is_string( {$this->nm_tipo} ) && is_string( {$this->data_cadastro} ) && is_numeric( {$this->ativo} )\n-->"; return false; }
function Novo() { @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); $obj = new clsPmieducarTipoEnsino($this->cod_tipo_ensino, null, $this->pessoa_logada, $this->nm_tipo, null, null, 1, $this->ref_cod_instituicao); $cadastrou = $obj->cadastra(); if ($cadastrou) { $this->mensagem .= "Cadastro efetuado com sucesso.<br>"; header("Location: educar_tipo_ensino_lst.php"); die; return true; } $this->mensagem = "Cadastro não realizado.<br>"; echo "<!--\nErro ao cadastrar clsPmieducarTipoEnsino\nvalores obrigatorios\nis_numeric( {$this->ref_usuario_cad} ) && is_string( {$this->nm_tipo} ) && is_string( {$this->data_cadastro} ) && is_numeric( {$this->ativo} )\n-->"; return false; }