function Novo() { @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); // die($this->ref_cod_escola); $obj = new clsPmieducarInfraPredio($this->cod_infra_predio, $this->pessoa_logada, $this->pessoa_logada, $this->ref_cod_escola, $this->nm_predio, $this->desc_predio, $this->endereco, null, null, 1); $cadastrou = $obj->cadastra(); if ($cadastrou) { echo "<script>\n\t\t\t\t\t\tif (parent.document.getElementById('ref_cod_infra_predio').disabled)\n\t\t\t\t\t\t\tparent.document.getElementById('ref_cod_infra_predio').options[0] = new Option('Selecione um prĂ©dio', '', false, false);\n\t\t\t\t\t\tparent.document.getElementById('ref_cod_infra_predio').options[parent.document.getElementById('ref_cod_infra_predio').options.length] = new Option('{$this->nm_predio}', '{$cadastrou}', false, false);\n\t\t\t\t\t\tparent.document.getElementById('ref_cod_infra_predio').value = '{$cadastrou}';\n\t\t\t\t\t\tparent.document.getElementById('ref_cod_infra_predio').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_infra_predio_lst.php" ); die; return true; } $this->mensagem = "Cadastro não realizado.<br>"; echo "<!--\nErro ao cadastrar clsPmieducarInfraPredio\nvalores obrigatorios\nis_numeric( {$this->ref_usuario_cad} ) && is_numeric( {$this->ref_cod_escola} ) && is_string( {$this->nm_predio} ) && is_string( {$this->endereco} )\n-->"; return false; }
function Novo() { @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); $obj = new clsPmieducarInfraPredio($this->cod_infra_predio, $this->pessoa_logada, $this->pessoa_logada, $this->ref_cod_escola, $this->nm_predio, $this->desc_predio, $this->endereco, null, null, 1); $cadastrou = $obj->cadastra(); if ($cadastrou) { $this->mensagem .= "Cadastro efetuado com sucesso.<br>"; header("Location: educar_infra_predio_lst.php"); die; return true; } $this->mensagem = "Cadastro não realizado.<br>"; echo "<!--\nErro ao cadastrar clsPmieducarInfraPredio\nvalores obrigatorios\nis_numeric( {$this->ref_usuario_cad} ) && is_numeric( {$this->ref_cod_escola} ) && is_string( {$this->nm_predio} ) && is_string( {$this->endereco} )\n-->"; return false; }