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
ieducar/intranet/educar_relatorio_registro_transferencias_proc.php
... | ... | @@ -28,6 +28,7 @@ |
28 | 28 | * @subpackage SolicitacaoTransferencia |
29 | 29 | * @subpackage Relatorio |
30 | 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 | 32 | * @version $Id$ |
32 | 33 | */ |
33 | 34 | |
... | ... | @@ -89,6 +90,15 @@ class indice extends clsCadastro |
89 | 90 | |
90 | 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 | 102 | $this->ref_cod_instituicao = $_POST['ref_cod_instituicao']; |
93 | 103 | $this->ref_cod_escola = $_POST['ref_cod_escola']; |
94 | 104 | $this->ano = $_POST['ano']; |
... | ... | @@ -171,7 +181,8 @@ class indice extends clsCadastro |
171 | 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 | 186 | $obj_instituicao = new clsPmieducarInstituicao(); |
176 | 187 | |
177 | 188 | $this->pdf->largura = 842.0; |
... | ... | @@ -233,7 +244,10 @@ class indice extends clsCadastro |
233 | 244 | |
234 | 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 | 251 | $esquerda + 763, $altura + $altura_escrita, 50, 30, $fonte, $tam_texto); |
238 | 252 | |
239 | 253 | $this->pdf->linha_relativa($esquerda + 782, $altura, 0, 18); |
... | ... | @@ -288,7 +302,7 @@ class indice extends clsCadastro |
288 | 302 | } |
289 | 303 | else { |
290 | 304 | echo ' |
291 | - <script type="text/javscript"> | |
305 | + <script> | |
292 | 306 | alert("A escola nesse ano não possui nenhuma expedição de transferência"); |
293 | 307 | window.parent.fechaExpansivel(\'div_dinamico_\'+(window.parent.DOM_divs.length - 1)); |
294 | 308 | </script>'; |
... | ... | @@ -298,7 +312,7 @@ class indice extends clsCadastro |
298 | 312 | } |
299 | 313 | else { |
300 | 314 | echo ' |
301 | - <script type="text/javscript"> | |
315 | + <script> | |
302 | 316 | alert("A escola nesse ano não possui nenhuma expedição de transferência"); |
303 | 317 | window.parent.fechaExpansivel(\'div_dinamico_\'+(window.parent.DOM_divs.length-1)); |
304 | 318 | </script>'; | ... | ... |