Commit 7dc9ae53a92ffbc96b29853485aef7aafaf21c5f
1 parent
13cd345b
Exists in
master
Atualizada listagem de servidores para ter filtragem de acordo com o nível do us…
…uário atual. Corrigido bug na class {{{clsPmieducarServidor}}}
Showing
2 changed files
with
23 additions
and
4 deletions
Show diff stats
ieducar/intranet/educar_servidor_lst.php
| ... | ... | @@ -103,6 +103,10 @@ class indice extends clsListagem |
| 103 | 103 | 'Instituição' |
| 104 | 104 | )); |
| 105 | 105 | |
| 106 | + $get_escola = TRUE; | |
| 107 | + $obrigatorio = TRUE; | |
| 108 | + $exibe_nm_escola = TRUE; | |
| 109 | + | |
| 106 | 110 | include 'include/pmieducar/educar_campo_lista.php'; |
| 107 | 111 | |
| 108 | 112 | $opcoes = array('' => 'Pesquise o funcionario clicando na lupa ao lado'); |
| ... | ... | @@ -149,7 +153,17 @@ class indice extends clsListagem |
| 149 | 153 | NULL, |
| 150 | 154 | NULL, |
| 151 | 155 | NULL, |
| 152 | - TRUE | |
| 156 | + TRUE, | |
| 157 | + NULL, | |
| 158 | + NULL, | |
| 159 | + NULL, | |
| 160 | + NULL, | |
| 161 | + $this->ref_cod_escola, | |
| 162 | + NULL, | |
| 163 | + NULL, | |
| 164 | + NULL, | |
| 165 | + NULL, | |
| 166 | + 1 | |
| 153 | 167 | ); |
| 154 | 168 | |
| 155 | 169 | $total = $obj_servidor->_total; | ... | ... |
ieducar/intranet/include/pmieducar/clsPmieducarServidor.inc.php
| ... | ... | @@ -552,7 +552,9 @@ class clsPmieducarServidor |
| 552 | 552 | $whereAnd = " AND "; |
| 553 | 553 | } |
| 554 | 554 | else { |
| 555 | - if (is_numeric($alocacao_escola_instituicao)) { | |
| 555 | + if (is_numeric($alocacao_escola_instituicao) && | |
| 556 | + (is_numeric($int_ref_cod_instituicao) || is_numeric($int_ref_cod_escola)) | |
| 557 | + ) { | |
| 556 | 558 | $filtros .= " |
| 557 | 559 | {$whereAnd} s.cod_servidor IN |
| 558 | 560 | (SELECT a.ref_cod_servidor |
| ... | ... | @@ -560,11 +562,14 @@ class clsPmieducarServidor |
| 560 | 562 | WHERE "; |
| 561 | 563 | |
| 562 | 564 | if (is_numeric($int_ref_cod_instituicao)) { |
| 563 | - $filtros .= $whereAnd . " a.ref_ref_cod_instituicao = '{$int_ref_cod_instituicao}'"; | |
| 565 | + $filtros .= " a.ref_ref_cod_instituicao = '{$int_ref_cod_instituicao}'"; | |
| 564 | 566 | } |
| 565 | 567 | |
| 566 | 568 | if (is_numeric($int_ref_cod_escola)) { |
| 567 | - $filtros .= $whereAnd . " and ref_cod_escola = '{$int_ref_cod_escola}' "; | |
| 569 | + if (is_numeric($int_ref_cod_instituicao)) { | |
| 570 | + $filtros .= " " . $whereAnd; | |
| 571 | + } | |
| 572 | + $filtros .= " ref_cod_escola = '{$int_ref_cod_escola}' "; | |
| 568 | 573 | } |
| 569 | 574 | |
| 570 | 575 | $filtros .= ') '; | ... | ... |