Commit 28892f8f15f243400504ace2c7c159b49e09a1b8

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

by Eriksen: Corrigido caracteres com encoding incorreto

Showing 1 changed file with 57 additions and 61 deletions   Show diff stats
ieducar/intranet/adicionar_documentos_cad.php
1 <?php 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 -$desvio_diretorio = "";  
28 -require_once ("include/clsBase.inc.php");  
29 -require_once ("include/clsCadastro.inc.php");  
30 -require_once ("include/Geral.inc.php"); 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 +
  24 +$desvio_diretorio = '';
  25 +require_once 'include/clsBase.inc.php';
  26 +require_once 'include/clsCadastro.inc.php';
  27 +require_once 'include/Geral.inc.php';
  28 +
31 29
32 class clsIndex extends clsBase 30 class clsIndex extends clsBase
33 { 31 {
34 - 32 +
35 function Formular() 33 function Formular()
36 { 34 {
37 $this->SetTitulo( "{$this->_instituicao} Adicionar Documentos" ); 35 $this->SetTitulo( "{$this->_instituicao} Adicionar Documentos" );
@@ -66,7 +64,7 @@ class indice extends clsCadastro @@ -66,7 +64,7 @@ class indice extends clsCadastro
66 function Inicializar() 64 function Inicializar()
67 { 65 {
68 $retorno = "Novo"; 66 $retorno = "Novo";
69 - 67 +
70 $this->idpes = ($_GET['id_pessoa']) ? $_GET['id_pessoa'] : $_SESSION['id_pessoa']; 68 $this->idpes = ($_GET['id_pessoa']) ? $_GET['id_pessoa'] : $_SESSION['id_pessoa'];
71 $ObjDocumento = new clsDocumento($this->idpes); 69 $ObjDocumento = new clsDocumento($this->idpes);
72 $detalheDocumento = $ObjDocumento->detalhe(); 70 $detalheDocumento = $ObjDocumento->detalhe();
@@ -85,8 +83,8 @@ class indice extends clsCadastro @@ -85,8 +83,8 @@ class indice extends clsCadastro
85 { 83 {
86 $this->data_emissao_cert_civil = date( "d/m/Y", strtotime( substr($detalheDocumento['data_emissao_cert_civil'],0,19) ) ); 84 $this->data_emissao_cert_civil = date( "d/m/Y", strtotime( substr($detalheDocumento['data_emissao_cert_civil'],0,19) ) );
87 } 85 }
88 - $this->sigla_uf_cert_civil = $detalheDocumento['sigla_uf_cert_civil'];  
89 - 86 + $this->sigla_uf_cert_civil = $detalheDocumento['sigla_uf_cert_civil'];
  87 +
90 $this->cartorio_cert_civil = $detalheDocumento['cartorio_cert_civil']; 88 $this->cartorio_cert_civil = $detalheDocumento['cartorio_cert_civil'];
91 $this->num_cart_trabalho = $detalheDocumento['num_cart_trabalho']; 89 $this->num_cart_trabalho = $detalheDocumento['num_cart_trabalho'];
92 $this->serie_cart_trabalho = $detalheDocumento['serie_cart_trabalho']; 90 $this->serie_cart_trabalho = $detalheDocumento['serie_cart_trabalho'];
@@ -102,24 +100,24 @@ class indice extends clsCadastro @@ -102,24 +100,24 @@ class indice extends clsCadastro
102 100
103 101
104 102
105 - 103 +
106 $ObjDocumento = new clsDocumento($this->idpes); 104 $ObjDocumento = new clsDocumento($this->idpes);
107 - 105 +
108 if ($ObjDocumento->detalhe()) 106 if ($ObjDocumento->detalhe())
109 - { 107 + {
110 $retorno = "Editar"; 108 $retorno = "Editar";
111 } 109 }
112 else 110 else
113 { 111 {
114 $retorno = "Novo"; 112 $retorno = "Novo";
115 } 113 }
116 - 114 +
117 return $retorno; 115 return $retorno;
118 } 116 }
119 117
120 function Gerar() 118 function Gerar()
121 { 119 {
122 - 120 +
123 121
124 122
125 $objUf = new clsUf(); 123 $objUf = new clsUf();
@@ -131,7 +129,7 @@ class indice extends clsCadastro @@ -131,7 +129,7 @@ class indice extends clsCadastro
131 $listaEstado[$uf['sigla_uf']] = $uf['sigla_uf']; 129 $listaEstado[$uf['sigla_uf']] = $uf['sigla_uf'];
132 } 130 }
133 } 131 }
134 - 132 +
135 $objOrgaoEmissorRg = new clsOrgaoEmissorRg(); 133 $objOrgaoEmissorRg = new clsOrgaoEmissorRg();
136 $listaOrgaoEmissorRg = $objOrgaoEmissorRg->lista(); 134 $listaOrgaoEmissorRg = $objOrgaoEmissorRg->lista();
137 $listaOrgao = array("0"=>"Selecione"); 135 $listaOrgao = array("0"=>"Selecione");
@@ -141,12 +139,12 @@ class indice extends clsCadastro @@ -141,12 +139,12 @@ class indice extends clsCadastro
141 $listaOrgao[$orgaoemissor['idorg_rg']] = $orgaoemissor['sigla']; 139 $listaOrgao[$orgaoemissor['idorg_rg']] = $orgaoemissor['sigla'];
142 } 140 }
143 } 141 }
144 - 142 +
145 $this->campoOculto( "idpes", $this->idpes); 143 $this->campoOculto( "idpes", $this->idpes);
146 144
147 $this->campoTexto("rg", "Rg", $this->rg, "10", "10", false); 145 $this->campoTexto("rg", "Rg", $this->rg, "10", "10", false);
148 - $this->campoData("data_exp_rg", "Data Expedi��o RG", $this->data_exp_rg, false);  
149 - $this->campoLista("sigla_uf_exp_rg", "�rg�o Expedidor", $listaEstado, $this->sigla_uf_exp_rg, false, false, false, false, false); 146 + $this->campoData("data_exp_rg", "Data Expedição RG", $this->data_exp_rg, false);
  147 + $this->campoLista("sigla_uf_exp_rg", "Órgão Expedidor", $listaEstado, $this->sigla_uf_exp_rg, false, false, false, false, false);
