function Novo() { @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); $obj = new clsPmieducarTurmaTipo(null, null, $this->pessoa_logada, $this->nm_tipo, $this->sgl_tipo, null, null, 1, $this->ref_cod_instituicao); $cadastrou = $obj->cadastra(); if ($cadastrou) { $this->mensagem .= "Cadastro efetuado com sucesso.<br>"; header("Location: educar_turma_tipo_lst.php"); die; return true; } $this->mensagem = "Cadastro não realizado.<br>"; echo "<!--\nErro ao cadastrar clsPmieducarTurmaTipo\nvalores obrigatórios\nis_numeric( {$this->ref_cod_instituicao} ) && is_numeric( {$this->pessoa_logada} ) && is_string( {$this->nm_tipo} ) && is_string( {$this->sgl_tipo} )\n-->"; return false; }
function Novo() { @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); $obj = new clsPmieducarTurmaTipo(null, null, $this->pessoa_logada, $this->nm_tipo, $this->sgl_tipo, null, null, 1, $this->ref_cod_instituicao); $cadastrou = $obj->cadastra(); if ($cadastrou) { // $this->mensagem .= "Cadastro efetuado com sucesso.<br>"; // header( "Location: educar_turma_tipo_lst.php" ); echo "<script>\n\t\t\t\t\t\tif (parent.document.getElementById('ref_cod_turma_tipo').disabled)\n\t\t\t\t\t\t\tparent.document.getElementById('ref_cod_turma_tipo').options[0] = new Option('Selectione um tipo de turma', '', false, false);\n\t\t\t\t\t\tparent.document.getElementById('ref_cod_turma_tipo').options[parent.document.getElementById('ref_cod_turma_tipo').options.length] = new Option('{$this->nm_tipo}', '{$cadastrou}', false, false);\n\t\t\t\t\t\tparent.document.getElementById('ref_cod_turma_tipo').value = '{$cadastrou}';\n\t\t\t\t\t\tparent.document.getElementById('ref_cod_turma_tipo').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; return true; } $this->mensagem = "Cadastro não realizado.<br>"; echo "<!--\nErro ao cadastrar clsPmieducarTurmaTipo\nvalores obrigatórios\nis_numeric( {$this->ref_cod_instituicao} ) && is_numeric( {$this->pessoa_logada} ) && is_string( {$this->nm_tipo} ) && is_string( {$this->sgl_tipo} )\n-->"; return false; }