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