function Novo() { @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); $obj = new clsCadastroDeficiencia($this->cod_deficiencia, $this->nm_deficiencia); $cadastrou = $obj->cadastra(); if ($cadastrou) { $this->mensagem .= "Cadastro efetuado com sucesso.<br>"; header("Location: educar_deficiencia_lst.php"); die; return true; } $this->mensagem = "Cadastro não realizado.<br>"; echo "<!--\nErro ao cadastrar clsCadastroDeficiencia\nvalores obrigatorios\nis_string( {$this->nm_deficiencia} )\n-->"; return false; }
function Novo() { @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); $obj = new clsCadastroDeficiencia($this->cod_deficiencia, $this->nm_deficiencia); $cadastrou = $obj->cadastra(); if ($cadastrou) { echo "<script>\n\t\t\t\t\t\tparent.document.getElementById('ref_cod_deficiencia').options[parent.document.getElementById('ref_cod_deficiencia').options.length] = new Option('{$this->nm_deficiencia}', '{$cadastrou}', false, false);\n\t\t\t\t\t\tparent.document.getElementById('ref_cod_deficiencia').value = '{$cadastrou}';\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_deficiencia_lst.php" ); die; return true; } $this->mensagem = "Cadastro não realizado.<br>"; echo "<!--\nErro ao cadastrar clsCadastroDeficiencia\nvalores obrigatorios\nis_string( {$this->nm_deficiencia} )\n-->"; return false; }