function Gerar() { @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; session_write_close(); $this->titulo = "Categoria Nivel - Detalhe"; $this->addBanner("imagens/nvp_top_intranet.jpg", "imagens/nvp_vert_intranet.jpg", "Intranet"); $this->cod_categoria_nivel = $_GET["cod_categoria_nivel"]; $tmp_obj = new clsPmieducarCategoriaNivel($this->cod_categoria_nivel); $registro = $tmp_obj->detalhe(); if (!$registro) { header("location: educar_categoria_nivel_lst.php"); die; } if ($registro["cod_categoria_nivel"]) { $this->addDetalhe(array("Categoria", "{$registro["cod_categoria_nivel"]}")); } if ($registro["nm_categoria_nivel"]) { $this->addDetalhe(array("Nome Categoria", "{$registro["nm_categoria_nivel"]}")); } $tab_niveis = null; $obj_nivel = new clsPmieducarNivel(); $lst_nivel = $obj_nivel->buscaSequenciaNivel($this->cod_categoria_nivel); if ($lst_nivel) { $tab_niveis .= "<table cellspacing='0' cellpadding='0' width='200' border='0' style='border:1px dotted #000000'>"; $class2 = $class2 == "formlttd" ? "formmdtd" : "formlttd"; $tab_niveis .= " <tr>\n\t\t\t\t\t\t\t\t<td bgcolor='#A1B3BD' align='center' colspan='2'>Níveis</td>\n\t\t\t\t\t\t\t</tr>"; foreach ($lst_nivel as $nivel) { $tab_niveis .= " <tr class='{$class2}' align='center'>\n\t\t\t\t\t\t\t\t\t<td align='left'>{$nivel['nm_nivel']}</td>\n\t\t\t\t\t\t\t\t\t<td align='left' width='30'><a href='javascript:popless(\"{$nivel['cod_nivel']}\")'><img src='imagens/nvp_bot_ad_sub.gif' border='0'></a></td>\n\t\t\t\t\t\t\t\t</tr>"; $class2 = $class2 == "formlttd" ? "formmdtd" : "formlttd"; } $tab_niveis .= "</table>"; $this->addDetalhe(array("Níveis", "{$tab_niveis}")); } $obj_permissoes = new clsPermissoes(); if ($obj_permissoes->permissao_cadastra(829, $this->pessoa_logada, 3, null, true)) { $this->url_novo = "educar_categoria_nivel_cad.php"; $this->url_editar = "educar_categoria_nivel_cad.php?cod_categoria_nivel={$registro["cod_categoria_nivel"]}"; $this->array_botao[] = 'Adicionar Níveis'; $this->array_botao_url[] = "educar_nivel_cad.php?cod_categoria={$registro["cod_categoria_nivel"]}"; } $this->url_cancelar = "educar_categoria_nivel_lst.php"; $this->largura = "100%"; $localizacao = new LocalizacaoSistema(); $localizacao->entradaCaminhos(array($_SERVER['SERVER_NAME'] . "/intranet" => "Início", "educar_index.php" => "i-Educar - Escola", "" => "Detalhe da categoria/nível")); $this->enviaLocalizacao($localizacao->montar()); }
function Inicializar() { $retorno = "Novo"; @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); $this->ref_cod_categoria = $_GET["ref_cod_categoria"]; $this->ref_cod_nivel = $_GET["ref_cod_nivel"]; $obj_permissoes = new clsPermissoes(); $permite_cadastrar = $obj_permissoes->permissao_cadastra(829, $this->pessoa_logada, 3, "", true); if (!$permite_cadastrar) { echo "<script>window.parent.fechaExpansivel( '{$_GET['div']}');</script>"; die; } if (is_numeric($this->ref_cod_categoria) && is_numeric($this->ref_cod_nivel)) { $obj_nivel_categoria = new clsPmieducarNivel(); $lst_nivel_categoria = $obj_nivel_categoria->lista($this->ref_cod_nivel, $this->ref_cod_categoria, null, null, null, null, null, null, null, null); if ($lst_nivel_categoria) { $lst_niveis = array_shift($lst_nivel_categoria); $obj = new clsPmieducarCategoriaNivel($this->ref_cod_categoria); $registro = $obj->detalhe(); $this->nm_categoria = $registro['nm_categoria_nivel']; $this->nm_nivel = $lst_niveis['nm_nivel']; $obj_niveis = new clsPmieducarSubnivel(); $obj_niveis->setOrderby("cod_subnivel"); $lst_niveis = $obj_niveis->lista(null, null, null, null, $this->ref_cod_nivel, null, null, null, null, null, 1); if ($lst_niveis) { foreach ($lst_niveis as $id => $nivel) { $id++; $nivel['salario'] = number_format($nivel['salario'], 2, ',', '.'); $this->cod_nivel[] = array($nivel['nm_subnivel'], $nivel['salario'], $id, $nivel['cod_subnivel']); } } else { $this->cod_nivel[] = array('', '', '1', ''); } $retorno = "Editar"; } } else { echo "<script>window.parent.fechaExpansivel( '{$_GET['div']}');</script>"; die; } $this->url_cancelar = false; return $retorno; }
function Gerar() { $this->campoOculto('cod_servidor', $this->cod_servidor); $this->campoOculto('ref_cod_instituicao', $this->ref_cod_instituicao); $obj_categoria = new clsPmieducarCategoriaNivel(); $lst_categoria = $obj_categoria->lista(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1); $opcoes = array('' => 'Selecione uma categoria'); if ($lst_categoria) { foreach ($lst_categoria as $categoria) { $opcoes[$categoria['cod_categoria_nivel']] = $categoria['nm_categoria_nivel']; } } $this->campoLista('ref_cod_categoria', 'Categoria', $opcoes, $this->ref_cod_categoria); $opcoes = array('' => 'Selecione uma categoria'); if ($this->ref_cod_categoria) { $obj_nivel = new clsPmieducarNivel(); $lst_nivel = $obj_nivel->buscaSequenciaNivel($this->ref_cod_categoria); if ($lst_nivel) { foreach ($lst_nivel as $nivel) { $opcoes[$nivel['cod_nivel']] = $nivel['nm_nivel']; } } } $this->campoLista('ref_cod_nivel', 'Nível', $opcoes, $this->ref_cod_nivel, '', TRUE); $opcoes = array('' => 'Selecione um nível'); if ($this->ref_cod_nivel) { $obj_nivel = new clsPmieducarSubnivel(); $lst_nivel = $obj_nivel->buscaSequenciaSubniveis($this->ref_cod_nivel); if ($lst_nivel) { foreach ($lst_nivel as $subnivel) { $opcoes[$subnivel['cod_subnivel']] = $subnivel['nm_subnivel']; } } } $this->campoLista('ref_cod_subnivel', 'Subnível', $opcoes, $this->ref_cod_subnivel, '', FALSE, '', '', FALSE, TRUE); }
* Este programa é software livre, você pode redistribuí-lo e/ou * * modificá-lo sob os termos da Licença Pública Geral GNU, conforme * * publicada pela Free Software Foundation, tanto a versão 2 da * * Licença como (a seu critério) qualquer versão mais nova. * * * * Este programa é distribuído na expectativa de ser útil, mas SEM * * QUALQUER GARANTIA. Sem mesmo a garantia implícita de COMERCIALI- * * ZAÇÃO ou de ADEQUAÇÃO A QUALQUER PROPÓSITO EM PARTICULAR. Con- * * sulte a Licença Pública Geral GNU para obter mais detalhes. * * * * Você deve ter recebido uma cópia da Licença Pública Geral GNU * * junto com este programa. Se não, escreva para a Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA * * 02111-1307, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ header('Content-type: text/xml'); require_once "include/clsBanco.inc.php"; require_once "include/funcoes.inc.php"; require_once "include/pmieducar/geral.inc.php"; echo "<?xml version=\"1.0\" encoding=\"ISO-8859-15\"?>\n<query xmlns=\"sugestoes\">\n"; if (is_numeric($_GET["cod_cat"])) { $obj_nivel = new clsPmieducarNivel(); $lst_nivel = $obj_nivel->buscaSequenciaNivel($_GET["cod_cat"]); if ($lst_nivel) { foreach ($lst_nivel as $nivel) { echo "\t<nivel cod_nivel=\"{$nivel['cod_nivel']}\">{$nivel['nm_nivel']}</nivel>\n"; } } } echo "</query>";
function Excluir() { @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); $obj_permissoes = new clsPermissoes(); $obj_permissoes->permissao_excluir(829, $this->pessoa_logada, 3, "educar_nivel_lst.php", true); $obj = new clsPmieducarNivel($this->cod_nivel, $this->ref_cod_categoria_nivel, $this->pessoa_logada, $this->pessoa_logada, $this->ref_cod_nivel_anterior, $this->nm_nivel, $this->salario_base, $this->data_cadastro, $this->data_exclusao, 0); $excluiu = $obj->desativaTodos(); if ($excluiu) { $this->mensagem .= "Exclusão efetuada com sucesso.<br>"; header("location:educar_categoria_nivel_det.php?cod_categoria_nivel={$this->ref_cod_categoria_nivel}"); die; return true; } $this->mensagem = "Exclusão não realizada.<br>"; echo "<!--\nErro ao excluir clsPmieducarNivel\nvalores obrigatorios\nif( is_numeric( {$this->cod_nivel} ) && is_numeric( {$this->ref_usuario_exc} ) )\n-->"; return false; }