Commit a1ba0562bd7e48ff9295ac60e5ef071c8dfc8f30

Authored by Eriksen Costa Paixão
1 parent 8cd5676e
Exists in master

Refactoring para coding standards

Showing 1 changed file with 49 additions and 46 deletions   Show diff stats
ieducar/intranet/xml_oprot_setor.php
1 1 <?php
2   -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
3   - * *
4   - * @author Prefeitura Municipal de Itajaí *
5   - * @updated 29/03/2007 *
6   - * Pacote: i-PLB Software Público Livre e Brasileiro *
7   - * *
8   - * Copyright (C) 2006 PMI - Prefeitura Municipal de Itajaí *
9   - * ctima@itajai.sc.gov.br *
10   - * *
11   - * Este programa é software livre, você pode redistribuí-lo e/ou *
12   - * modificá-lo sob os termos da Licença Pública Geral GNU, conforme *
13   - * publicada pela Free Software Foundation, tanto a versão 2 da *
14   - * Licença como (a seu critério) qualquer versão mais nova. *
15   - * *
16   - * Este programa é distribuído na expectativa de ser útil, mas SEM *
17   - * QUALQUER GARANTIA. Sem mesmo a garantia implícita de COMERCIALI- *
18   - * ZAÇÃO ou de ADEQUAÇÃO A QUALQUER PROPÓSITO EM PARTICULAR. Con- *
19   - * sulte a Licença Pública Geral GNU para obter mais detalhes. *
20   - * *
21   - * Você deve ter recebido uma cópia da Licença Pública Geral GNU *
22   - * junto com este programa. Se não, escreva para a Free Software *
23   - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA *
24   - * 02111-1307, USA. *
25   - * *
26   - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
27   - header( 'Content-type: text/xml' );
28   -
29   - require_once( "include/pmidrh/geral.inc.php" );
30   -
31   - echo "<?xml version=\"1.0\" encoding=\"ISO-8859-15\"?>\n<query xmlns=\"sugestoes\">\n";
32   - if( isset( $_GET["setor_pai"] ) )
33   - {
34   - // Seleciona Filas de atendimento da instituicao
35   - $obj = new clsSetor();
36   - $lista = $obj->lista( $_GET["setor_pai"] );
37   - if( $lista )
38   - {
39   - foreach ( $lista as $linha )
40   - {
41   - echo " <item>{$linha['sgl_setor']}</item>\n";
42   - echo " <item>{$linha['cod_setor']}</item>\n";
43   - }
44   - }
45   - }
46   - echo "</query>";
47   -?>
  2 +
  3 +/**
  4 + * i-Educar - Sistema de gestão escolar
  5 + *
  6 + * Copyright (C) 2006 Prefeitura Municipal de Itajaí
  7 + * <ctima@itajai.sc.gov.br>
  8 + *
  9 + * Este programa é software livre; você pode redistribuí-lo e/ou modificá-lo
  10 + * sob os termos da Licença Pública Geral GNU conforme publicada pela Free
  11 + * Software Foundation; tanto a versão 2 da Licença, como (a seu critério)
  12 + * qualquer versão posterior.
  13 + *
  14 + * Este programa é distribuí­do na expectativa de que seja útil, porém, SEM
  15 + * NENHUMA GARANTIA; nem mesmo a garantia implí­cita de COMERCIABILIDADE OU
  16 + * ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. Consulte a Licença Pública Geral
  17 + * do GNU para mais detalhes.
  18 + *
  19 + * Você deve ter recebido uma cópia da Licença Pública Geral do GNU junto
  20 + * com este programa; se não, escreva para a Free Software Foundation, Inc., no
  21 + * endereço 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
  22 + *
  23 + * @author Prefeitura Municipal de Itajaí <ctima@itajai.sc.gov.br>
  24 + * @category i-Educar
  25 + * @license @@license@@
  26 + * @package iEd
  27 + * @since Arquivo disponível desde a versão 1.0.0
  28 + * @version $Id$
  29 + */
  30 +
  31 +header('Content-type: text/xml');
  32 +
  33 +require_once 'include/pmidrh/geral.inc.php';
  34 +
  35 +echo '<?xml version="1.0" encoding="ISO-8859-15"?>' . "\n";
  36 +echo '<query xmlns="sugestoes">' . "\n";
  37 +
  38 +if (isset($_GET['setor_pai'])) {
  39 + $obj = new clsSetor();
  40 + $lista = $obj->lista($_GET['setor_pai']);
  41 +
  42 + if ($lista) {
  43 + foreach ($lista as $linha) {
  44 + echo ' <item>' . $linha['sgl_setor'] . '</item>' . "\n";
  45 + echo ' <item>' . $linha['cod_setor'] . '</item>' . "\n";
  46 + }
  47 + }
  48 +}
  49 +
  50 +echo '</query>';
48 51 \ No newline at end of file
... ...