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 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>";