Commit 9ee788b2a903eb3b2986aaa85340b0b0bf00055c
1 parent
4678c46e
Exists in
master
r5@erik: eriksen | 2009-03-24 14:48:45 -0300
Página inicial usa caminho relativo e é script PHP; bug do logout corrigido (ticket #5) r6@erik: eriksen | 2009-03-24 14:49:24 -0300 Cópia da GPLv2 incluída na distribuição r7@erik: eriksen | 2009-03-24 14:51:25 -0300 Página inicial com caminhos relativos no frame e como script PHP r8@erik: eriksen | 2009-03-24 15:07:00 -0300 Ação de suspender cliente estava com SQL inválido (ticket #7) r9@erik: eriksen | 2009-03-24 15:10:07 -0300 Opções do select de tipo de cliente estavam duplicadas (ticket #8) r10@erik: eriksen | 2009-03-24 18:46:19 -0300 Hora da ocorrência não gravava quando a mesma era editada (ticket #11) r11@erik: eriksen | 2009-03-24 19:34:51 -0300 Dispensa de disciplina não funcionava (ticket #12) r12@erik: eriksen | 2009-03-26 14:59:48 -0300 Código usa o último IP do header HTTP_X_FORWARDED_FOR, evitando erro de SQL (ticket #13) r18@erik: eriksen | 2009-04-06 12:11:02 -0300 Licença GPL v2 não tem valor legal para projetos nesse portal r23@erik: eriksen | 2009-04-09 16:47:29 -0300 #13 by Eriksen: Corrigido erro no login quando usuário tinha múltiplos endereços IPs Correções de vários bugs.
Showing
16 changed files
with
603 additions
and
534 deletions
Show diff stats
ieducar/index.html
| ... | ... | @@ -1,14 +0,0 @@ |
| 1 | -<html> | |
| 2 | -<head> | |
| 3 | - <title>Prefeitura Municipal</title> | |
| 4 | -</head> | |
| 5 | -<FRAMESET ROWS="20%,*%" FRAMEBORDER="1" FRAMESPACING="2" border="0"> | |
| 6 | - <FRAME SRC="/intranet/topo.php" NAME="superior" NORESIZE SCROLLING="NO"> | |
| 7 | - <FRAME SRC="/intranet/index.php" NAME="central" MARGINWIDTH="2" MARGINHEIGHT="3" NORESIZE SCROLLING="YES">--> | |
| 8 | -</FRAMESET> | |
| 9 | - <noframes> | |
| 10 | - <body> | |
| 11 | - </body> | |
| 12 | - </noframes> | |
| 13 | -</frameset> | |
| 14 | -</html> |
| ... | ... | @@ -0,0 +1,42 @@ |
| 1 | +<?php | |
| 2 | +/** | |
| 3 | + * | |
| 4 | + * @version SVN: $Id$ | |
| 5 | + * @author Prefeitura Municipal de Itajaí | |
| 6 | + * @updated 29/03/2007 | |
| 7 | + * Pacote: i-PLB Software Público Livre e Brasileiro | |
| 8 | + * | |
| 9 | + * Copyright (C) 2006 PMI - Prefeitura Municipal de Itajaí | |
| 10 | + * ctima@itajai.sc.gov.br | |
| 11 | + * | |
| 12 | + * Este programa é software livre, você pode redistribuí-lo e/ou | |
| 13 | + * modificá-lo sob os termos da Licença Pública Geral GNU, conforme | |
| 14 | + * publicada pela Free Software Foundation, tanto a versão 2 da | |
| 15 | + * Licença como (a seu critério) qualquer versão mais nova. | |
| 16 | + * | |
| 17 | + * Este programa é distribuído na expectativa de ser útil, mas SEM | |
| 18 | + * QUALQUER GARANTIA. Sem mesmo a garantia implícita de COMERCIALI- | |
| 19 | + * ZAÇÃO ou de ADEQUAÇÃO A QUALQUER PROPÓSITO EM PARTICULAR. Con- | |
| 20 | + * sulte a Licença Pública Geral GNU para obter mais detalhes. | |
| 21 | + * | |
| 22 | + * Você deve ter recebido uma cópia da Licença Pública Geral GNU | |
| 23 | + * junto com este programa. Se não, escreva para a Free Software | |
| 24 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | |
| 25 | + * 02111-1307, USA. | |
| 26 | + * | |
| 27 | + */ | |
| 28 | +?> | |
| 29 | +<html> | |
| 30 | +<head> | |
| 31 | +<title>Sistema de gestão escolar | i-Educar</title> | |
| 32 | +</head> | |
| 33 | +<FRAMESET ROWS="20%,*%" FRAMEBORDER="1" FRAMESPACING="2" border="0"> | |
| 34 | + <FRAME SRC="intranet/topo.php" NAME="superior" NORESIZE SCROLLING="NO"> | |
| 35 | + <FRAME SRC="intranet/index.php" NAME="central" MARGINWIDTH="2" MARGINHEIGHT="3" NORESIZE SCROLLING="YES">--> | |
| 36 | +</FRAMESET> | |
| 37 | + <noframes> | |
| 38 | + <body> | |
| 39 | + </body> | |
| 40 | + </noframes> | |
| 41 | +</frameset> | |
| 42 | +</html> | ... | ... |
ieducar/intranet/educar_cliente_det.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 | - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | |
| 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 | + | |
| 27 | 28 | require_once ("include/clsBase.inc.php"); |
| 28 | 29 | require_once ("include/clsDetalhe.inc.php"); |
| 29 | 30 | require_once ("include/clsBanco.inc.php"); |
| ... | ... | @@ -73,8 +74,7 @@ class indice extends clsDetalhe |
| 73 | 74 | |
| 74 | 75 | $this->cod_cliente = $_GET["cod_cliente"]; |
| 75 | 76 | $this->ref_cod_biblioteca = $_GET["ref_cod_biblioteca"]; |
| 76 | -// die($this->ref_cod_biblioteca); | |
| 77 | -//echo "<pre>"; print_r($_GET); die(); | |
| 77 | + | |
| 78 | 78 | $tmp_obj = new clsPmieducarCliente( $this->cod_cliente ); |
| 79 | 79 | $registro = $tmp_obj->lista( $this->cod_cliente, null, null, null, null, null, null, null, null, null, null, null, null, $this->ref_cod_biblioteca ); |
| 80 | 80 | |
| ... | ... | @@ -115,7 +115,7 @@ class indice extends clsDetalhe |
| 115 | 115 | else |
| 116 | 116 | $this->addDetalhe( array( "Status", "Regular" ) ); |
| 117 | 117 | |
| 118 | - $tipo_cliente = $obj_banco->CampoUnico("SELECT nm_tipo FROM pmieducar.cliente_tipo WHERE ref_cod_biblioteca IN (SELECT ref_cod_biblioteca FROM pmieducar.biblioteca_usuario WHERE ref_cod_usuario = '$this->pessoa_logada') AND cod_cliente_tipo = (SELECT ref_cod_cliente_tipo FROM pmieducar.cliente_tipo_cliente WHERE ref_cod_cliente = '$this->cod_cliente' AND ref_cod_biblioteca = {$this->ref_cod_biblioteca})"); | |
| 118 | + $tipo_cliente = $obj_banco->CampoUnico("SELECT nm_tipo FROM pmieducar.cliente_tipo WHERE ref_cod_biblioteca IN (SELECT ref_cod_biblioteca FROM pmieducar.biblioteca_usuario WHERE ref_cod_usuario = '$this->pessoa_logada') AND cod_cliente_tipo = (SELECT ref_cod_cliente_tipo FROM pmieducar.cliente_tipo_cliente WHERE ref_cod_cliente = '$this->cod_cliente' AND ref_cod_biblioteca = '$this->ref_cod_biblioteca')"); | |
| 119 | 119 | if(is_string($tipo_cliente)) |
| 120 | 120 | { |
| 121 | 121 | $this->addDetalhe(array("Tipo", $tipo_cliente)); |
| ... | ... | @@ -134,11 +134,11 @@ class indice extends clsDetalhe |
| 134 | 134 | $this->url_editar = "educar_cliente_cad.php?cod_cliente={$cliente["cod_cliente"]}&ref_cod_biblioteca={$this->ref_cod_biblioteca}"; |
| 135 | 135 | if ( is_numeric( $this->suspenso ) ) { |
| 136 | 136 | $this->array_botao = array( "Liberar" ); |
| 137 | - $this->array_botao_url = array( "educar_define_status_cliente_cad.php?cod_cliente={$cliente["cod_cliente"]}&status=liberar" ); | |
| 137 | + $this->array_botao_url = array( "educar_define_status_cliente_cad.php?cod_cliente={$cliente["cod_cliente"]}&ref_cod_biblioteca={$this->ref_cod_biblioteca}&status=liberar" ); | |
| 138 | 138 | } |
| 139 | 139 | else { |
| 140 | 140 | $this->array_botao = array( "Suspender" ); |
| 141 | - $this->array_botao_url = array( "educar_define_status_cliente_cad.php?cod_cliente={$cliente["cod_cliente"]}&status=suspender" ); | |
| 141 | + $this->array_botao_url = array( "educar_define_status_cliente_cad.php?cod_cliente={$cliente["cod_cliente"]}&ref_cod_biblioteca={$this->ref_cod_biblioteca}&status=suspender" ); | |
| 142 | 142 | } |
| 143 | 143 | } |
| 144 | 144 | |
| ... | ... | @@ -155,4 +155,4 @@ $miolo = new indice(); |
| 155 | 155 | $pagina->addForm( $miolo ); |
| 156 | 156 | // gera o html |
| 157 | 157 | $pagina->MakeAll(); |
| 158 | -?> | |
| 159 | 158 | \ No newline at end of file |
| 159 | +?> | ... | ... |
ieducar/intranet/educar_cliente_lst.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 | 2 | /** |
| 28 | - * @author Adriano Erik Weiguert Nagasava | |
| 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 | + * | |
| 29 | 26 | */ |
| 27 | + | |
| 30 | 28 | require_once ("include/clsBase.inc.php"); |
| 31 | 29 | require_once ("include/clsListagem.inc.php"); |
| 32 | 30 | require_once ("include/clsBanco.inc.php"); |
| ... | ... | @@ -228,4 +226,4 @@ $miolo = new indice(); |
| 228 | 226 | $pagina->addForm( $miolo ); |
| 229 | 227 | // gera o html |
| 230 | 228 | $pagina->MakeAll(); |
| 231 | -?> | |
| 232 | 229 | \ No newline at end of file |
| 230 | +?> | ... | ... |
ieducar/intranet/educar_cliente_tipo_xml.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/clsBanco.inc.php" ); | |
| 30 | - require_once( "include/funcoes.inc.php" ); | |
| 31 | - echo "<?xml version=\"1.0\" encoding=\"ISO-8859-15\"?>\n<query xmlns=\"sugestoes\">\n"; | |
| 32 | - if( is_numeric( $_GET["bib"] ) ) | |
| 33 | - { | |
| 34 | - $db = new clsBanco(); | |
| 35 | - $db->Consulta( " | |
| 36 | - SELECT | |
| 37 | - cod_cliente_tipo | |
| 38 | - , nm_tipo | |
| 39 | - , dias_emprestimo | |
| 40 | - FROM | |
| 41 | - pmieducar.cliente_tipo LEFT OUTER JOIN pmieducar.cliente_tipo_exemplar_tipo ON ( cod_cliente_tipo = ref_cod_cliente_tipo ) | |
| 42 | - WHERE | |
| 43 | - ref_cod_biblioteca = {$_GET["bib"]} | |
| 44 | - AND ativo = 1 | |
| 45 | - ORDER BY | |
| 46 | - nm_tipo ASC | |
| 47 | - " ); | |
| 48 | - | |
| 49 | - while ( $db->ProximoRegistro() ) | |
| 50 | - { | |
| 51 | - list( $cod, $nome, $dias_emprestimo ) = $db->Tupla(); | |
| 52 | - echo " <cliente_tipo cod_cliente_tipo=\"{$cod}\" dias_emprestimo=\"{$dias_emprestimo}\">{$nome}</cliente_tipo>\n"; | |
| 53 | - } | |
| 54 | - } | |
| 55 | - echo "</query>"; | |
| 56 | -?> | |
| 57 | 2 | \ No newline at end of file |
| 3 | +/** | |
| 4 | + * | |
| 5 | + * @version SVN: $Id$ | |
| 6 | + * @author Prefeitura Municipal de Itajaí | |
| 7 | + * @updated 29/03/2007 | |
| 8 | + * Pacote: i-PLB Software Público Livre e Brasileiro | |
| 9 | + * | |
| 10 | + * Copyright (C) 2006 PMI - Prefeitura Municipal de Itajaí | |
| 11 | + * ctima@itajai.sc.gov.br | |
| 12 | + * | |
| 13 | + * Este programa é software livre, você pode redistribuí-lo e/ou | |
| 14 | + * modificá-lo sob os termos da Licença Pública Geral GNU, conforme | |
| 15 | + * publicada pela Free Software Foundation, tanto a versão 2 da | |
| 16 | + * Licença como (a seu critério) qualquer versão mais nova. | |
| 17 | + * | |
| 18 | + * Este programa é distribuído na expectativa de ser útil, mas SEM | |
| 19 | + * QUALQUER GARANTIA. Sem mesmo a garantia implícita de COMERCIALI- | |
| 20 | + * ZAÇÃO ou de ADEQUAÇÃO A QUALQUER PROPÓSITO EM PARTICULAR. Con- | |
| 21 | + * sulte a Licença Pública Geral GNU para obter mais detalhes. | |
| 22 | + * | |
| 23 | + * Você deve ter recebido uma cópia da Licença Pública Geral GNU | |
| 24 | + * junto com este programa. Se não, escreva para a Free Software | |
| 25 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | |
| 26 | + * 02111-1307, USA. | |
| 27 | + * | |
| 28 | + */ | |
| 29 | + | |
| 30 | +header('Content-type: text/xml; charset=iso-8859-1'); | |
| 31 | + | |
| 32 | +require_once('include/clsBanco.inc.php'); | |
| 33 | +require_once('include/funcoes.inc.php'); | |
| 34 | + | |
| 35 | +print '<?xml version="1.0" encoding="iso-8859-1"?>' . PHP_EOL; | |
| 36 | +print '<query xmlns="sugestoes">' . PHP_EOL; | |
| 37 | + | |
| 38 | +if (is_numeric($_GET['bib'])) | |
| 39 | +{ | |
| 40 | + $db = new clsBanco(); | |
| 41 | + $sql = " | |
| 42 | + SELECT | |
| 43 | + DISTINCT(cod_cliente_tipo), | |
| 44 | + nm_tipo, | |
| 45 | + dias_emprestimo | |
| 46 | + FROM | |
| 47 | + pmieducar.cliente_tipo LEFT JOIN pmieducar.cliente_tipo_exemplar_tipo ON (cod_cliente_tipo = ref_cod_cliente_tipo) | |
| 48 | + WHERE | |
| 49 | + ref_cod_biblioteca = %s AND | |
| 50 | + ativo = 1 | |
| 51 | + ORDER BY | |
| 52 | + nm_tipo ASC"; | |
| 53 | + | |
| 54 | + $sql = sprintf($sql, $_GET['bib']); | |
| 55 | + $db->Consulta($sql); | |
| 56 | + | |
| 57 | + // Array com os códigos do resultado do SELECT | |
| 58 | + $codigos = array(); | |
| 59 | + | |
| 60 | + while ($db->ProximoRegistro()) | |
| 61 | + { | |
| 62 | + list($cod, $nome, $dias_emprestimo) = $db->Tupla(); | |
| 63 | + | |
| 64 | + // Se o código já foi utilizado, vai para o próximo resultado | |
| 65 | + if (isset($codigos[$cod])) | |
| 66 | + continue; | |
| 67 | + | |
| 68 | + $cliente_tag = '<cliente_tipo cod_cliente_tipo="%s" dias_emprestimo="%s">%s</cliente_tipo>'; | |
| 69 | + print sprintf($cliente_tag, $cod, $dias_emprestimo, $nome) . PHP_EOL; | |
| 70 | + | |
| 71 | + // Evita que se imprima o mesmo código novamente | |
| 72 | + $codigos[$cod] = TRUE; | |
| 73 | + } | |
| 74 | +} | |
| 75 | + | |
| 76 | +print '</query>'; | ... | ... |
ieducar/intranet/educar_define_status_cliente_cad.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 | - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | |
| 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 | + | |
| 27 | 28 | /** |
| 28 | 29 | * @author Adriano Erik Weiguert Nagasava |
| 29 | 30 | */ |
| ... | ... | @@ -70,7 +71,7 @@ class indice extends clsCadastro |
| 70 | 71 | var $descricao; |
| 71 | 72 | var $dias; |
| 72 | 73 | var $sequencial; |
| 73 | - | |
| 74 | + | |
| 74 | 75 | function Inicializar() |
| 75 | 76 | { |
| 76 | 77 | $retorno = "Novo"; |
| ... | ... | @@ -78,8 +79,9 @@ class indice extends clsCadastro |
| 78 | 79 | $this->pessoa_logada = $_SESSION['id_pessoa']; |
| 79 | 80 | @session_write_close(); |
| 80 | 81 | |
| 81 | - $this->cod_cliente = $_GET["cod_cliente"]; | |
| 82 | - $this->acao_status = $_GET["status"]; | |
| 82 | + $this->cod_cliente = $_GET["cod_cliente"]; | |
| 83 | + $this->acao_status = $_GET["status"]; | |
| 84 | + $this->ref_cod_biblioteca = $_GET["ref_cod_biblioteca"]; | |
| 83 | 85 | |
| 84 | 86 | $obj_permissoes = new clsPermissoes(); |
| 85 | 87 | $obj_permissoes->permissao_cadastra( 603, $this->pessoa_logada, 11, "educar_cliente_det.php" ); |
| ... | ... | @@ -106,8 +108,9 @@ class indice extends clsCadastro |
| 106 | 108 | { |
| 107 | 109 | if ( $this->acao_status == "suspender" ) { |
| 108 | 110 | |
| 109 | - $this->campoOculto( "cod_cliente", $this->cod_cliente ); | |
| 110 | - | |
| 111 | + $this->campoOculto("cod_cliente", $this->cod_cliente); | |
| 112 | + $this->campoOculto("ref_cod_biblioteca", $this->ref_cod_biblioteca); | |
| 113 | + | |
| 111 | 114 | if ( $this->ref_idpes ) { |
| 112 | 115 | |
| 113 | 116 | $objTemp = new clsPessoaFisica( $this->ref_idpes ); |
| ... | ... | @@ -169,28 +172,32 @@ class indice extends clsCadastro |
| 169 | 172 | elseif ( $this->acao_status == "liberar" ) { |
| 170 | 173 | $db = new clsBanco(); |
| 171 | 174 | $this->sequencial = $db->CampoUnico( "SELECT MAX( sequencial ) FROM pmieducar.cliente_suspensao WHERE ref_cod_cliente = {$this->cod_cliente} AND data_liberacao IS NULL" ); |
| 172 | - $this->campoOculto( "sequencial", $this->sequencial ); | |
| 173 | - $this->campoOculto( "cod_cliente", $this->cod_cliente ); | |
| 175 | + $this->campoOculto("sequencial", $this->sequencial ); | |
| 176 | + | |
| 174 | 177 | $this->Editar(); |
| 175 | 178 | } |
| 176 | 179 | } |
| 177 | 180 | |
| 178 | 181 | function Novo() |
| 179 | 182 | { |
| 180 | - @session_start(); | |
| 181 | - $this->pessoa_logada = $_SESSION['id_pessoa']; | |
| 182 | - @session_write_close(); | |
| 183 | + session_start(); | |
| 184 | + $this->pessoa_logada = $_SESSION['id_pessoa']; | |
| 185 | + session_write_close(); | |
| 183 | 186 | |
| 184 | 187 | $obj_permissoes = new clsPermissoes(); |
| 185 | 188 | $obj_permissoes->permissao_cadastra( 603, $this->pessoa_logada, 11, "educar_cliente_lst.php" ); |
| 186 | 189 | |
| 187 | 190 | $obj = new clsPmieducarClienteSuspensao( null, $this->cod_cliente, $this->cod_motivo_suspensao, null, $this->pessoa_logada, $this->dias, null, null ); |
| 188 | - if( $obj->cadastra() ) { | |
| 191 | + | |
| 192 | + // Caso suspensão tenha sido efetuada, envia para página de detalhes | |
| 193 | + if ($obj->cadastra()) | |
| 194 | + { | |
| 189 | 195 | $this->mensagem .= "Suspensão efetuada com sucesso.<br>"; |
| 190 | - header( "Location: educar_cliente_det.php?cod_cliente={$this->cod_cliente}" ); | |
| 196 | + header("Location: educar_cliente_det.php?cod_cliente={$this->cod_cliente}&ref_cod_biblioteca={$this->ref_cod_biblioteca}"); | |
| 191 | 197 | die(); |
| 192 | 198 | return true; |
| 193 | 199 | } |
| 200 | + | |
| 194 | 201 | $this->mensagem = "Suspensão não realizada.<br>"; |
| 195 | 202 | echo "<!--\nErro ao cadastrar clsPmieducarClienteSuspensao\nvalores obrigatorios\nis_numeric( $this->ref_cod_cliente_tipo ) && is_numeric( $this->ref_usuario_cad ) && is_numeric( $this->ref_idpes ) && is_numeric( $this->login )\n-->"; |
| 196 | 203 | return false; |
| ... | ... | @@ -259,4 +266,4 @@ var ref_cod_motivo_suspensao = document.getElementById( 'cod_motivo_suspensao' ) |
| 259 | 266 | ref_cod_motivo_suspensao.onchange = function() { getDescricao(); }; |
| 260 | 267 | |
| 261 | 268 | |
| 262 | -</script> | |
| 263 | 269 | \ No newline at end of file |
| 270 | +</script> | ... | ... |
ieducar/intranet/educar_dispensa_disciplina_cad.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 | -require_once ("include/clsBase.inc.php"); | |
| 28 | -require_once ("include/clsCadastro.inc.php"); | |
| 29 | -require_once ("include/clsBanco.inc.php"); | |
| 30 | -require_once( "include/pmieducar/geral.inc.php" ); | |
| 2 | +/** | |
| 3 | + * | |
| 4 | + * @version SVN: $Id$ | |
| 5 | + * @author Prefeitura Municipal de Itajaí | |
| 6 | + * @updated 29/03/2007 | |
| 7 | + * Pacote: i-PLB Software Público Livre e Brasileiro | |
| 8 | + * | |
| 9 | + * Copyright (C) 2006 PMI - Prefeitura Municipal de Itajaí | |
| 10 | + * ctima@itajai.sc.gov.br | |
| 11 | + * | |
| 12 | + * Este programa é software livre, você pode redistribuí-lo e/ou | |
| 13 | + * modificá-lo sob os termos da Licença Pública Geral GNU, conforme | |
| 14 | + * publicada pela Free Software Foundation, tanto a versão 2 da | |
| 15 | + * Licença como (a seu critério) qualquer versão mais nova. | |
| 16 | + * | |
| 17 | + * Este programa é distribuído na expectativa de ser útil, mas SEM | |
| 18 | + * QUALQUER GARANTIA. Sem mesmo a garantia implícita de COMERCIALI- | |
| 19 | + * ZAÇÃO ou de ADEQUAÇÃO A QUALQUER PROPÓSITO EM PARTICULAR. Con- | |
| 20 | + * sulte a Licença Pública Geral GNU para obter mais detalhes. | |
| 21 | + * | |
| 22 | + * Você deve ter recebido uma cópia da Licença Pública Geral GNU | |
| 23 | + * junto com este programa. Se não, escreva para a Free Software | |
| 24 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | |
| 25 | + * 02111-1307, USA. | |
| 26 | + * | |
| 27 | + */ | |
| 28 | + | |
| 29 | +require_once('include/clsBase.inc.php'); | |
| 30 | +require_once('include/clsCadastro.inc.php'); | |
| 31 | +require_once('include/clsBanco.inc.php'); | |
| 32 | +require_once('include/pmieducar/geral.inc.php'); | |
| 31 | 33 | |
| 32 | 34 | class clsIndexBase extends clsBase |
| 33 | 35 | { |
| ... | ... | @@ -78,13 +80,13 @@ class indice extends clsCadastro |
| 78 | 80 | $this->pessoa_logada = $_SESSION['id_pessoa']; |
| 79 | 81 | @session_write_close(); |
| 80 | 82 | |
| 81 | - $this->ref_cod_disciplina=$_GET["ref_cod_disciplina"]; | |
| 82 | - $this->ref_cod_matricula = $_GET['ref_cod_matricula']; | |
| 83 | + $this->ref_cod_disciplina = $_GET["ref_cod_disciplina"]; | |
| 84 | + $this->ref_cod_matricula = $_GET['ref_cod_matricula']; | |
| 83 | 85 | |
| 84 | 86 | $obj_permissoes = new clsPermissoes(); |
| 85 | 87 | $obj_permissoes->permissao_cadastra( 578, $this->pessoa_logada, 7, "educar_dispensa_disciplina_lst.php?ref_ref_cod_matricula={$this->ref_cod_matricula}" ); |
| 86 | 88 | |
| 87 | - if(is_numeric($this->ref_cod_matricula)) | |
| 89 | + if (is_numeric($this->ref_cod_matricula)) | |
| 88 | 90 | { |
| 89 | 91 | $obj_matricula = new clsPmieducarMatricula($this->ref_cod_matricula,null,null,null,null,null,null,null,null,null,1); |
| 90 | 92 | $det_matricula = $obj_matricula->detalhe(); |
| ... | ... | @@ -92,35 +94,38 @@ class indice extends clsCadastro |
| 92 | 94 | { |
| 93 | 95 | header("location: educar_matricula_lst.php"); |
| 94 | 96 | die; |
| 95 | - | |
| 96 | 97 | } |
| 97 | 98 | |
| 98 | 99 | $this->ref_cod_escola = $det_matricula['ref_ref_cod_escola']; |
| 99 | 100 | $this->ref_cod_serie = $det_matricula['ref_ref_cod_serie']; |
| 100 | - }else | |
| 101 | + } | |
| 102 | + else | |
| 101 | 103 | { |
| 102 | 104 | header("location: educar_matricula_lst.php"); |
| 103 | 105 | die; |
| 104 | 106 | } |
| 105 | - if( is_numeric( $this->ref_cod_matricula ) && is_numeric( $this->ref_cod_serie ) && is_numeric( $this->ref_cod_escola ) && is_numeric( $this->ref_cod_disciplina ) ) | |
| 107 | + | |
| 108 | + if (is_numeric( $this->ref_cod_matricula ) && is_numeric( $this->ref_cod_serie ) && is_numeric( $this->ref_cod_escola ) && is_numeric( $this->ref_cod_disciplina ) ) | |
| 106 | 109 | { |
| 107 | - | |
| 108 | 110 | $obj = new clsPmieducarDispensaDisciplina( $this->ref_cod_matricula, $this->ref_cod_serie, $this->ref_cod_escola, $this->ref_cod_disciplina ); |
| 109 | 111 | $registro = $obj->detalhe(); |
| 110 | - if( $registro ) | |
| 112 | + if ($registro) | |
| 111 | 113 | { |
| 112 | - foreach( $registro AS $campo => $val ) // passa todos os valores obtidos no registro para atributos do objeto | |
| 113 | - $this->$campo = $val; | |
| 114 | + foreach ($registro as $campo => $val) // passa todos os valores obtidos no registro para atributos do objeto | |
| 115 | + { | |
| 116 | + $this->$campo = $val; | |
| 117 | + } | |
| 114 | 118 | |
| 115 | - $obj_permissoes = new clsPermissoes(); | |
| 116 | - if( $obj_permissoes->permissao_excluir( 578, $this->pessoa_logada, 7 ) ) | |
| 117 | - { | |
| 118 | - $this->fexcluir = true; | |
| 119 | - } | |
| 119 | + $obj_permissoes = new clsPermissoes(); | |
| 120 | + if ($obj_permissoes->permissao_excluir(578, $this->pessoa_logada, 7)) | |
| 121 | + { | |
| 122 | + $this->fexcluir = true; | |
| 123 | + } | |
| 120 | 124 | |
| 121 | 125 | $retorno = "Editar"; |
| 122 | 126 | } |
| 123 | 127 | } |
| 128 | + | |
| 124 | 129 | $this->url_cancelar = ($retorno == "Editar") ? "educar_dispensa_disciplina_det.php?ref_cod_matricula={$registro["ref_cod_matricula"]}&ref_cod_serie={$registro["ref_cod_serie"]}&ref_cod_escola={$registro["ref_cod_escola"]}&ref_cod_disciplina={$registro["ref_cod_disciplina"]}" : "educar_dispensa_disciplina_lst.php?ref_cod_matricula={$this->ref_cod_matricula}"; |
| 125 | 130 | $this->nome_url_cancelar = "Cancelar"; |
| 126 | 131 | return $retorno; |
| ... | ... | @@ -251,6 +256,9 @@ class indice extends clsCadastro |
| 251 | 256 | $db = new clsBanco(); |
| 252 | 257 | $max_cod_dispensa = $db->CampoUnico($sql); |
| 253 | 258 | |
| 259 | + // Caso não exista nenhuma dispensa, atribui o código 1, tabela não utiliza sequences | |
| 260 | + $max_cod_dispensa = $max_cod_dispensa > 0 ? $max_cod_dispensa : 1; | |
| 261 | + | |
| 254 | 262 | $obj = new clsPmieducarDispensaDisciplina( $this->ref_cod_matricula, $this->ref_cod_serie, $this->ref_cod_escola, $this->ref_cod_disciplina, null, $this->pessoa_logada, $this->ref_cod_tipo_dispensa, null, null, 1, $this->observacao, $max_cod_dispensa ); |
| 255 | 263 | if($obj->existe()) |
| 256 | 264 | { |
| ... | ... | @@ -283,7 +291,7 @@ class indice extends clsCadastro |
| 283 | 291 | $obj_permissoes = new clsPermissoes(); |
| 284 | 292 | $obj_permissoes->permissao_cadastra( 578, $this->pessoa_logada, 7, "educar_dispensa_disciplina_lst.php?ref_cod_matricula={$this->ref_cod_matricula}" ); |
| 285 | 293 | |
| 286 | - $obj = new clsPmieducarDispensaDisciplina( $this->ref_cod_matricula, $this->ref_cod_serie, $this->ref_cod_escola, $this->ref_cod_disciplina, $this->pessoa_logada, null, $this->ref_cod_tipo_dispensa, null, null, 1, $this->observacao ); | |
| 294 | + $obj = new clsPmieducarDispensaDisciplina( $this->ref_cod_matricula, $this->ref_cod_serie, $this->ref_cod_escola, $this->ref_cod_disciplina, $this->pessoa_logada, null, $this->ref_cod_tipo_dispensa, null, null, 1, $this->observacao); | |
| 287 | 295 | $editou = $obj->edita(); |
| 288 | 296 | if( $editou ) |
| 289 | 297 | { |
| ... | ... | @@ -343,4 +351,4 @@ campoTurma.onchange = function(){ |
| 343 | 351 | campoDisciplina.options[campoDisciplina.length] = new Option(disciplina[ct][2],disciplina[ct][1],false,false); |
| 344 | 352 | } |
| 345 | 353 | }; |
| 346 | -</script> | |
| 347 | 354 | \ No newline at end of file |
| 355 | +</script> | ... | ... |
ieducar/intranet/educar_matricula_ocorrencia_disciplinar_cad.php
| ... | ... | @@ -91,25 +91,25 @@ class indice extends clsCadastro |
| 91 | 91 | $this->ref_cod_matricula=$_GET["ref_cod_matricula"]; |
| 92 | 92 | $this->ref_cod_tipo_ocorrencia_disciplinar=$_GET["ref_cod_tipo_ocorrencia_disciplinar"]; |
| 93 | 93 | |
| 94 | - if( is_numeric( $this->ref_cod_matricula ) && is_numeric($this->ref_cod_tipo_ocorrencia_disciplinar) && is_numeric($this->sequencial)) | |
| 94 | + if (is_numeric($this->ref_cod_matricula) && | |
| 95 | + is_numeric($this->ref_cod_tipo_ocorrencia_disciplinar) && | |
| 96 | + is_numeric($this->sequencial)) | |
| 95 | 97 | { |
| 96 | - | |
| 97 | - $obj = new clsPmieducarMatriculaOcorrenciaDisciplinar( $this->ref_cod_matricula, $this->ref_cod_tipo_ocorrencia_disciplinar, $this->sequencial ); | |
| 98 | - $registro = $obj->detalhe(); | |
| 99 | - if( $registro ) | |
| 98 | + $obj = new clsPmieducarMatriculaOcorrenciaDisciplinar($this->ref_cod_matricula, $this->ref_cod_tipo_ocorrencia_disciplinar, $this->sequencial); | |
| 99 | + $registro = $obj->detalhe(); | |
| 100 | + if ($registro) | |
| 100 | 101 | { |
| 101 | 102 | foreach( $registro AS $campo => $val ) // passa todos os valores obtidos no registro para atributos do objeto |
| 102 | 103 | $this->$campo = $val; |
| 103 | 104 | |
| 104 | - $this->hora_cadastro = dataFromPgToBr($this->data_cadastro,'h:i'); | |
| 105 | + $this->hora_cadastro = dataFromPgToBr($this->data_cadastro,'H:i'); | |
| 105 | 106 | $this->data_cadastro = dataFromPgToBr($this->data_cadastro); |
| 106 | 107 | |
| 107 | - | |
| 108 | - $obj_permissoes = new clsPermissoes(); | |
| 109 | - if( $obj_permissoes->permissao_excluir( 578, $this->pessoa_logada, 7 ) ) | |
| 110 | - { | |
| 111 | - $this->fexcluir = true; | |
| 112 | - } | |
| 108 | + $obj_permissoes = new clsPermissoes(); | |
| 109 | + if( $obj_permissoes->permissao_excluir( 578, $this->pessoa_logada, 7 ) ) | |
| 110 | + { | |
| 111 | + $this->fexcluir = true; | |
| 112 | + } | |
| 113 | 113 | |
| 114 | 114 | $retorno = "Editar"; |
| 115 | 115 | } |
| ... | ... | @@ -265,7 +265,8 @@ class indice extends clsCadastro |
| 265 | 265 | $obj_permissoes = new clsPermissoes(); |
| 266 | 266 | $obj_permissoes->permissao_cadastra( 578, $this->pessoa_logada, 7, "educar_matricula_ocorrencia_disciplinar_lst.php" ); |
| 267 | 267 | |
| 268 | - | |
| 268 | + $this->data_cadastro = "{$this->data_cadastro} {$this->hora_cadastro}"; | |
| 269 | + | |
| 269 | 270 | $obj = new clsPmieducarMatriculaOcorrenciaDisciplinar($this->ref_cod_matricula, $this->ref_cod_tipo_ocorrencia_disciplinar, $this->sequencial, $this->pessoa_logada, $this->pessoa_logada, $this->observacao, $this->data_cadastro, $this->data_exclusao, $this->ativo); |
| 270 | 271 | $editou = $obj->edita(); |
| 271 | 272 | if( $editou ) |
| ... | ... | @@ -315,4 +316,4 @@ $miolo = new indice(); |
| 315 | 316 | $pagina->addForm( $miolo ); |
| 316 | 317 | // gera o html |
| 317 | 318 | $pagina->MakeAll(); |
| 318 | -?> | |
| 319 | 319 | \ No newline at end of file |
| 320 | +?> | ... | ... |
ieducar/intranet/educar_matricula_ocorrencia_disciplinar_det.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 | -require_once ("include/clsBase.inc.php"); | |
| 28 | -require_once ("include/clsDetalhe.inc.php"); | |
| 29 | -require_once ("include/clsBanco.inc.php"); | |
| 30 | -require_once( "include/pmieducar/geral.inc.php" ); | |
| 2 | +/** | |
| 3 | + * | |
| 4 | + * @version SVN: $Id$ | |
| 5 | + * @author Prefeitura Municipal de Itajaí | |
| 6 | + * @updated 29/03/2007 | |
| 7 | + * Pacote: i-PLB Software Público Livre e Brasileiro | |
| 8 | + * | |
| 9 | + * Copyright (C) 2006 PMI - Prefeitura Municipal de Itajaí | |
| 10 | + * ctima@itajai.sc.gov.br | |
| 11 | + * | |
| 12 | + * Este programa é software livre, você pode redistribuí-lo e/ou | |
| 13 | + * modificá-lo sob os termos da Licença Pública Geral GNU, conforme | |
| 14 | + * publicada pela Free Software Foundation, tanto a versão 2 da | |
| 15 | + * Licença como (a seu critério) qualquer versão mais nova. | |
| 16 | + * | |
| 17 | + * Este programa é distribuído na expectativa de ser útil, mas SEM | |
| 18 | + * QUALQUER GARANTIA. Sem mesmo a garantia implícita de COMERCIALI- | |
| 19 | + * ZAÇÃO ou de ADEQUAÇÃO A QUALQUER PROPÓSITO EM PARTICULAR. Con- | |
| 20 | + * sulte a Licença Pública Geral GNU para obter mais detalhes. | |
| 21 | + * | |
| 22 | + * Você deve ter recebido uma cópia da Licença Pública Geral GNU | |
| 23 | + * junto com este programa. Se não, escreva para a Free Software | |
| 24 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | |
| 25 | + * 02111-1307, USA. | |
| 26 | + * | |
| 27 | + */ | |
| 28 | + | |
| 29 | +require_once('include/clsBase.inc.php'); | |
| 30 | +require_once('include/clsDetalhe.inc.php'); | |
| 31 | +require_once('include/clsBanco.inc.php'); | |
| 32 | +require_once('include/pmieducar/geral.inc.php'); | |
| 31 | 33 | |
| 32 | 34 | class clsIndexBase extends clsBase |
| 33 | 35 | { |
| ... | ... | @@ -176,7 +178,7 @@ class indice extends clsDetalhe |
| 176 | 178 | } |
| 177 | 179 | if( $registro["data_cadastro"] ) |
| 178 | 180 | { |
| 179 | - if($hora = dataFromPgToBr("{$registro["data_cadastro"]}",'h:i') ) | |
| 181 | + if($hora = dataFromPgToBr("{$registro["data_cadastro"]}",'H:i') ) | |
| 180 | 182 | $this->addDetalhe( array( "Hora Ocorrência", $hora )); |
| 181 | 183 | $this->addDetalhe( array( "Data Ocorrência", dataFromPgToBr("{$registro["data_cadastro"]}",'d/m/Y') )); |
| 182 | 184 | } |
| ... | ... | @@ -209,4 +211,4 @@ $miolo = new indice(); |
| 209 | 211 | $pagina->addForm( $miolo ); |
| 210 | 212 | // gera o html |
| 211 | 213 | $pagina->MakeAll(); |
| 212 | -?> | |
| 213 | 214 | \ No newline at end of file |
| 215 | +?> | ... | ... |
ieducar/intranet/include/clsBase.inc.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 | -require_once ("include/clsCronometro.inc.php"); | |
| 28 | -require_once ("clsConfigItajai.inc.php"); | |
| 29 | -require_once ("include/clsBanco.inc.php"); | |
| 30 | -require_once ("include/clsMenu.inc.php"); | |
| 31 | -require_once ("include/clsControlador.inc.php"); | |
| 32 | -require_once ("include/clsLogAcesso.inc.php"); | |
| 33 | - | |
| 34 | -require_once ("include/Geral.inc.php"); | |
| 35 | -require_once ("include/pmicontrolesis/geral.inc.php"); | |
| 36 | -require_once ("include/funcoes.inc.php"); | |
| 2 | +/** | |
| 3 | + * | |
| 4 | + * @version SVN: $Id$ | |
| 5 | + * @author Prefeitura Municipal de Itajaí | |
| 6 | + * @updated 29/03/2007 | |
| 7 | + * Pacote: i-PLB Software Público Livre e Brasileiro | |
| 8 | + * | |
| 9 | + * Copyright (C) 2006 PMI - Prefeitura Municipal de Itajaí | |
| 10 | + * ctima@itajai.sc.gov.br | |
| 11 | + * | |
| 12 | + * Este programa é software livre, você pode redistribuí-lo e/ou | |
| 13 | + * modificá-lo sob os termos da Licença Pública Geral GNU, conforme | |
| 14 | + * publicada pela Free Software Foundation, tanto a versão 2 da | |
| 15 | + * Licença como (a seu critério) qualquer versão mais nova. | |
| 16 | + * | |
| 17 | + * Este programa é distribuído na expectativa de ser útil, mas SEM | |
| 18 | + * QUALQUER GARANTIA. Sem mesmo a garantia implícita de COMERCIALI- | |
| 19 | + * ZAÇÃO ou de ADEQUAÇÃO A QUALQUER PROPÓSITO EM PARTICULAR. Con- | |
| 20 | + * sulte a Licença Pública Geral GNU para obter mais detalhes. | |
| 21 | + * | |
| 22 | + * Você deve ter recebido uma cópia da Licença Pública Geral GNU | |
| 23 | + * junto com este programa. Se não, escreva para a Free Software | |
| 24 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | |
| 25 | + * 02111-1307, USA. | |
| 26 | + * | |
| 27 | + */ | |
| 28 | + | |
| 29 | +require_once('include/clsCronometro.inc.php'); | |
| 30 | +require_once('clsConfigItajai.inc.php'); | |
| 31 | +require_once('include/clsBanco.inc.php'); | |
| 32 | +require_once('include/clsMenu.inc.php'); | |
| 33 | +require_once('include/clsControlador.inc.php'); | |
| 34 | +require_once('include/clsLogAcesso.inc.php'); | |
| 35 | + | |
| 36 | +require_once('include/Geral.inc.php'); | |
| 37 | +require_once('include/pmicontrolesis/geral.inc.php'); | |
| 38 | +require_once('include/funcoes.inc.php'); | |
| 37 | 39 | |
| 38 | 40 | class clsBase extends clsConfig |
| 39 | 41 | { | ... | ... |
ieducar/intranet/include/clsControlador.inc.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 | -* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | |
| 2 | +/** | |
| 3 | + * | |
| 4 | + * @version SVN: $Id$ | |
| 5 | + * @author Prefeitura Municipal de Itajaí | |
| 6 | + * @updated 29/03/2007 | |
| 7 | + * Pacote: i-PLB Software Público Livre e Brasileiro | |
| 8 | + * | |
| 9 | + * Copyright (C) 2006 PMI - Prefeitura Municipal de Itajaí | |
| 10 | + * ctima@itajai.sc.gov.br | |
| 11 | + * | |
| 12 | + * Este programa é software livre, você pode redistribuí-lo e/ou | |
| 13 | + * modificá-lo sob os termos da Licença Pública Geral GNU, conforme | |
| 14 | + * publicada pela Free Software Foundation, tanto a versão 2 da | |
| 15 | + * Licença como (a seu critério) qualquer versão mais nova. | |
| 16 | + * | |
| 17 | + * Este programa é distribuído na expectativa de ser útil, mas SEM | |
| 18 | + * QUALQUER GARANTIA. Sem mesmo a garantia implícita de COMERCIALI- | |
| 19 | + * ZAÇÃO ou de ADEQUAÇÃO A QUALQUER PROPÓSITO EM PARTICULAR. Con- | |
| 20 | + * sulte a Licença Pública Geral GNU para obter mais detalhes. | |
| 21 | + * | |
| 22 | + * Você deve ter recebido uma cópia da Licença Pública Geral GNU | |
| 23 | + * junto com este programa. Se não, escreva para a Free Software | |
| 24 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | |
| 25 | + * 02111-1307, USA. | |
| 26 | + * | |
| 27 | + */ | |
| 28 | + | |
| 29 | +require_once 'include/clsBanco.inc.php'; | |
| 30 | + | |
| 27 | 31 | |
| 28 | -require_once ("include/clsBanco.inc.php"); | |
| 29 | 32 | |
| 30 | 33 | class clsControlador |
| 31 | 34 | { |
| ... | ... | @@ -36,12 +39,6 @@ class clsControlador |
| 36 | 39 | { |
| 37 | 40 | @session_set_cookie_params(1200); |
| 38 | 41 | @session_start(); |
| 39 | - if( $_SESSION["servicos"]["intranet"] < time() ) | |
| 40 | - { | |
| 41 | - //session_unset(); | |
| 42 | - //header( "location: http://servicos.itajai.sc.gov.br" ); | |
| 43 | - //die(); | |
| 44 | - } | |
| 45 | 42 | |
| 46 | 43 | if ($_SESSION['itj_controle']=="logado") |
| 47 | 44 | { |
| ... | ... | @@ -84,35 +81,31 @@ class clsControlador |
| 84 | 81 | return $this->logado; |
| 85 | 82 | } |
| 86 | 83 | |
| 87 | - function Logar($acao) | |
| 88 | - { | |
| 84 | + public function Logar($acao) { | |
| 89 | 85 | if ($acao) |
| 90 | 86 | { |
| 91 | - | |
| 92 | -// $login = ereg_replace( "^0+([0-9]+)\$", "\\1",@$_POST['login'] ); | |
| 93 | 87 | $login = @$_POST['login']; |
| 94 | 88 | $senha = md5( @$_POST['senha'] ); |
| 95 | 89 | $db = new clsBanco(); |
| 96 | 90 | |
| 97 | - $db->Consulta( "SELECT ref_cod_pessoa_fj FROM funcionario WHERE matricula = '{$login}'" ); | |
| 91 | + $db->Consulta("SELECT ref_cod_pessoa_fj FROM funcionario WHERE matricula = '{$login}'"); | |
| 98 | 92 | if ($db->ProximoRegistro()) |
| 99 | 93 | { |
| 100 | 94 | list($idpes) = $db->Tupla(); |
| 101 | 95 | |
| 102 | - // padrao: meia hora atraz | |
| 103 | - | |
| 104 | - $intervalo = date("Y-m-d H:i", time() - ( 60 * 1 ) ); | |
| 96 | + // padrao: meia hora atrás | |
| 97 | + $intervalo = date("Y-m-d H:i", time() - (60 * 1 )); | |
| 105 | 98 | |
| 106 | 99 | // se houve o ultimo login bem sucedido foi em menos de meia hora, conta somente dali para a frente |
| 107 | 100 | $db->consulta("SELECT data_hora FROM acesso WHERE cod_pessoa = '{$idpes}' AND data_hora > '{$intervalo}' AND sucesso = 't' ORDER BY data_hora DESC LIMIT 1" ); |
| 108 | - if( $db->Num_Linhas() ) | |
| 101 | + if ($db->Num_Linhas()) | |
| 109 | 102 | { |
| 110 | 103 | $db->ProximoRegistro(); |
| 111 | 104 | list( $intervalo ) = $db->Tupla(); |
| 112 | 105 | } |
| 113 | 106 | |
| 114 | 107 | $tentativas = $db->CampoUnico("SELECT COUNT(0) FROM acesso WHERE cod_pessoa = '{$idpes}' AND data_hora > '{$intervalo}' AND sucesso = 'f'" ); |
| 115 | - if( $tentativas > 5 ) | |
| 108 | + if ($tentativas > 5) | |
| 116 | 109 | { |
| 117 | 110 | $hora_ultima_tentativa = $db->CampoUnico("SELECT data_hora FROM acesso WHERE cod_pessoa = '{$idpes}' ORDER BY data_hora DESC LIMIT 1 OFFSET 4" ); |
| 118 | 111 | $hora_ultima_tentativa = explode(".",$hora_ultima_tentativa); |
| ... | ... | @@ -126,40 +119,43 @@ class clsControlador |
| 126 | 119 | $db->Consulta( "SELECT ref_cod_pessoa_fj, opcao_menu, ativo, tempo_expira_senha, tempo_expira_conta, data_troca_senha, data_reativa_conta, proibido, ref_cod_setor_new, tipo_menu FROM funcionario WHERE ref_cod_pessoa_fj = '{$idpes}' AND senha = '{$senha}'" ); |
| 127 | 120 | if ($db->ProximoRegistro()) |
| 128 | 121 | { |
| 129 | - list ($id_pessoa, $opcaomenu, $ativo, $tempo_senha, $tempo_conta, $data_senha, $data_conta, $proibido, $setor_new, $tipo_menu ) = $db->Tupla(); | |
| 130 | - if( ! $proibido ) | |
| 122 | + list($id_pessoa, $opcaomenu, $ativo, $tempo_senha, $tempo_conta, $data_senha, $data_conta, $proibido, $setor_new, $tipo_menu ) = $db->Tupla(); | |
| 123 | + if (!$proibido) | |
| 131 | 124 | { |
| 132 | - if( $ativo ) | |
| 125 | + if ($ativo) | |
| 133 | 126 | { |
| 134 | 127 | // usuario ativo, vamos ver se nao expirou a conta dele |
| 135 | 128 | $expirada = false; |
| 136 | - if( ! empty( $tempo_conta ) && !empty( $data_conta ) ) | |
| 129 | + if (!empty($tempo_conta) && !empty($data_conta)) | |
| 137 | 130 | { |
| 138 | - if( time() - strtotime( $data_conta ) > $tempo_conta * 60 * 60 * 24 ) | |
| 131 | + if (time() - strtotime($data_conta) > $tempo_conta * 60 * 60 * 24) | |
| 139 | 132 | { |
| 140 | 133 | // conta expirada, avisa a falar com admin |
| 141 | - $db->Consulta( "UPDATE funcionario SET ativo='0' WHERE ref_cod_pessoa_fj = '$id_pessoa'" ); | |
| 142 | - die( "<html><body></body><script>alert( 'Sua conta na intranet expirou.\nContacte um administrador para reativa-la.' );document.location.href='http://ieducar.dccobra.com.br/intranet';</script></html>" ); | |
| 134 | + $db->Consulta("UPDATE funcionario SET ativo='0' WHERE ref_cod_pessoa_fj = '$id_pessoa'"); | |
| 135 | + die("<html><body></body><script>alert( 'Sua conta na intranet expirou.\nContacte um administrador para reativa-la.' );document.location.href='http://ieducar.dccobra.com.br/intranet';</script></html>"); | |
| 143 | 136 | } |
| 144 | 137 | } |
| 145 | 138 | // vendo se a senha nao expirou |
| 146 | - if( ! empty( $tempo_senha ) && ! empty( $data_senha ) ) | |
| 139 | + if (!empty($tempo_senha) && ! empty($data_senha)) | |
| 147 | 140 | { |
| 148 | - if( time() - strtotime( $data_senha ) > $tempo_senha * 60 * 60 * 24 ) | |
| 141 | + if (time() - strtotime($data_senha) > $tempo_senha * 60 * 60 * 24) | |
| 149 | 142 | { |
| 150 | 143 | // senha expirada, manda pra mudanca de senha |
| 151 | 144 | die( "<html><body><form id='reenvio' name='reenvio' action='usuario_trocasenha.php' method='POST'><input type='hidden' name='cod_pessoa' value='{$id_pessoa}'></form></body><script>document.getElementById('reenvio').submit();</script></html>" ); |
| 152 | 145 | } |
| 153 | 146 | } |
| 154 | 147 | |
| 155 | - //verificação do ip da máquina | |
| 156 | - if ( isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR'] != '' ) | |
| 157 | - { | |
| 158 | - $ip_maquina = $_SERVER['HTTP_X_FORWARDED_FOR']; | |
| 159 | - } | |
| 160 | - else | |
| 161 | - $ip_maquina = $_SERVER['REMOTE_ADDR']; | |
| 162 | - | |
| 148 | + // Pega o endereço IP do host, primeiro com HTTP_X_FORWARDED_FOR (para pegar o IP real | |
| 149 | + // caso o host esteja atrás de um proxy) | |
| 150 | + if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR'] != '') { | |
| 151 | + // No caso de múltiplos IPs, pega o último da lista | |
| 152 | + $ip = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']); | |
| 153 | + $ip_maquina = trim(array_pop($ip)); | |
| 154 | + } | |
| 155 | + else { | |
| 156 | + $ip_maquina = $_SERVER['REMOTE_ADDR']; | |
| 157 | + } | |
| 158 | + | |
| 163 | 159 | $sql = "SELECT ip_logado, data_login FROM funcionario WHERE ref_cod_pessoa_fj = {$id_pessoa}"; |
| 164 | 160 | $db2 = new clsBanco(); |
| 165 | 161 | $db2->Consulta($sql); |
| ... | ... | @@ -224,12 +220,19 @@ class clsControlador |
| 224 | 220 | } |
| 225 | 221 | else |
| 226 | 222 | { |
| 227 | - $ip = empty($_SERVER['REMOTE_ADDR']) ? "NULL" : $_SERVER['REMOTE_ADDR']; | |
| 228 | - $ip_de_rede = empty($_SERVER['HTTP_X_FORWARDED_FOR']) ? "NULL" : $_SERVER['HTTP_X_FORWARDED_FOR']; | |
| 229 | - $db->Consulta( "INSERT INTO acesso (data_hora, ip_externo, ip_interno, cod_pessoa, sucesso) VALUES (now(), '{$ip}', '{$ip_de_rede}', {$idpes}, 'f')" ); | |
| 223 | + if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR'] != '') { | |
| 224 | + // No caso de múltiplos IPs, pega o último da lista | |
| 225 | + $ip = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']); | |
| 226 | + $ip_de_rede = trim(array_pop($ip)); | |
| 227 | + } | |
| 228 | + | |
| 229 | + $ip = empty($_SERVER['REMOTE_ADDR']) ? 'NULL' : $_SERVER['REMOTE_ADDR']; | |
| 230 | + $ip_de_rede = empty($ip_de_rede) ? 'NULL' : $ip_de_rede; | |
| 231 | + | |
| 232 | + $db->Consulta("INSERT INTO acesso (data_hora, ip_externo, ip_interno, cod_pessoa, sucesso) VALUES (now(), '{$ip}', '{$ip_de_rede}', {$idpes}, 'f')"); | |
| 230 | 233 | |
| 231 | - $this->erroMsg = "Login ou Senha incorretos."; | |
| 232 | - $this->logado = false; | |
| 234 | + $this->erroMsg = 'Login ou Senha incorretos.'; | |
| 235 | + $this->logado = FALSE; | |
| 233 | 236 | } |
| 234 | 237 | } |
| 235 | 238 | else |
| ... | ... | @@ -247,10 +250,8 @@ class clsControlador |
| 247 | 250 | { |
| 248 | 251 | $strArquivo = str_replace( "<!-- #&ERROLOGIN&# -->", $this->erroMsg, $strArquivo ); |
| 249 | 252 | } |
| 250 | - fclose ($ptrTpl); | |
| 251 | - //echo $strArquivo; | |
| 252 | - //print_r( $_SESSION ); | |
| 253 | - die( $strArquivo ); | |
| 253 | + fclose($ptrTpl); | |
| 254 | + die($strArquivo); | |
| 254 | 255 | } |
| 255 | 256 | } |
| 256 | 257 | |
| ... | ... | @@ -266,4 +267,3 @@ class clsControlador |
| 266 | 267 | } |
| 267 | 268 | } |
| 268 | 269 | } |
| 269 | -?> | ... | ... |
ieducar/intranet/include/funcoes.inc.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 | -* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | |
| 2 | +/** | |
| 3 | + * | |
| 4 | + * @version SVN: $Id$ | |
| 5 | + * @author Prefeitura Municipal de Itajaí | |
| 6 | + * @updated 29/03/2007 | |
| 7 | + * Pacote: i-PLB Software Público Livre e Brasileiro | |
| 8 | + * | |
| 9 | + * Copyright (C) 2006 PMI - Prefeitura Municipal de Itajaí | |
| 10 | + * ctima@itajai.sc.gov.br | |
| 11 | + * | |
| 12 | + * Este programa é software livre, você pode redistribuí-lo e/ou | |
| 13 | + * modificá-lo sob os termos da Licença Pública Geral GNU, conforme | |
| 14 | + * publicada pela Free Software Foundation, tanto a versão 2 da | |
| 15 | + * Licença como (a seu critério) qualquer versão mais nova. | |
| 16 | + * | |
| 17 | + * Este programa é distribuído na expectativa de ser útil, mas SEM | |
| 18 | + * QUALQUER GARANTIA. Sem mesmo a garantia implícita de COMERCIALI- | |
| 19 | + * ZAÇÃO ou de ADEQUAÇÃO A QUALQUER PROPÓSITO EM PARTICULAR. Con- | |
| 20 | + * sulte a Licença Pública Geral GNU para obter mais detalhes. | |
| 21 | + * | |
| 22 | + * Você deve ter recebido uma cópia da Licença Pública Geral GNU | |
| 23 | + * junto com este programa. Se não, escreva para a Free Software | |
| 24 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | |
| 25 | + * 02111-1307, USA. | |
| 26 | + * | |
| 27 | + */ | |
| 28 | + | |
| 27 | 29 | /** |
| 28 | 30 | * Adiciona zeros a esquerda de um numero |
| 29 | 31 | * |
| ... | ... | @@ -794,18 +796,22 @@ |
| 794 | 796 | return strtotime( $data_original ); |
| 795 | 797 | } |
| 796 | 798 | |
| 797 | - /** | |
| 798 | - * Formata uma data vinda do postgre no formato brasileiro | |
| 799 | - * | |
| 800 | - * @param string $data_original data que será transformada | |
| 801 | - * @param string $format formatacao da data (identico a da funcao date() ) | |
| 802 | - * | |
| 803 | - * @return string | |
| 804 | - */ | |
| 805 | - function dataFromPgToBr( $data_original, $formatacao = "d/m/Y" ) | |
| 806 | - { | |
| 807 | - return date( $formatacao, dataFromPgToTime( $data_original ) ); | |
| 808 | - } | |
| 799 | +/** | |
| 800 | + * Formata uma data ISO-8601 no formato do locale pt_BR. | |
| 801 | + * | |
| 802 | + * O formato ISO-8601 geralmente é utilizado pelos DBMS atuais nos tipos de campos datetime/timestamp. | |
| 803 | + * O PostgreSQL utiliza este padrão. | |
| 804 | + * | |
| 805 | + * @param string $data_original Data que será formatada | |
| 806 | + * @param string $formatacao String de formatação no padrão aceito pela função date() do PHP | |
| 807 | + * @link http://www.php.net/date Documentação da função PHP date() | |
| 808 | + * | |
| 809 | + * @return string | |
| 810 | + */ | |
| 811 | +function dataFromPgToBr($data_original, $formatacao = "d/m/Y") | |
| 812 | +{ | |
| 813 | + return date($formatacao, dataFromPgToTime($data_original)); | |
| 814 | +} | |
| 809 | 815 | |
| 810 | 816 | |
| 811 | 817 | /** |
| ... | ... | @@ -1391,4 +1397,4 @@ function Code39 ($Asc) |
| 1391 | 1397 | |
| 1392 | 1398 | } |
| 1393 | 1399 | |
| 1394 | -?> | |
| 1395 | 1400 | \ No newline at end of file |
| 1401 | +?> | ... | ... |
ieducar/intranet/include/pmieducar/clsPmieducarCliente.inc.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 | 2 | /** |
| 28 | -* @author Prefeitura Municipal de Itajaí | |
| 29 | -* | |
| 30 | -* Criado em 17/07/2006 09:18 pelo gerador automatico de classes | |
| 31 | -*/ | |
| 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 | + | |
| 28 | +/* | |
| 29 | + * Criado em 17/07/2006 09:18 pelo gerador automatico de classes | |
| 30 | + */ | |
| 32 | 31 | |
| 33 | 32 | require_once( "include/pmieducar/geral.inc.php" ); |
| 34 | 33 | |
| ... | ... | @@ -488,12 +487,20 @@ class clsPmieducarCliente |
| 488 | 487 | function listaCompleta( $int_cod_cliente = null, $int_ref_usuario_exc = null, $int_ref_usuario_cad = null, $int_ref_idpes = null, $int_login = null, $str_senha = null, $date_data_cadastro_ini = null, $date_data_cadastro_fim = null, $date_data_exclusao_ini = null, $date_data_exclusao_fim = null, $int_ativo = 1, $str_nm_cliente = null, $str_suspenso = null, $int_cod_cliente_tipo = null, $int_cod_escola = null, $int_cod_biblioteca = null, $int_cod_instituicao = null ) |
| 489 | 488 | { |
| 490 | 489 | $tab_adicional = ''; |
| 491 | - $condicao = ''; | |
| 490 | + $condicao = ''; | |
| 492 | 491 | $camp_adicional = ''; |
| 493 | - if( is_string( $str_suspenso ) ) { | |
| 492 | + | |
| 493 | + // Se suspenso não for nulo, seleciona clientes suspensos | |
| 494 | + if (!is_null($str_suspenso)) | |
| 495 | + { | |
| 494 | 496 | $camp_adicional .= ", pmieducar.cliente_suspensao cs "; |
| 495 | 497 | $condicao .= " AND c.cod_cliente = cs.ref_cod_cliente"; |
| 496 | 498 | } |
| 499 | + else | |
| 500 | + { | |
| 501 | + $camp_adicional .= ", pmieducar.cliente_suspensao cs "; | |
| 502 | + $condicao .= " AND c.cod_cliente <> cs.ref_cod_cliente"; | |
| 503 | + } | |
| 497 | 504 | |
| 498 | 505 | $sql1 = "SELECT c.cod_cliente, |
| 499 | 506 | c.ref_idpes, |
| ... | ... | @@ -985,4 +992,4 @@ class clsPmieducarCliente |
| 985 | 992 | } |
| 986 | 993 | |
| 987 | 994 | } |
| 988 | -?> | |
| 989 | 995 | \ No newline at end of file |
| 996 | +?> | ... | ... |
ieducar/intranet/include/pmieducar/clsPmieducarDispensaDisciplina.inc.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 | 2 | /** |
| 28 | -* @author Prefeitura Municipal de Itajaí | |
| 29 | -* | |
| 30 | -* Criado em 10/08/2006 17:10 pelo gerador automatico de classes | |
| 31 | -*/ | |
| 32 | - | |
| 33 | -require_once( "include/pmieducar/geral.inc.php" ); | |
| 3 | + * | |
| 4 | + * @version SVN: $Id$ | |
| 5 | + * @author Prefeitura Municipal de Itajaí | |
| 6 | + * @updated 29/03/2007 | |
| 7 | + * Pacote: i-PLB Software Público Livre e Brasileiro | |
| 8 | + * | |
| 9 | + * Copyright (C) 2006 PMI - Prefeitura Municipal de Itajaí | |
| 10 | + * ctima@itajai.sc.gov.br | |
| 11 | + * | |
| 12 | + * Este programa é software livre, você pode redistribuí-lo e/ou | |
| 13 | + * modificá-lo sob os termos da Licença Pública Geral GNU, conforme | |
| 14 | + * publicada pela Free Software Foundation, tanto a versão 2 da | |
| 15 | + * Licença como (a seu critério) qualquer versão mais nova. | |
| 16 | + * | |
| 17 | + * Este programa é distribuído na expectativa de ser útil, mas SEM | |
| 18 | + * QUALQUER GARANTIA. Sem mesmo a garantia implícita de COMERCIALI- | |
| 19 | + * ZAÇÃO ou de ADEQUAÇÃO A QUALQUER PROPÓSITO EM PARTICULAR. Con- | |
| 20 | + * sulte a Licença Pública Geral GNU para obter mais detalhes. | |
| 21 | + * | |
| 22 | + * Você deve ter recebido uma cópia da Licença Pública Geral GNU | |
| 23 | + * junto com este programa. Se não, escreva para a Free Software | |
| 24 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | |
| 25 | + * 02111-1307, USA. | |
| 26 | + * | |
| 27 | + */ | |
| 28 | + | |
| 29 | +require_once('include/pmieducar/geral.inc.php'); | |
| 34 | 30 | |
| 35 | 31 | class clsPmieducarDispensaDisciplina |
| 36 | 32 | { |
| ... | ... | @@ -296,7 +292,10 @@ class clsPmieducarDispensaDisciplina |
| 296 | 292 | */ |
| 297 | 293 | function cadastra() |
| 298 | 294 | { |
| 299 | - if( is_numeric( $this->ref_cod_matricula ) && is_numeric( $this->ref_cod_serie ) && is_numeric( $this->ref_cod_escola ) && is_numeric( $this->ref_cod_disciplina ) && is_numeric( $this->ref_usuario_cad ) && is_numeric( $this->ref_cod_tipo_dispensa ) && is_numeric($this->cod_dispensa) ) | |
| 295 | + if (is_numeric($this->ref_cod_matricula) && is_numeric($this->ref_cod_serie) && | |
| 296 | + is_numeric($this->ref_cod_escola) && is_numeric($this->ref_cod_disciplina) && | |
| 297 | + is_numeric($this->ref_usuario_cad) && is_numeric($this->ref_cod_tipo_dispensa) && | |
| 298 | + is_numeric($this->cod_dispensa)) | |
| 300 | 299 | { |
| 301 | 300 | $db = new clsBanco(); |
| 302 | 301 | |
| ... | ... | @@ -361,7 +360,8 @@ class clsPmieducarDispensaDisciplina |
| 361 | 360 | $gruda = ", "; |
| 362 | 361 | } |
| 363 | 362 | |
| 364 | - $db->Consulta( "INSERT INTO {$this->_tabela} ( $campos ) VALUES( $valores )" ); | |
| 363 | + $sql = "INSERT INTO {$this->_tabela} ($campos) VALUES($valores)"; | |
| 364 | + $db->Consulta($sql); | |
| 365 | 365 | return true; |
| 366 | 366 | } |
| 367 | 367 | return false; |
| ... | ... | @@ -679,4 +679,4 @@ class clsPmieducarDispensaDisciplina |
| 679 | 679 | } |
| 680 | 680 | |
| 681 | 681 | } |
| 682 | -?> | |
| 683 | 682 | \ No newline at end of file |
| 683 | +?> | ... | ... |
ieducar/intranet/include/pmieducar/clsPmieducarMatriculaOcorrenciaDisciplinar.inc.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 | 2 | /** |
| 28 | -* @author Prefeitura Municipal de Itajaí | |
| 29 | -* | |
| 30 | -* Criado em 26/06/2006 16:19 pelo gerador automatico de classes | |
| 31 | -*/ | |
| 32 | - | |
| 33 | -require_once( "include/pmieducar/geral.inc.php" ); | |
| 3 | + * | |
| 4 | + * @version SVN: $Id$ | |
| 5 | + * @author Prefeitura Municipal de Itajaí | |
| 6 | + * @updated 29/03/2007 | |
| 7 | + * Pacote: i-PLB Software Público Livre e Brasileiro | |
| 8 | + * | |
| 9 | + * Copyright (C) 2006 PMI - Prefeitura Municipal de Itajaí | |
| 10 | + * ctima@itajai.sc.gov.br | |
| 11 | + * | |
| 12 | + * Este programa é software livre, você pode redistribuí-lo e/ou | |
| 13 | + * modificá-lo sob os termos da Licença Pública Geral GNU, conforme | |
| 14 | + * publicada pela Free Software Foundation, tanto a versão 2 da | |
| 15 | + * Licença como (a seu critério) qualquer versão mais nova. | |
| 16 | + * | |
| 17 | + * Este programa é distribuído na expectativa de ser útil, mas SEM | |
| 18 | + * QUALQUER GARANTIA. Sem mesmo a garantia implícita de COMERCIALI- | |
| 19 | + * ZAÇÃO ou de ADEQUAÇÃO A QUALQUER PROPÓSITO EM PARTICULAR. Con- | |
| 20 | + * sulte a Licença Pública Geral GNU para obter mais detalhes. | |
| 21 | + * | |
| 22 | + * Você deve ter recebido uma cópia da Licença Pública Geral GNU | |
| 23 | + * junto com este programa. Se não, escreva para a Free Software | |
| 24 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | |
| 25 | + * 02111-1307, USA. | |
| 26 | + * | |
| 27 | + */ | |
| 28 | + | |
| 29 | +require_once('include/pmieducar/geral.inc.php'); | |
| 34 | 30 | |
| 35 | 31 | class clsPmieducarMatriculaOcorrenciaDisciplinar |
| 36 | 32 | { |
| ... | ... | @@ -638,4 +634,4 @@ class clsPmieducarMatriculaOcorrenciaDisciplinar |
| 638 | 634 | } |
| 639 | 635 | |
| 640 | 636 | } |
| 641 | -?> | |
| 642 | 637 | \ No newline at end of file |
| 638 | +?> | ... | ... |
ieducar/intranet/logof.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 | -@session_start(); | |
| 2 | +/** | |
| 3 | + * | |
| 4 | + * @version SVN: $Id$ | |
| 5 | + * @author Prefeitura Municipal de Itajaí | |
| 6 | + * @updated 29/03/2007 | |
| 7 | + * Pacote: i-PLB Software Público Livre e Brasileiro | |
| 8 | + * | |
| 9 | + * Copyright (C) 2006 PMI - Prefeitura Municipal de Itajaí | |
| 10 | + * ctima@itajai.sc.gov.br | |
| 11 | + * | |
| 12 | + * Este programa é software livre, você pode redistribuí-lo e/ou | |
| 13 | + * modificá-lo sob os termos da Licença Pública Geral GNU, conforme | |
| 14 | + * publicada pela Free Software Foundation, tanto a versão 2 da | |
| 15 | + * Licença como (a seu critério) qualquer versão mais nova. | |
| 16 | + * | |
| 17 | + * Este programa é distribuído na expectativa de ser útil, mas SEM | |
| 18 | + * QUALQUER GARANTIA. Sem mesmo a garantia implícita de COMERCIALI- | |
| 19 | + * ZAÇÃO ou de ADEQUAÇÃO A QUALQUER PROPÓSITO EM PARTICULAR. Con- | |
| 20 | + * sulte a Licença Pública Geral GNU para obter mais detalhes. | |
| 21 | + * | |
| 22 | + * Você deve ter recebido uma cópia da Licença Pública Geral GNU | |
| 23 | + * junto com este programa. Se não, escreva para a Free Software | |
| 24 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | |
| 25 | + * 02111-1307, USA. | |
| 26 | + * | |
| 27 | + */ | |
| 28 | + | |
| 29 | +session_start(); | |
| 28 | 30 | $_SESSION = array(); |
| 29 | -@session_destroy(); | |
| 30 | -//session_write_close(); | |
| 31 | +session_destroy(); | |
| 31 | 32 | |
| 32 | -if( isset( $_GET["login"] ) ) | |
| 33 | -{ | |
| 34 | - header("Location: http://localhost/intranet/index.php"); | |
| 35 | -} | |
| 36 | -else | |
| 37 | -{ | |
| 38 | - header("Location: http://localhost/intranet/index.php"); | |
| 39 | -} | |
| 40 | -die(); | |
| 41 | -?> | |
| 33 | +// Redireciona para página de login | |
| 34 | +header('Location: ./index.php'); | |
| 35 | + | |
| 36 | +exit(0); | ... | ... |