150 148
151 $lista_tipo_cert_civil = array(); 149 $lista_tipo_cert_civil = array();
152 $lista_tipo_cert_civil["0"] = "Selecione"; 150 $lista_tipo_cert_civil["0"] = "Selecione";
@@ -157,21 +155,21 @@ class indice extends clsCadastro @@ -157,21 +155,21 @@ class indice extends clsCadastro
157 $this->campoTexto("num_termo", "Termo", $this->num_termo, "8", "8", false); 155 $this->campoTexto("num_termo", "Termo", $this->num_termo, "8", "8", false);
158 $this->campoTexto("num_livro", "Livro", $this->num_livro, "8", "8", false); 156 $this->campoTexto("num_livro", "Livro", $this->num_livro, "8", "8", false);
159 $this->campoTexto("num_folha", "Folha", $this->num_folha, "4", "4", false); 157 $this->campoTexto("num_folha", "Folha", $this->num_folha, "4", "4", false);
160 - $this->campoData("data_emissao_cert_civil", "Emiss�o Certid�o Civil", $this->data_emissao_cert_civil, false);  
161 - $this->campoLista("sigla_uf_cert_civil", "Sigla Certid�o Civil", $listaEstado, $this->sigla_uf_cert_civil, false, false, false, false, false);  
162 - $this->campoMemo("cartorio_cert_civil", "Cart�rio", $this->cartorio_cert_civil, "35", "4", false); 158 + $this->campoData("data_emissao_cert_civil", "Emissão Certidão Civil", $this->data_emissao_cert_civil, false);
  159 + $this->campoLista("sigla_uf_cert_civil", "Sigla Certidão Civil", $listaEstado, $this->sigla_uf_cert_civil, false, false, false, false, false);
  160 + $this->campoMemo("cartorio_cert_civil", "Cartório", $this->cartorio_cert_civil, "35", "4", false);
163 $this->campoTexto("num_cart_trabalho", "Carteira de Trabalho", $this->num_cart_trabalho, "7", "7", false); 161 $this->campoTexto("num_cart_trabalho", "Carteira de Trabalho", $this->num_cart_trabalho, "7", "7", false);
164 - $this->campoTexto("serie_cart_trabalho", "S�rie", $this->serie_cart_trabalho, "5", "5", false);  
165 - $this->campoData("data_emissao_cart_trabalho", "Emiss�o Carteira", $this->data_emissao_cart_trabalho, false); 162 + $this->campoTexto("serie_cart_trabalho", "Série", $this->serie_cart_trabalho, "5", "5", false);
  163 + $this->campoData("data_emissao_cart_trabalho", "Emissão Carteira", $this->data_emissao_cart_trabalho, false);
166 $this->campoLista("sigla_uf_cart_trabalho", "Sigla Carteira de Trabalho", $listaEstado, $this->sigla_uf_cart_trabalho, false, false, false, false, false); 164 $this->campoLista("sigla_uf_cart_trabalho", "Sigla Carteira de Trabalho", $listaEstado, $this->sigla_uf_cart_trabalho, false, false, false, false, false);
167 - $this->campoTexto("num_tit_eleitor", "T�tulo de Eleitor", $this->num_tit_eleitor, "13", "13", false); 165 + $this->campoTexto("num_tit_eleitor", "Título de Eleitor", $this->num_tit_eleitor, "13", "13", false);
168 $this->campoTexto("zona_tit_eleitor", "Zona", $this->zona_tit_eleitor, "4", "4", false); 166 $this->campoTexto("zona_tit_eleitor", "Zona", $this->zona_tit_eleitor, "4", "4", false);
169 - $this->campoTexto("secao_tit_eleitor", "Se��o", $this->secao_tit_eleitor, "10", "10", false);  
170 - $this->campoLista("idorg_exp_rg", "�rg�o Expedi��o RG", $listaOrgao, $this->idorg_exp_rg, false, false, false, false, false); 167 + $this->campoTexto("secao_tit_eleitor", "Seção", $this->secao_tit_eleitor, "10", "10", false);
  168 + $this->campoLista("idorg_exp_rg", "Órgão Expedição RG", $listaOrgao, $this->idorg_exp_rg, false, false, false, false, false);
