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); }
* 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"; require_once 'Portabilis/Utils/DeprecatedXmlApi.php'; Portabilis_Utils_DeprecatedXmlApi::returnEmptyQueryUnlessUserIsLoggedIn(); echo "<?xml version=\"1.0\" encoding=\"ISO-8859-15\"?>\n<query xmlns=\"sugestoes\">\n"; if (is_numeric($_GET["cod_nivel"])) { $obj_nivel = new clsPmieducarSubnivel(); $lst_nivel = $obj_nivel->buscaSequenciaSubniveis($_GET["cod_nivel"]); if ($lst_nivel) { foreach ($lst_nivel as $subnivel) { echo "\t<subnivel cod_subnivel=\"{$subnivel['cod_subnivel']}\">{$subnivel['nm_subnivel']}</subnivel>\n"; } } } echo "</query>";