Commit 5abcf67fe4ec62dceb70d9268ef9d0b14e874a74

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

Removido código desnecessário

Showing 1 changed file with 24 additions and 113 deletions   Show diff stats
ieducar/intranet/educar_relatorio_boletim.php
@@ -66,55 +66,7 @@ class clsIndexBase extends clsBase @@ -66,55 +66,7 @@ class clsIndexBase extends clsBase
66 class indice extends clsCadastro 66 class indice extends clsCadastro
67 { 67 {
68 var $pessoa_logada; 68 var $pessoa_logada;
69 -  
70 - var $ref_cod_instituicao;  
71 - var $ref_cod_escola;  
72 - var $ref_cod_serie;  
73 - var $ref_cod_turma;  
74 -  
75 var $ano; 69 var $ano;
76 - var $mes;  
77 -  
78 - var $nm_escola;  
79 - var $nm_instituicao;  
80 - var $ref_cod_curso;  
81 - var $sequencial;  
82 - var $pdf;  
83 - var $pagina_atual = 1;  
84 - var $total_paginas = 1;  
85 - var $nm_professor;  
86 - var $nm_turma;  
87 - var $nm_serie;  
88 - var $nm_disciplina;  
89 - var $curso_com_exame = 0;  
90 - var $ref_cod_matricula;  
91 -  
92 - var $page_y = 135;  
93 -  
94 - var $nm_aluno;  
95 - var $array_modulos = array();  
96 - var $nm_curso;  
97 - var $get_link = FALSE;  
98 -  
99 - var $total;  
100 -  
101 - var $ref_cod_modulo;  
102 -  
103 - var $meses_do_ano = array(  
104 - 1 => 'JANEIRO',  
105 - 2 => 'FEVEREIRO',  
106 - 3 => 'MARÇO',  
107 - 4 => 'ABRIL',  
108 - 5 => 'MAIO',  
109 - 6 => 'JUNHO',  
110 - 7 => 'JULHO',  
111 - 8 => 'AGOSTO',  
112 - 9 => 'SETEMBRO',  
113 - 10 => 'OUTUBRO',  
114 - 11 => 'NOVEMBRO',  
115 - 12 => 'DEZEMBRO'  
116 - );  
117 -  
118 70
119 function Inicializar() 71 function Inicializar()
120 { 72 {
@@ -134,14 +86,7 @@ class indice extends clsCadastro @@ -134,14 +86,7 @@ class indice extends clsCadastro
134 $obj_permissoes = new clsPermissoes(); 86 $obj_permissoes = new clsPermissoes();
135 $nivel_usuario = $obj_permissoes->nivel_acesso($this->pessoa_logada); 87 $nivel_usuario = $obj_permissoes->nivel_acesso($this->pessoa_logada);
136 88
137 - if ($_POST){  
138 - foreach ($_POST as $key => $value) {  
139 - $this->$key = $value;  
140 - }  
141 - }  
142 -  
143 $this->ano = $ano_atual = date('Y'); 89 $this->ano = $ano_atual = date('Y');
144 - $this->mes = $mes_atual = date('n');  
145 90
146 $this->campoNumero('ano', 'Ano', $this->ano, 4, 4, TRUE); 91 $this->campoNumero('ano', 'Ano', $this->ano, 4, 4, TRUE);
147 92
@@ -161,17 +106,9 @@ class indice extends clsCadastro @@ -161,17 +106,9 @@ class indice extends clsCadastro
161 $this->campoLista('ref_cod_turma', 'Turma', array('' => 'Selecione'), '', '', 106 $this->campoLista('ref_cod_turma', 'Turma', array('' => 'Selecione'), '', '',
162 FALSE, '', '', FALSE, FALSE); 107 FALSE, '', '', FALSE, FALSE);
163 108
164 - if ($this->ref_cod_escola) {  
165 - $this->ref_ref_cod_escola = $this->ref_cod_escola;  
166 - }  
167 -  
168 $this->campoLista('ref_cod_matricula', 'Aluno', array('' => 'Selecione'), '', 109 $this->campoLista('ref_cod_matricula', 'Aluno', array('' => 'Selecione'), '',
169 '', FALSE, 'Campo não obrigatório', '', FALSE, FALSE); 110 '', FALSE, 'Campo não obrigatório', '', FALSE, FALSE);
170 111
171 - if ($this->get_link) {  
172 - $this->campoRotulo('rotulo11', '-', sprintf('<a href="%s" target="_blank">Baixar Relatório</a>', $this->get_link));  
173 - }  
174 -  
175 $this->url_cancelar = 'educar_index.php'; 112 $this->url_cancelar = 'educar_index.php';
176 $this->nome_url_cancelar = 'Cancelar'; 113 $this->nome_url_cancelar = 'Cancelar';
177 114
@@ -348,66 +285,40 @@ else if (window.attachEvent) { @@ -348,66 +285,40 @@ else if (window.attachEvent) {
348 285
349 function acao2() 286 function acao2()
350 { 287 {
351 - var em_branco = document.getElementById('em_branco');  
352 -  
353 - if(em_branco.checked) { 288 + if (!acao()) {
  289 + return;
354 } 290 }
355 else { 291 else {
356 - if (!acao()) {  
357 - return; 292 + if (!(/[^ ]/.test(document.getElementById('ref_cod_instituicao').value))) {
  293 + mudaClassName('formdestaque', 'obrigatorio');
  294 + document.getElementById('ref_cod_instituicao').className = 'formdestaque';
  295 + alert('Preencha o campo "Instituição" corretamente!');
  296 + document.getElementById('ref_cod_instituicao').focus();
  297 + return false;
358 } 298 }
359 - else {  
360 - if (!(/[^ ]/.test(document.getElementById('ref_cod_instituicao').value))) {  
361 - mudaClassName('formdestaque', 'obrigatorio');  
362 - document.getElementById('ref_cod_instituicao').className = 'formdestaque';  
363 - alert('Preencha o campo \'Instituição\' corretamente!');  
364 - document.getElementById('ref_cod_instituicao').focus();  
365 - return false;  
366 - }  
367 -  
368 - if (!(/[^ ]/.test(document.getElementById('ref_cod_curso').value))) {  
369 - mudaClassName('formdestaque', 'obrigatorio');  
370 - document.getElementById("ref_cod_curso").className = 'formdestaque';  
371 - alert('Preencha o campo \'Curso\' corretamente!');  
372 - document.getElementById('ref_cod_curso').focus();  
373 - return false;  
374 - }  
375 -  
376 - if (!(/[^ ]/.test( document.getElementById('ref_cod_turma').value))) {  
377 - mudaClassName('formdestaque', 'obrigatorio');  
378 - document.getElementById('ref_cod_turma').className = 'formdestaque';  
379 - alert('Preencha o campo \'Turma\' corretamente!');  
380 - document.getElementById('ref_cod_turma').focus();  
381 - return false;  
382 - } 299 +
  300 + if (!(/[^ ]/.test(document.getElementById('ref_cod_curso').value))) {
  301 + mudaClassName('formdestaque', 'obrigatorio');
  302 + document.getElementById("ref_cod_curso").className = 'formdestaque';
  303 + alert('Preencha o campo "Curso" corretamente!');
  304 + document.getElementById('ref_cod_curso').focus();
  305 + return false;
  306 + }
  307 +
  308 + if (!(/[^ ]/.test( document.getElementById('ref_cod_turma').value))) {
  309 + mudaClassName('formdestaque', 'obrigatorio');
  310 + document.getElementById('ref_cod_turma').className = 'formdestaque';
  311 + alert('Preencha o campo "Turma" corretamente!');
  312 + document.getElementById('ref_cod_turma').focus();
  313 + return false;
383 } 314 }
384 } 315 }
385 316
386 - showExpansivelImprimir(400, 200,'',[], "Boletim"); 317 + showExpansivelImprimir(400, 200,'',[], 'Boletim');
387 document.formcadastro.target = 'miolo_'+(DOM_divs.length-1); 318 document.formcadastro.target = 'miolo_'+(DOM_divs.length-1);
388 document.getElementById('btn_enviar').disabled = false; 319 document.getElementById('btn_enviar').disabled = false;
389 document.formcadastro.submit(); 320 document.formcadastro.submit();
390 } 321 }
391 322
392 document.formcadastro.action = 'educar_relatorio_boletim_proc.php'; 323 document.formcadastro.action = 'educar_relatorio_boletim_proc.php';
393 -  
394 -document.getElementById('em_branco').onclick = function()  
395 -{  
396 - if(this.checked) {  
397 - $('ref_cod_instituicao').disabled = true;  
398 - $('ref_cod_escola').disabled = true;  
399 - $('ref_cod_curso').disabled = true;  
400 - $('ref_ref_cod_serie').disabled = true;  
401 - $('ref_cod_turma').disabled = true;  
402 - $('ref_cod_matricula').disabled = true;  
403 - }  
404 - else {  
405 - $('ref_cod_instituicao').disabled = false;  
406 - $('ref_cod_escola').disabled = false;  
407 - $('ref_cod_curso').disabled = false;  
408 - $('ref_ref_cod_serie').disabled = false;  
409 - $('ref_cod_turma').disabled = false;  
410 - $('ref_cod_matricula').disabled = false;  
411 - }  
412 -}  
413 </script> 324 </script>
414 \ No newline at end of file 325 \ No newline at end of file