171 169
172 } 170 }
173 171
174 - function Novo() 172 + function Novo()
175 { 173 {
176 if($this->data_emissao_cart_trabalho) 174 if($this->data_emissao_cart_trabalho)
177 { 175 {
@@ -188,7 +186,7 @@ class indice extends clsCadastro @@ -188,7 +186,7 @@ class indice extends clsCadastro
188 $this->data_exp_rg = explode("/",$this->data_exp_rg); 186 $this->data_exp_rg = explode("/",$this->data_exp_rg);
189 $this->data_exp_rg = "{$this->data_exp_rg[2]}/{$this->data_exp_rg[1]}/{$this->data_exp_rg[0]}"; 187 $this->data_exp_rg = "{$this->data_exp_rg[2]}/{$this->data_exp_rg[1]}/{$this->data_exp_rg[0]}";
190 188
191 - } 189 + }
192 $ObjDocumento = new clsDocumento($this->idpes, $this->rg, $this->data_exp_rg, $this->sigla_uf_exp_rg, $this->tipo_cert_civil, $this->num_termo, $this->num_livro, $this->num_folha, $this->data_emissao_cert_civil, $this->sigla_uf_cert_civil, $this->cartorio_cert_civil, $this->num_cart_trabalho, $this->serie_cart_trabalho, $this->data_emissao_cart_trabalho, $this->sigla_uf_cart_trabalho, $this->num_tit_eleitor, $this->zona_tit_eleitor, $this->secao_tit_eleitor, $this->idorg_exp_rg ); 190 $ObjDocumento = new clsDocumento($this->idpes, $this->rg, $this->data_exp_rg, $this->sigla_uf_exp_rg, $this->tipo_cert_civil, $this->num_termo, $this->num_livro, $this->num_folha, $this->data_emissao_cert_civil, $this->sigla_uf_cert_civil, $this->cartorio_cert_civil, $this->num_cart_trabalho, $this->serie_cart_trabalho, $this->data_emissao_cart_trabalho, $this->sigla_uf_cart_trabalho, $this->num_tit_eleitor, $this->zona_tit_eleitor, $this->secao_tit_eleitor, $this->idorg_exp_rg );
193 if( $ObjDocumento->cadastra() ) 191 if( $ObjDocumento->cadastra() )
194 { 192 {
@@ -200,7 +198,7 @@ class indice extends clsCadastro @@ -200,7 +198,7 @@ class indice extends clsCadastro
200 } 198 }
201 199
202 function Editar() 200 function Editar()
203 - { 201 + {
204 if($this->data_emissao_cart_trabalho) 202 if($this->data_emissao_cart_trabalho)
205 { 203 {
206 $this->data_emissao_cart_trabalho = explode("/",$this->data_emissao_cart_trabalho); 204 $this->data_emissao_cart_trabalho = explode("/",$this->data_emissao_cart_trabalho);
@@ -219,15 +217,13 @@ class indice extends clsCadastro @@ -219,15 +217,13 @@ class indice extends clsCadastro
219 } 217 }
220 $ObjDocumento = new clsDocumento($this->idpes, $this->rg, $this->data_exp_rg, $this->sigla_uf_exp_rg, $this->tipo_cert_civil, $this->num_termo, $this->num_livro, $this->num_folha, $this->data_emissao_cert_civil, $this->sigla_uf_cert_civil, $this->cartorio_cert_civil, $this->num_cart_trabalho, $this->serie_cart_trabalho, $this->data_emissao_cart_trabalho, $this->sigla_uf_cart_trabalho, $this->num_tit_eleitor, $this->zona_tit_eleitor, $this->secao_tit_eleitor, $this->idorg_exp_rg ); 218 $ObjDocumento = new clsDocumento($this->idpes, $this->rg, $this->data_exp_rg, $this->sigla_uf_exp_rg, $this->tipo_cert_civil, $this->num_termo, $this->num_livro, $this->num_folha, $this->data_emissao_cert_civil, $this->sigla_uf_cert_civil, $this->cartorio_cert_civil, $this->num_cart_trabalho, $this->serie_cart_trabalho, $this->data_emissao_cart_trabalho, $this->sigla_uf_cart_trabalho, $this->num_tit_eleitor, $this->zona_tit_eleitor, $this->secao_tit_eleitor, $this->idorg_exp_rg );
221 219
222 - if( $ObjDocumento->edita() )  
223 - {  
224 - echo "window.close()</script>";  
225 -  
226 - return true;  
227 - } 220 + if ($ObjDocumento->edita()) {
  221 + echo '<script>window.close()</script>';
  222 + return TRUE;
  223 + }
228 224
229 - return false;  
230 - } 225 + return FALSE;
  226 + }
231 227
232 function Excluir() 228 function Excluir()
233 { 229 {