Commit e97986cb5cec35979641ba37c35d09beb4ba358c
1 parent
fad0303b
Exists in
master
#42 by Eriksen: Corrigido bug de bloqueio de acesso indevido (código da permissã…
…o estava incorreto nos arquivos referidos)
Showing
2 changed files
with
19 additions
and
5 deletions
Show diff stats
ieducar/intranet/educar_relatorio_registro_transferencias.php
@@ -42,7 +42,7 @@ class clsIndexBase extends clsBase | @@ -42,7 +42,7 @@ class clsIndexBase extends clsBase | ||
42 | function Formular() | 42 | function Formular() |
43 | { | 43 | { |
44 | $this->SetTitulo($this->_instituicao . ' i-Educar - Registro de Matrículas'); | 44 | $this->SetTitulo($this->_instituicao . ' i-Educar - Registro de Matrículas'); |
45 | - $this->processoAp = '693'; | 45 | + $this->processoAp = '916'; |
46 | } | 46 | } |
47 | } | 47 | } |
48 | 48 |
ieducar/intranet/educar_relatorio_registro_transferencias_proc.php
@@ -28,6 +28,7 @@ | @@ -28,6 +28,7 @@ | ||
28 | * @subpackage SolicitacaoTransferencia | 28 | * @subpackage SolicitacaoTransferencia |
29 | * @subpackage Relatorio | 29 | * @subpackage Relatorio |
30 | * @since Arquivo disponível desde a versão 1.0.0 | 30 | * @since Arquivo disponível desde a versão 1.0.0 |
31 | + * @todo Refatorar o uso do objeto CoreExt_Config, talvez criando um {@link http://martinfowler.com/eaaCatalog/layerSupertype.html Layer Supertype} | ||
31 | * @version $Id$ | 32 | * @version $Id$ |
32 | */ | 33 | */ |
33 | 34 | ||
@@ -89,6 +90,15 @@ class indice extends clsCadastro | @@ -89,6 +90,15 @@ class indice extends clsCadastro | ||
89 | 90 | ||
90 | function renderHTML() | 91 | function renderHTML() |
91 | { | 92 | { |
93 | + /** | ||
94 | + * Variável global com objetos do CoreExt. | ||
95 | + * @see includes/bootstrap.php | ||
96 | + */ | ||
97 | + global $coreExt; | ||
98 | + | ||
99 | + // Namespace de configuração para localização de interface | ||
100 | + $uf = $coreExt['Config']->app->locale->province; | ||
101 | + | ||
92 | $this->ref_cod_instituicao = $_POST['ref_cod_instituicao']; | 102 | $this->ref_cod_instituicao = $_POST['ref_cod_instituicao']; |
93 | $this->ref_cod_escola = $_POST['ref_cod_escola']; | 103 | $this->ref_cod_escola = $_POST['ref_cod_escola']; |
94 | $this->ano = $_POST['ano']; | 104 | $this->ano = $_POST['ano']; |
@@ -171,7 +181,8 @@ class indice extends clsCadastro | @@ -171,7 +181,8 @@ class indice extends clsCadastro | ||
171 | $this->total++; | 181 | $this->total++; |
172 | } | 182 | } |
173 | 183 | ||
174 | - $this->pdf = new clsPDF("Registro de Matrículas - {$this->ano}", "Registro de Matrículas", "A4", "", false, false); | 184 | + $this->pdf = new clsPDF('Registro de Matrículas - ' . $this->ano, |
185 | + 'Registro de Matrículas', 'A4', '', FALSE, FALSE); | ||
175 | $obj_instituicao = new clsPmieducarInstituicao(); | 186 | $obj_instituicao = new clsPmieducarInstituicao(); |
176 | 187 | ||
177 | $this->pdf->largura = 842.0; | 188 | $this->pdf->largura = 842.0; |
@@ -233,7 +244,10 @@ class indice extends clsCadastro | @@ -233,7 +244,10 @@ class indice extends clsCadastro | ||
233 | 244 | ||
234 | $this->pdf->linha_relativa($esquerda + 757, $altura, 0, 18); | 245 | $this->pdf->linha_relativa($esquerda + 757, $altura, 0, 18); |
235 | 246 | ||
236 | - $this->pdf->escreve_relativo(empty($estabelecimento_destino) ? '' : 'SC', | 247 | + // Coloca o UF configurado em ieducar.ini caso exista um estabelecimento destino, |
248 | + // supondo que todos os estabelecimentos estejam no mesmo estado. | ||
249 | + // @todo Para suportar multi-instituições, deve pegar a informação dos dados da escola destino. | ||
250 | + $this->pdf->escreve_relativo(empty($estabelecimento_destino) ? '' : $uf, | ||
237 | $esquerda + 763, $altura + $altura_escrita, 50, 30, $fonte, $tam_texto); | 251 | $esquerda + 763, $altura + $altura_escrita, 50, 30, $fonte, $tam_texto); |
238 | 252 | ||
239 | $this->pdf->linha_relativa($esquerda + 782, $altura, 0, 18); | 253 | $this->pdf->linha_relativa($esquerda + 782, $altura, 0, 18); |
@@ -288,7 +302,7 @@ class indice extends clsCadastro | @@ -288,7 +302,7 @@ class indice extends clsCadastro | ||
288 | } | 302 | } |
289 | else { | 303 | else { |
290 | echo ' | 304 | echo ' |
291 | - <script type="text/javscript"> | 305 | + <script> |
292 | alert("A escola nesse ano não possui nenhuma expedição de transferência"); | 306 | alert("A escola nesse ano não possui nenhuma expedição de transferência"); |
293 | window.parent.fechaExpansivel(\'div_dinamico_\'+(window.parent.DOM_divs.length - 1)); | 307 | window.parent.fechaExpansivel(\'div_dinamico_\'+(window.parent.DOM_divs.length - 1)); |
294 | </script>'; | 308 | </script>'; |
@@ -298,7 +312,7 @@ class indice extends clsCadastro | @@ -298,7 +312,7 @@ class indice extends clsCadastro | ||
298 | } | 312 | } |
299 | else { | 313 | else { |
300 | echo ' | 314 | echo ' |
301 | - <script type="text/javscript"> | 315 | + <script> |
302 | alert("A escola nesse ano não possui nenhuma expedição de transferência"); | 316 | alert("A escola nesse ano não possui nenhuma expedição de transferência"); |
303 | window.parent.fechaExpansivel(\'div_dinamico_\'+(window.parent.DOM_divs.length-1)); | 317 | window.parent.fechaExpansivel(\'div_dinamico_\'+(window.parent.DOM_divs.length-1)); |
304 | </script>'; | 318 | </script>'; |