Commit 79a7e41424419251aab22e8e18c95e2b0d88f8de

Authored by Eder Soares
Committed by GitHub
2 parents 2b002837 e6d5ae32
Exists in 2.9 and in 2 other branches 2.7, 2.8

Merge pull request #8947 from portabilis/community-patch-2022-06-27

Community patch 27/06/2022
Showing 210 changed files with 263 additions and 13063 deletions   Show diff stats

Too many changes.

To preserve performance only 100 of 210 files displayed.

app/Http/Controllers/Api/PostalCodeController.php
... ... @@ -28,6 +28,8 @@ class PostalCodeController extends Controller
28 28 */
29 29 public function search(Client $http, $postalCode)
30 30 {
  31 + $postalCode = intval($postalCode);
  32 +
31 33 try {
32 34 $response = $http->get("https://viacep.com.br/ws/{$postalCode}/json/");
33 35 } catch (Throwable $throwable) {
... ...
app/Providers/AuthServiceProvider.php
... ... @@ -44,6 +44,8 @@ class AuthServiceProvider extends ServiceProvider
44 44 if ($user->isAdmin()) {
45 45 return true;
46 46 }
  47 +
  48 + return null;
47 49 });
48 50  
49 51 Gate::define('view', ProcessPolicy::class . '@view');
... ...
composer.json
... ... @@ -3,7 +3,7 @@
3 3 "description": "Software livre de gestão escolar",
4 4 "type": "project",
5 5 "license": "GPL-2.0-or-later",
6   - "version": "2.7.1",
  6 + "version": "2.7.2",
7 7 "keywords": [
8 8 "Portabilis",
9 9 "i-Educar"
... ...
composer.lock
... ... @@ -4,7 +4,7 @@
4 4 "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5 5 "This file is @generated automatically"
6 6 ],
7   - "content-hash": "717864a28eb817b89c683132f238ac1e",
  7 + "content-hash": "ccdb4af67f4aad26ed07661df9af756f",
8 8 "packages": [
9 9 {
10 10 "name": "asm89/stack-cors",
... ... @@ -114,16 +114,16 @@
114 114 },
115 115 {
116 116 "name": "aws/aws-sdk-php",
117   - "version": "3.229.2",
  117 + "version": "3.231.2",
118 118 "source": {
119 119 "type": "git",
120 120 "url": "https://github.com/aws/aws-sdk-php.git",
121   - "reference": "142a872fd7172bf5d067f4e30e4f89593296fc8f"
  121 + "reference": "9a7c2a8c4b7f95074749e1a7b575e6b4486bdcab"
122 122 },
123 123 "dist": {
124 124 "type": "zip",
125   - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/142a872fd7172bf5d067f4e30e4f89593296fc8f",
126   - "reference": "142a872fd7172bf5d067f4e30e4f89593296fc8f",
  125 + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/9a7c2a8c4b7f95074749e1a7b575e6b4486bdcab",
  126 + "reference": "9a7c2a8c4b7f95074749e1a7b575e6b4486bdcab",
127 127 "shasum": ""
128 128 },
129 129 "require": {
... ... @@ -141,6 +141,7 @@
141 141 "andrewsville/php-token-reflection": "^1.4",
142 142 "aws/aws-php-sns-message-validator": "~1.0",
143 143 "behat/behat": "~3.0",
  144 + "composer/composer": "^1.10.22",
144 145 "doctrine/cache": "~1.4",
145 146 "ext-dom": "*",
146 147 "ext-openssl": "*",
... ... @@ -199,9 +200,9 @@
199 200 "support": {
200 201 "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
201 202 "issues": "https://github.com/aws/aws-sdk-php/issues",
202   - "source": "https://github.com/aws/aws-sdk-php/tree/3.229.2"
  203 + "source": "https://github.com/aws/aws-sdk-php/tree/3.231.2"
203 204 },
204   - "time": "2022-07-01T18:16:42+00:00"
  205 + "time": "2022-07-08T18:16:11+00:00"
205 206 },
206 207 {
207 208 "name": "aws/aws-sdk-php-laravel",
... ... @@ -4206,16 +4207,16 @@
4206 4207 },
4207 4208 {
4208 4209 "name": "nuwave/lighthouse",
4209   - "version": "v5.55.1",
  4210 + "version": "v5.57.0",
4210 4211 "source": {
4211 4212 "type": "git",
4212 4213 "url": "https://github.com/nuwave/lighthouse.git",
4213   - "reference": "4676619e2ddc1b516715885bb32142bd0658b6bd"
  4214 + "reference": "77fb645de4d58622a515b5ff7575c3df96e768f1"
4214 4215 },
4215 4216 "dist": {
4216 4217 "type": "zip",
4217   - "url": "https://api.github.com/repos/nuwave/lighthouse/zipball/4676619e2ddc1b516715885bb32142bd0658b6bd",
4218   - "reference": "4676619e2ddc1b516715885bb32142bd0658b6bd",
  4218 + "url": "https://api.github.com/repos/nuwave/lighthouse/zipball/77fb645de4d58622a515b5ff7575c3df96e768f1",
  4219 + "reference": "77fb645de4d58622a515b5ff7575c3df96e768f1",
4219 4220 "shasum": ""
4220 4221 },
4221 4222 "require": {
... ... @@ -4333,7 +4334,7 @@
4333 4334 "type": "tidelift"
4334 4335 }
4335 4336 ],
4336   - "time": "2022-06-22T13:21:15+00:00"
  4337 + "time": "2022-07-08T08:50:28+00:00"
4337 4338 },
4338 4339 {
4339 4340 "name": "paragonie/constant_time_encoding",
... ... @@ -4454,16 +4455,16 @@
4454 4455 },
4455 4456 {
4456 4457 "name": "phpoffice/phpspreadsheet",
4457   - "version": "1.23.0",
  4458 + "version": "1.24.0",
4458 4459 "source": {
4459 4460 "type": "git",
4460 4461 "url": "https://github.com/PHPOffice/PhpSpreadsheet.git",
4461   - "reference": "21e4cf62699eebf007db28775f7d1554e612ed9e"
  4462 + "reference": "ebe8745c92a7cac4514d040758393b5399633b83"
4462 4463 },
4463 4464 "dist": {
4464 4465 "type": "zip",
4465   - "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/21e4cf62699eebf007db28775f7d1554e612ed9e",
4466   - "reference": "21e4cf62699eebf007db28775f7d1554e612ed9e",
  4466 + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/ebe8745c92a7cac4514d040758393b5399633b83",
  4467 + "reference": "ebe8745c92a7cac4514d040758393b5399633b83",
4467 4468 "shasum": ""
4468 4469 },
4469 4470 "require": {
... ... @@ -4491,15 +4492,15 @@
4491 4492 },
4492 4493 "require-dev": {
4493 4494 "dealerdirect/phpcodesniffer-composer-installer": "dev-master",
4494   - "dompdf/dompdf": "^1.0",
  4495 + "dompdf/dompdf": "^1.0 || ^2.0",
4495 4496 "friendsofphp/php-cs-fixer": "^3.2",
4496 4497 "jpgraph/jpgraph": "^4.0",
4497   - "mpdf/mpdf": "8.0.17",
  4498 + "mpdf/mpdf": "8.1.1",
4498 4499 "phpcompatibility/php-compatibility": "^9.3",
4499 4500 "phpstan/phpstan": "^1.1",
4500 4501 "phpstan/phpstan-phpunit": "^1.0",
4501 4502 "phpunit/phpunit": "^8.5 || ^9.0",
4502   - "squizlabs/php_codesniffer": "^3.6",
  4503 + "squizlabs/php_codesniffer": "^3.7",
4503 4504 "tecnickcom/tcpdf": "^6.4"
4504 4505 },
4505 4506 "suggest": {
... ... @@ -4552,9 +4553,9 @@
4552 4553 ],
4553 4554 "support": {
4554 4555 "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues",
4555   - "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.23.0"
  4556 + "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.24.0"
4556 4557 },
4557   - "time": "2022-04-24T13:53:10+00:00"
  4558 + "time": "2022-07-09T13:49:09+00:00"
4558 4559 },
4559 4560 {
4560 4561 "name": "phpoption/phpoption",
... ... @@ -5168,16 +5169,16 @@
5168 5169 },
5169 5170 {
5170 5171 "name": "psy/psysh",
5171   - "version": "v0.11.5",
  5172 + "version": "v0.11.7",
5172 5173 "source": {
5173 5174 "type": "git",
5174 5175 "url": "https://github.com/bobthecow/psysh.git",
5175   - "reference": "c23686f9c48ca202710dbb967df8385a952a2daf"
  5176 + "reference": "77fc7270031fbc28f9a7bea31385da5c4855cb7a"
5176 5177 },
5177 5178 "dist": {
5178 5179 "type": "zip",
5179   - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/c23686f9c48ca202710dbb967df8385a952a2daf",
5180   - "reference": "c23686f9c48ca202710dbb967df8385a952a2daf",
  5180 + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/77fc7270031fbc28f9a7bea31385da5c4855cb7a",
  5181 + "reference": "77fc7270031fbc28f9a7bea31385da5c4855cb7a",
5181 5182 "shasum": ""
5182 5183 },
5183 5184 "require": {
... ... @@ -5238,9 +5239,9 @@
5238 5239 ],
5239 5240 "support": {
5240 5241 "issues": "https://github.com/bobthecow/psysh/issues",
5241   - "source": "https://github.com/bobthecow/psysh/tree/v0.11.5"
  5242 + "source": "https://github.com/bobthecow/psysh/tree/v0.11.7"
5242 5243 },
5243   - "time": "2022-05-27T18:03:49+00:00"
  5244 + "time": "2022-07-07T13:49:11+00:00"
5244 5245 },
5245 5246 {
5246 5247 "name": "ralouphie/getallheaders",
... ...
database/migrations/2021_01_01_000000_populate_settings_table.php
... ... @@ -22,11 +22,11 @@ class PopulateSettingsTable extends Migration
22 22 'legacy.apis.educacao_token_key' => null,
23 23 'legacy.app.name' => 'i-Educar',
24 24 'legacy.app.diario.nomenclatura_exame' => '0',
25   - 'legacy.app.database.hostname' => '********',
26   - 'legacy.app.database.port' => '********',
27   - 'legacy.app.database.dbname' => '********',
28   - 'legacy.app.database.username' => '********',
29   - 'legacy.app.database.password' => '********',
  25 + 'legacy.app.database.hostname' => 'localhost',
  26 + 'legacy.app.database.port' => '5432',
  27 + 'legacy.app.database.dbname' => 'ieducar',
  28 + 'legacy.app.database.username' => 'ieducar',
  29 + 'legacy.app.database.password' => 'ieducar',
30 30 'legacy.app.administrative_pending.exist' => null,
31 31 'legacy.app.administrative_pending.msg' => '<p>Identificamos pendências administrativas da sua instituição para utilização do sistema. Sendo assim, pedimos que o responsável pelo sistema entre em contato com o Administrador do sistema o mais breve.</p><br/><b>Telefone:</b> (xx) xxxx-xxxx <br/> <b>E-mail:</b> contato@domain.com.br',
32 32 'legacy.app.aws.bucketname' => null,
... ...
ieducar/intranet/atendidos_cad.php
... ... @@ -1089,8 +1089,6 @@ return new class extends clsCadastro {
1089 1089  
1090 1090 return false;
1091 1091 }
1092   -
1093   - return false;
1094 1092 } else {
1095 1093 $this->objPhoto = null;
1096 1094  
... ...
ieducar/intranet/conexoes_lst.php
... ... @@ -1,69 +0,0 @@
1   -<?php
2   -
3   -return new class extends clsListagem {
4   - public function Gerar()
5   - {
6   - $this->titulo = 'Conexões';
7   -
8   - $this->addCabecalhos([ 'Data Hora', 'Local do Acesso']);
9   -
10   - // Paginador
11   - $limite = 20;
12   - $iniciolimit = ($_GET["pagina_{$this->nome}"]) ? $_GET["pagina_{$this->nome}"]*$limite-$limite: 0;
13   -
14   - $id_pessoa = \Illuminate\Support\Facades\Auth::id();
15   -
16   - $sql = "SELECT b.data_hora, b.ip_externo FROM acesso b WHERE cod_pessoa={$id_pessoa}";
17   - if (!empty($_GET['status'])) {
18   - if ($_GET['status'] == 'P') {
19   - $where .= ' AND ip_externo = \'200.215.80.163\'';
20   - } elseif ($_GET['status'] == 'X') {
21   - $where .= ' AND ip_externo <> \'200.215.80.163\'';
22   - }
23   - }
24   - if (!empty($_GET['data_inicial'])) {
25   - $data = explode('/', $_GET['data_inicial']);
26   - $where .= " AND data_hora >= '{$data[2]}-{$data[1]}-{$data[0]}'";
27   - }
28   -
29   - if (!empty($_GET['data_final'])) {
30   - $data = explode('/', $_GET['data_final']);
31   - $where .= " AND data_hora <= '{$data[2]}-{$data[1]}-{$data[0]}'";
32   - }
33   -
34   - $db = new clsBanco();
35   - $total = $db->UnicoCampo("SELECT count(*) FROM acesso WHERE cod_pessoa={$id_pessoa} $where");
36   -
37   - $sql .= " $where ORDER BY b.data_hora DESC LIMIT $iniciolimit, $limite";
38   -
39   - $db->Consulta($sql);
40   - while ($db->ProximoRegistro()) {
41   - list($data_hora, $ip_externo) = $db->Tupla();
42   -
43   - $local = $ip_externo == '200.215.80.163' ? 'Prefeitura' : 'Externo';
44   -
45   - $this->addLinhas(["<img src='imagens/noticia.jpg' border=0>$data_hora", $local ]);
46   - }
47   -
48   - $opcoes[''] = 'Escolha uma opção...';
49   - $opcoes['P'] = 'Prefeitura';
50   - $opcoes['X'] = 'Externo';
51   -
52   - $this->campoLista('status', 'Status', $opcoes, $_GET['status']);
53   -
54   - $this->campoData('data_inicial', 'Data Inicial', $_GET['data_inicial']);
55   - $this->campoData('data_final', 'Data Final', $_GET['data_final']);
56   -
57   - $this->addPaginador2('conexoes_lst.php', $total, $_GET, $this->nome, $limite);
58   -
59   - $this->largura = '100%';
60   -
61   - $this->breadcrumb('Listagem de conexões realizadas');
62   - }
63   -
64   - public function Formular()
65   - {
66   - $this->title = 'Conexões!';
67   - $this->processoAp = '157';
68   - }
69   -};
ieducar/intranet/conexoes_todos_lst.php
... ... @@ -1,79 +0,0 @@
1   -<?php
2   -
3   -return new class extends clsListagem {
4   - public function Gerar()
5   - {
6   - $this->titulo = 'Conexões';
7   -
8   - $this->addCabecalhos([ 'Data Hora', 'Local do Acesso', 'Ip Interno', 'Pessoa']);
9   -
10   - // Paginador
11   - $limite = 30;
12   - $iniciolimit = ($_GET["pagina_{$this->nome}"]) ? $_GET["pagina_{$this->nome}"]*$limite-$limite: 0;
13   -
14   - $sql = 'SELECT b.data_hora, b.ip_externo, b.ip_interno, n.nome FROM acesso b, cadastro.pessoa n WHERE b.cod_pessoa=n.idpes ';
15   -
16   - if (!empty($_GET['status'])) {
17   - if ($_GET['status'] == 'P') {
18   - $where .= ' AND ip_externo = \'200.215.80.163\'';
19   - } elseif ($_GET['status'] == 'X') {
20   - $where .= ' AND ip_externo <> \'200.215.80.163\'';
21   - }
22   - }
23   - if (!empty($_GET['data_inicial'])) {
24   - $data = explode('/', $_GET['data_inicial']);
25   - $where .= " AND data_hora >= '{$data[2]}-{$data[1]}-{$data[0]}'";
26   - }
27   -
28   - if (!empty($_GET['data_final'])) {
29   - $data = explode('/', $_GET['data_final']);
30   - $where .= " AND data_hora <= '{$data[2]}-{$data[1]}-{$data[0]}'";
31   - }
32   -
33   - if (!empty($_GET['ip_pesquisa'])) {
34   - $where .= " AND ( (ip_interno like ('{$_GET['ip_pesquisa']}')) OR (ip_externo like ('{$_GET['ip_pesquisa']}')) )";
35   - }
36   -
37   - if (!empty($_GET['pessoa_nome'])) {
38   - $nome_pessoa = str_replace(' ', '%', $_GET['pessoa_nome']);
39   - $where .= " AND n.nome LIKE ('%{$nome_pessoa}%')";
40   - }
41   -
42   - $db = new clsBanco();
43   - $total = $db->UnicoCampo("SELECT count(*) FROM acesso b, cadastro.pessoa n WHERE b.cod_pessoa=n.idpes $where");
44   -
45   - $sql .= " $where ORDER BY b.data_hora DESC LIMIT $iniciolimit, 30";
46   - // die($sql);
47   - $db->Consulta($sql);
48   - while ($db->ProximoRegistro()) {
49   - list($data_hora, $ip_externo, $ip_interno, $nm_pessoa) = $db->Tupla();
50   -
51   - $local = $ip_externo == '200.215.80.163' ? 'Prefeitura' : 'Externo - '.$ip_externo;
52   - $ip_interno = $ip_interno=='NULL' ? '&nbsp' : $ip_interno;
53   -
54   - $this->addLinhas(["<img src='imagens/noticia.jpg' border=0>$data_hora", $local, $ip_interno, $nm_pessoa ]);
55   - }
56   -
57   - $opcoes[''] = 'Escolha uma opção...';
58   - $opcoes['P'] = 'Prefeitura';
59   - $opcoes['X'] = 'Externo';
60   -
61   - $this->campoLista('status', 'Status', $opcoes, $_GET['status']);
62   -
63   - $this->campoData('data_inicial', 'Data Inicial', $_GET['data_inicial']);
64   - $this->campoData('data_final', 'Data Final', $_GET['data_final']);
65   -
66   - $this->campoTexto('ip_pesquisa', 'IP', $_GET['ip_pesquisa'], 30, 30);
67   - $this->campoTexto('pessoa_nome', 'Funcionário', $_GET['pessoa_nome'], 30, 150);
68   -
69   - $this->addPaginador2('conexoes_todos_lst.php', $total, $_GET, $this->nome, $limite);
70   -
71   - $this->largura = '100%';
72   - }
73   -
74   - public function Formular()
75   - {
76   - $this->title = 'Conexões!';
77   - $this->processoAp = '158';
78   - }
79   -};
ieducar/intranet/educar_acervo_det.php
... ... @@ -181,6 +181,7 @@ return new class extends clsDetalhe {
181 181 $obj = new clsPmieducarAcervoAssunto();
182 182 $obj = $obj->listaAssuntosPorObra($this->cod_acervo);
183 183 if (is_array($obj) && count($obj)) {
  184 + $assuntos = '';
184 185 foreach ($obj as $reg) {
185 186 $assuntos.= '<span style="background-color: #ccdce6; padding: 4px 20px;"><b>'.$reg['nome'].'</b></span>&nbsp; ';
186 187 }
... ... @@ -192,6 +193,7 @@ return new class extends clsDetalhe {
192 193 $obj_categoria = new clsPmieducarCategoriaAcervo();
193 194 $obj_categoria = $obj_categoria->listaCategoriasPorObra($this->cod_acervo);
194 195 if (is_array($obj_categoria) && count($obj_categoria)) {
  196 + $categorias = '';
195 197 foreach ($obj_categoria as $obj_cat) {
196 198 $categorias.= '<span style="background-color: #ccdce6; padding: 4px 20px;"><b>'.$obj_cat['descricao'].'</b></span>&nbsp; ';
197 199 }
... ...
ieducar/intranet/educar_acervo_lst.php
... ... @@ -99,7 +99,7 @@ return new class extends clsListagem {
99 99 $obj_colecao->setOrderby('nm_colecao ASC');
100 100 $obj_colecao->setCamposLista('cod_acervo_colecao, nm_colecao');
101 101 $lst_colecao = $obj_colecao->lista(null, null, null, null, null, null, null, null, null, 1, $this->ref_cod_biblioteca);
102   - if (is_array($opcoes)) {
  102 + if (is_array($opcoes_colecao)) {
103 103 foreach ($lst_colecao as $colecao) {
104 104 $opcoes_colecao[$colecao['cod_acervo_colecao']] = $colecao['nm_colecao'];
105 105 }
... ... @@ -212,11 +212,6 @@ return new class extends clsListagem {
212 212 "<a href=\"educar_acervo_det.php?cod_acervo={$registro['cod_acervo']}\">{$registro['isbn']}</a>"
213 213 ];
214 214  
215   - if ($qtd_bibliotecas > 1 && ($nivel_usuario == 4 || $nivel_usuario == 8)) {
216   - $lista_busca[] = "<a href=\"educar_acervo_det.php?cod_acervo={$registro['cod_acervo']}\">{$registro['ref_cod_biblioteca']}</a>";
217   - } elseif ($nivel_usuario == 1 || $nivel_usuario == 2 || $nivel_usuario == 4) {
218   - $lista_busca[] = "<a href=\"educar_acervo_det.php?cod_acervo={$registro['cod_acervo']}\">{$registro['ref_cod_biblioteca']}</a>";
219   - }
220 215 $this->addLinhas($lista_busca);
221 216 }
222 217 }
... ...
ieducar/intranet/educar_avancar_mod_cad.php
... ... @@ -311,8 +311,6 @@ return new class extends clsCadastro {
311 311 } else {
312 312 throw new Exception('Não foi possível obter a próxima série da sequência de enturmação');
313 313 }
314   -
315   - return false;
316 314 }
317 315  
318 316 protected function rematricularAlunoReprovado($escolaId, $cursoId, $serieId, $ano, $alunoId)
... ...
ieducar/intranet/educar_dispensa_disciplina_cad.php
... ... @@ -326,6 +326,7 @@ return new class extends clsCadastro {
326 326 $objModulo = new clsPmieducarModulo();
327 327 $dadosModulo = $objModulo->lista($dadosEtapa[0]['ref_cod_modulo']);
328 328 $nomeModulo = $dadosModulo[0]['nm_tipo'];
  329 + $conteudoHtml = '';
329 330  
330 331 foreach ($dadosEtapa as $modulo) {
331 332 $checked = '';
... ...
ieducar/intranet/educar_escola_serie_cad.php
... ... @@ -490,7 +490,7 @@ return new class extends clsCadastro {
490 490  
491 491 $this->mensagem = $msgs;
492 492  
493   - return $this->simpleRedirect(\Request::getRequestUri());
  493 + $this->simpleRedirect(\Request::getRequestUri());
494 494 }
495 495  
496 496 $editou = $obj->edita();
... ...
ieducar/intranet/educar_falta_atraso_det.php
... ... @@ -53,6 +53,7 @@ return new class extends clsDetalhe {
53 53  
54 54 $cont = 0;
55 55 $total = 0;
  56 + $corpo = '';
56 57  
57 58 foreach ($registro as $falta) {
58 59 if (($cont % 2) == 0) {
... ...
ieducar/intranet/educar_matricula_reclassificar_cad.php
... ... @@ -129,13 +129,11 @@ return new class extends clsCadastro {
129 129 $this->mensagem = 'Data de abandono não pode ser inferior a data da matrícula.<br>';
130 130  
131 131 return false;
132   - die();
133 132 }
134 133 } elseif (substr($det_matricula['data_matricula'], 0, 10) > $this->data_cancel) {
135 134 $this->mensagem = 'Data de abandono não pode ser inferior a data da matrícula.<br>';
136 135  
137 136 return false;
138   - die();
139 137 }
140 138  
141 139 if (!$det_matricula || $det_matricula['aprovado'] != 3) {
... ...
ieducar/intranet/educar_matricula_turma_turno_cad.php
... ... @@ -127,7 +127,7 @@ return new class extends clsCadastro {
127 127  
128 128 session()->flash('success', $is_change ? 'Turno alterado com sucesso!' : 'Não houve alteração no valor do campo Turno.');
129 129  
130   - return $this->simpleRedirect(url('intranet/educar_matricula_det.php?cod_matricula='.$this->cod_matricula));
  130 + $this->simpleRedirect(url('intranet/educar_matricula_det.php?cod_matricula='.$this->cod_matricula));
131 131 }
132 132  
133 133 public function makeExtra()
... ...
ieducar/intranet/educar_pagamento_multa_det.php
... ... @@ -46,6 +46,7 @@ return new class extends clsDetalhe {
46 46 </TR>';
47 47 $cont = 0;
48 48 $total = 0;
  49 + $corpo = '';
49 50 foreach ($lst_divida as $divida) {
50 51 $total += $divida['valor_multa'];
51 52 if (($cont % 2) == 0) {
... ...
ieducar/intranet/educar_pesquisa_servidor_lst.php
... ... @@ -227,20 +227,20 @@ return new class extends clsListagem {
227 227 if (Session::get('tipo')) {
228 228 if (is_string($campo1) && is_string($campo2)) {
229 229 if (is_string(Session::get('horario'))) {
230   - $script = " onclick=\"addVal1('{$campo1}','{$registro['nome']}','{$registro['cod_servidor']}'); addVal1('{$campo2}','{$registro['cod_servidor']}','{$registro['nome']}'); $setAll fecha();\"";
  230 + $script = " onclick=\"addVal1('{$campo1}','{$registro['nome']}','{$registro['cod_servidor']}'); addVal1('{$campo2}','{$registro['cod_servidor']}','{$registro['nome']}'); fecha();\"";
231 231 } else {
232   - $script = " onclick=\"addVal1('{$campo1}','{$registro['cod_servidor']}', '{$registro['nome']}'); addVal1('{$campo2}','{$registro['nome']}', '{$registro['cod_servidor']}'); $setAll fecha();\"";
  232 + $script = " onclick=\"addVal1('{$campo1}','{$registro['cod_servidor']}', '{$registro['nome']}'); addVal1('{$campo2}','{$registro['nome']}', '{$registro['cod_servidor']}'); fecha();\"";
233 233 }
234 234 } elseif (is_string($campo1)) {
235   - $script = " onclick=\"addVal1('{$campo1}','{$registro['cod_servidor']}','{$registro['nome']}'); $setAll fecha();\"";
  235 + $script = " onclick=\"addVal1('{$campo1}','{$registro['cod_servidor']}','{$registro['nome']}'); fecha();\"";
236 236 }
237 237 } else {
238 238 if (is_string($campo1) && is_string($campo2)) {
239   - $script = " onclick=\"addVal1('{$campo1}','{$registro['cod_servidor']}','{$registro['nome']}'); addVal1('{$campo2}','{$registro['cod_servidor']}','{$registro['nome']}'); $setAll fecha();\"";
  239 + $script = " onclick=\"addVal1('{$campo1}','{$registro['cod_servidor']}','{$registro['nome']}'); addVal1('{$campo2}','{$registro['cod_servidor']}','{$registro['nome']}'); fecha();\"";
240 240 } elseif (is_string($campo2)) {
241   - $script = " onclick=\"addVal1('{$campo2}','{$registro['cod_servidor']}','{$registro['nome']}'); $setAll fecha();\"";
  241 + $script = " onclick=\"addVal1('{$campo2}','{$registro['cod_servidor']}','{$registro['nome']}'); fecha();\"";
242 242 } elseif (is_string($campo1)) {
243   - $script = " onclick=\"addVal1('{$campo1}','{$registro['cod_servidor']}','{$registro['nome']}'); $setAll fecha();\"";
  243 + $script = " onclick=\"addVal1('{$campo1}','{$registro['cod_servidor']}','{$registro['nome']}'); fecha();\"";
244 244 }
245 245 }
246 246 $this->addLinhas([
... ...
ieducar/intranet/educar_quadro_horario_cad.php
... ... @@ -55,9 +55,7 @@ return new class extends clsCadastro {
55 55 "educar_quadro_horario_lst.php?ref_cod_turma={$this->ref_cod_turma}&ref_cod_serie={$this->ref_cod_serie}&ref_cod_curso={$this->ref_cod_curso}&ref_cod_escola={$this->ref_cod_escola}&ref_cod_instituicao={$this->ref_cod_instituicao}&ano={$this->ano}"
56 56 );
57 57  
58   - $this->url_cancelar = $retorno == 'Editar' ?
59   - "educar_quadro_horario_lst.php?ref_cod_turma={$this->ref_cod_turma}&ref_cod_serie={$this->ref_cod_serie}&ref_cod_curso={$this->ref_cod_curso}&ref_cod_escola={$this->ref_cod_escola}&ref_cod_instituicao={$this->ref_cod_instituicao}&ano={$this->ano}" :
60   - "educar_quadro_horario_lst.php?ref_cod_turma={$this->ref_cod_turma}&ref_cod_serie={$this->ref_cod_serie}&ref_cod_curso={$this->ref_cod_curso}&ref_cod_escola={$this->ref_cod_escola}&ref_cod_instituicao={$this->ref_cod_instituicao}&ano={$this->ano}";
  58 + $this->url_cancelar = "educar_quadro_horario_lst.php?ref_cod_turma={$this->ref_cod_turma}&ref_cod_serie={$this->ref_cod_serie}&ref_cod_curso={$this->ref_cod_curso}&ref_cod_escola={$this->ref_cod_escola}&ref_cod_instituicao={$this->ref_cod_instituicao}&ano={$this->ano}";
61 59  
62 60 $this->nome_url_cancelar = 'Cancelar';
63 61  
... ...
ieducar/intranet/educar_servidor_afastamento_cad.php
... ... @@ -248,7 +248,7 @@ return new class extends clsCadastro {
248 248 }
249 249  
250 250 if ($this->alocacao_array) {
251   - $tamanho = sizeof($alocacao);
  251 + $tamanho = count($this->alocacao_array);
252 252 $script = "<script>\nvar num_alocacao = {$tamanho};\n";
253 253 $script .= "var array_servidores = Array();\n";
254 254  
... ...
ieducar/intranet/educar_servidor_cad.php
... ... @@ -72,7 +72,7 @@ return new class extends clsCadastro {
72 72 $registro = $obj->detalhe();
73 73  
74 74 if (empty($registro)) {
75   - return $this->simpleRedirect(url('intranet/educar_servidor_lst.php'));
  75 + $this->simpleRedirect(url('intranet/educar_servidor_lst.php'));
76 76 }
77 77  
78 78 if ($registro) {
... ...
ieducar/intranet/educar_servidor_curso_lst.php
... ... @@ -158,7 +158,7 @@ return new class extends clsCadastro {
158 158  
159 159 public function Editar()
160 160 {
161   - return $this->Novo();
  161 + $this->Novo();
162 162 }
163 163  
164 164 public function Excluir()
... ...
ieducar/intranet/educar_servidor_disciplina_lst.php
... ... @@ -220,7 +220,7 @@ return new class extends clsCadastro {
220 220  
221 221 public function Editar()
222 222 {
223   - return $this->Novo();
  223 + $this->Novo();
224 224 }
225 225  
226 226 public function Excluir()
... ...
ieducar/intranet/educar_servidor_vinculo_turma_det.php
... ... @@ -108,8 +108,6 @@ return new class extends clsDetalhe {
108 108 $registro['instituicao_id'],
109 109 $registro['servidor_id']
110 110 );
111   -
112   - "go(\"educar_servidor_vinculo_turma_copia_cad.php?{$get_padrao}\");";
113 111 }
114 112  
115 113 $this->url_cancelar = sprintf(
... ...
ieducar/intranet/educar_turma_cad.php
... ... @@ -378,17 +378,10 @@ return new class extends clsCadastro {
378 378  
379 379 $script = 'javascript:showExpansivelIframe(520, 170, \'educar_turma_tipo_cad_pop.php\');';
380 380  
381   - if ($this->ref_cod_instituicao && $this->ref_cod_escola && $this->ref_cod_curso) {
382   - $script = sprintf(
383   - '<div id=\'img_turma\' border=\'0\' onclick=\'%s\'>',
384   - $script
385   - );
386   - } else {
387   - $script = sprintf(
388   - '<div id=\'img_turma\' border=\'0\' onclick=\'%s\'>',
389   - $script
390   - );
391   - }
  381 + $script = sprintf(
  382 + '<div id=\'img_turma\' border=\'0\' onclick=\'%s\'>',
  383 + $script
  384 + );
392 385  
393 386 $this->campoLista(
394 387 'ref_cod_turma_tipo',
... ...
ieducar/intranet/educar_turma_det.php
... ... @@ -246,7 +246,8 @@ return new class extends clsDetalhe {
246 246  
247 247 if (is_string($registro['dias_semana']) && !empty($registro['dias_semana'])) {
248 248 $registro['dias_semana'] = explode(',', str_replace(['{', '}'], '', $registro['dias_semana']));
249   - foreach ($registro['dias_semana'] as $key => $dia) {
  249 + $diasSemana = '';
  250 + foreach ($registro['dias_semana'] as $dia) {
250 251 $diasSemana .= $dias_da_semana[$dia] . '<br>';
251 252 }
252 253 $this->addDetalhe(
... ... @@ -322,7 +323,8 @@ return new class extends clsDetalhe {
322 323  
323 324 if (is_string($registro['dias_semana']) && !empty($registro['dias_semana'])) {
324 325 $registro['dias_semana'] = explode(',', str_replace(['{', '}'], '', $registro['dias_semana']));
325   - foreach ($registro['dias_semana'] as $key => $dia) {
  326 + $diasSemana = '';
  327 + foreach ($registro['dias_semana'] as $dia) {
326 328 $diasSemana .= $dias_da_semana[$dia] . '<br>';
327 329 }
328 330 $this->addDetalhe(
... ...
ieducar/intranet/include/clsAgenda.inc.php
... ... @@ -414,7 +414,7 @@ class clsAgenda
414 414 if ($encaminha['ref_cod_juris_processo'] && $encaminha['ref_versao_processo']) {
415 415 $objProcesso = new clsProcesso($encaminha['ref_cod_juris_processo'], $encaminha['ref_versao_processo']);
416 416 $detalheProcesso = $objProcesso->detalhe();
417   - if ($detalheProcesso['ativo'] == 1 && !$detalheProcesso['ref_pessoa_finalizadora'] && $qtd<3) {
  417 + if ($detalheProcesso['ativo'] == 1 && !$detalheProcesso['ref_pessoa_finalizadora']) {
418 418 $temp_arr_compromisso2['data_inicio'] = $detalheProcesso['data_envio'];
419 419 $temp_arr_compromisso2['versao'] = '1';
420 420 $temp_arr_compromisso2['data_fim'] =$detalheProcesso['data_envio'];
... ... @@ -431,7 +431,7 @@ class clsAgenda
431 431 $detalheTramite = $objTramite->detalhe();
432 432 $objProcesso = new clsProcesso($detalheTramite['ref_cod_juris_processo'], $detalheTramite['ref_versao_processo']);
433 433 $detalheProcesso = $objProcesso->detalhe();
434   - if ($detalheTramite['ativo'] == 1 && !$detalheProcesso['ref_pessoa_finalizadora'] && $qtd<3) {
  434 + if ($detalheTramite['ativo'] == 1 && !$detalheProcesso['ref_pessoa_finalizadora']) {
435 435 $temp_arr_compromisso2['data_inicio'] = $detalheProcesso['data_envio'];
436 436 $temp_arr_compromisso2['versao'] = '1';
437 437 $temp_arr_compromisso2['data_fim'] =$detalheProcesso['data_envio'];
... ...
ieducar/intranet/include/clsCadastro.inc.php
... ... @@ -120,12 +120,7 @@ class clsCadastro extends clsCampos
120 120 }
121 121  
122 122 $this->setFlashMessage();
123   -
124   - if (empty($script) && $this->sucesso && !empty($this->url_sucesso)) {
125   - redirecionar($this->url_sucesso);
126   - } else {
127   - $this->Formular();
128   - }
  123 + $this->Formular();
129 124 }
130 125 }
131 126  
... ...
ieducar/intranet/include/clsCalendario.inc.php
... ... @@ -569,6 +569,8 @@ class clsCalendario
569 569 }
570 570 }
571 571  
  572 + $mensagens = '';
  573 +
572 574 while ($diaCorrente <= $NumeroDiasMes) {
573 575 // Seventh column (Saturday) reached. Start a new row.
574 576 if ($DiaSemana == 7) {
... ...
ieducar/intranet/include/clsCampos.inc.php
... ... @@ -1637,10 +1637,6 @@ class clsCampos extends Core_Controller_Page_Abstract
1637 1637  
1638 1638 break;
1639 1639  
1640   - case 'email':
1641   - $retorno .= '<a href=\'www.google.com.br\' class=\'linkBory\'>Enviar Por Email</a>';
1642   - break;
1643   -
1644 1640 case 'emailDuplo':
1645 1641 $retorno .= "<input class='{$class}' type='text' name=\"{$nome}\" id=\"{$nome}\" value=\"{$componente[3]}\" size=\"{$componente[4]}\" maxlength=\"{$componente[5]}\" onKeyUp=\"{$componente[8]}\">";
1646 1642 $foiDuplo = true;
... ...
ieducar/intranet/include/clsListagem.inc.php
... ... @@ -72,7 +72,7 @@ class clsListagem extends clsCampos
72 72  
73 73 $path = $uri . '?' . $path;
74 74  
75   - return $this->simpleRedirect($path);
  75 + $this->simpleRedirect($path);
76 76 }
77 77 } else {
78 78 $params = http_build_query($_GET) . '|' . now();
... ...
ieducar/intranet/include/clsPDF.inc.php
... ... @@ -89,6 +89,8 @@ class clsPDF
89 89 PDF_close($this->pdf);
90 90 PDF_delete($this->pdf);
91 91  
  92 + $len = null; // Fix SonarCloud
  93 +
92 94 if ($this->depurar) {
93 95 echo "<b>PDF:</b> Finalizando o arquivo com tamanho de -> {$len}<br>";
94 96 }
... ... @@ -552,24 +554,11 @@ class clsPDF
552 554 $px1,
553 555 $py1,
554 556 $px2,
555   - $py2,
556   - $linha = 2.001,
557   - $color1 = '#000000',
558   - $color2 = '#000000'
  557 + $py2
559 558 ) {
560   - if ($teck2) {
561   - $this->SetLine($linha);
562   - $this->SetBoth($color1);
563   - $this->SetFill($color2);
564   - }
565   -
566 559 PDF_moveto($this->pdf, $xo, $yo);
567 560 PDF_curveto($this->pdf, $px1, $py1, $px2, $py2, $x, $y);
568 561  
569   - if ($teck) {
570   - PDF_stroke($this->pdf);
571   - }
572   -
573 562 if ($this->depurar) {
574 563 echo '<b>PDF:</b> Adicionado uma curva.<br>';
575 564 }
... ...
ieducar/intranet/include/file_check.php
... ... @@ -76,9 +76,6 @@ class FileController
76 76  
77 77 return false;
78 78 }
79   - $this->errorMessage = 'Arquivo inválido.';
80   -
81   - return false;
82 79 }
83 80  
84 81 public function getErrorMessage()
... ...
ieducar/intranet/include/file_check_just_pdf.php
... ... @@ -76,9 +76,6 @@ class FileControllerPdf
76 76  
77 77 return false;
78 78 }
79   - $this->errorMessage = 'Arquivo inválido.';
80   -
81   - return false;
82 79 }
83 80  
84 81 public function getErrorMessage()
... ...
ieducar/intranet/include/modules/clsModulesAuditoriaNota.inc.php
... ... @@ -47,6 +47,7 @@ class clsModulesAuditoriaNota
47 47 $this->_tabela = "{$this->_schema}auditoria";
48 48 $separador = '';
49 49 $valores = '';
  50 + $campos = '';
50 51  
51 52 if (!is_null($this->stringNotaAntiga) && !is_null($this->stringNotaNova)) {
52 53 $this->operacao = self::OPERACAO_ALTERACAO;
... ...
ieducar/intranet/include/modules/clsModulesComponenteCurricular.inc.php
... ... @@ -2,9 +2,6 @@
2 2  
3 3 use iEducar\Legacy\Model;
4 4  
5   -error_reporting(E_ERROR);
6   -ini_set('display_errors', 1);
7   -
8 5 class clsModulesComponenteCurricular extends Model
9 6 {
10 7 public $id;
... ...
ieducar/intranet/include/modules/clsModulesComponenteCurricularAnoEscolar.inc.php
... ... @@ -312,10 +312,9 @@ SQL;
312 312 $gruda = ', ';
313 313 }
314 314  
315   - if (is_numeric($this->tipo_nota) && (int) $tipo_nota !== 0) {
  315 + if (is_numeric($this->tipo_nota)) {
316 316 $campos .= "{$gruda}tipo_nota";
317 317 $valores .= "{$gruda}'{$this->tipo_nota}'";
318   - $gruda = ', ';
319 318 }
320 319  
321 320 $sql = "INSERT INTO {$this->_tabela} ( $campos ) VALUES( $valores )";
... ...
ieducar/intranet/include/modules/clsModulesEmpresaTransporteEscolar.inc.php
... ... @@ -94,6 +94,7 @@ class clsModulesEmpresaTransporteEscolar extends Model
94 94 {
95 95 if (is_numeric($this->cod_empresa_transporte_escolar)) {
96 96 $db = new clsBanco();
  97 + $gruda = '';
97 98 $set = '';
98 99  
99 100 if (is_numeric($this->ref_idpes)) {
... ... @@ -112,7 +113,7 @@ class clsModulesEmpresaTransporteEscolar extends Model
112 113 $gruda = ', ';
113 114 }
114 115 if ($set) {
115   - $detalheAntigo = $this->detalhe();
  116 + $this->detalhe();
116 117 $db->Consulta("UPDATE {$this->_tabela} SET $set WHERE cod_empresa_transporte_escolar = '{$this->cod_empresa_transporte_escolar}'");
117 118  
118 119 return true;
... ...
ieducar/intranet/include/modules/clsModulesMoradiaAluno.inc.php
... ... @@ -393,6 +393,7 @@ class clsModulesMoradiaAluno extends Model
393 393 if (is_numeric($this->ref_cod_aluno)) {
394 394 $db = new clsBanco();
395 395 $set = '';
  396 + $gruda = '';
396 397  
397 398 if (is_numeric($this->ref_cod_aluno)) {
398 399 $set .= "{$gruda}ref_cod_aluno = '{$this->ref_cod_aluno}'";
... ... @@ -564,7 +565,7 @@ class clsModulesMoradiaAluno extends Model
564 565 $countCampos = count(explode(',', $this->_campos_lista)) + 2;
565 566 $resultado = [];
566 567  
567   - $sql .= $filtros . $whereNomes . $this->getOrderby() . $this->getLimite();
  568 + $sql .= $filtros . $this->getOrderby() . $this->getLimite();
568 569  
569 570 $this->_total = $db->CampoUnico("SELECT COUNT(0) FROM {$this->_tabela} {$filtros}");
570 571  
... ...
ieducar/intranet/include/modules/clsModulesMotorista.inc.php
... ... @@ -152,6 +152,7 @@ class clsModulesMotorista extends Model
152 152 if (is_numeric($this->cod_motorista)) {
153 153 $db = new clsBanco();
154 154 $set = '';
  155 + $gruda = '';
155 156  
156 157 if (is_numeric($this->cod_motorista)) {
157 158 $set .= "{$gruda}cod_motorista = '{$this->cod_motorista}'";
... ...
ieducar/intranet/include/modules/clsModulesPessoaTransporte.inc.php
... ... @@ -140,6 +140,7 @@ class clsModulesPessoaTransporte extends Model
140 140 if (is_numeric($this->cod_pessoa_transporte)) {
141 141 $db = new clsBanco();
142 142 $set = '';
  143 + $gruda = '';
143 144  
144 145 if (is_numeric($this->ref_cod_rota_transporte_escolar)) {
145 146 $set .= "{$gruda}ref_cod_rota_transporte_escolar = '{$this->ref_cod_rota_transporte_escolar}'";
... ...
ieducar/intranet/include/modules/clsModulesVeiculo.inc.php
... ... @@ -270,6 +270,7 @@ class clsModulesVeiculo extends Model
270 270 if (is_numeric($this->cod_veiculo)) {
271 271 $db = new clsBanco();
272 272 $set = '';
  273 + $gruda = '';
273 274  
274 275 if (is_numeric($this->cod_veiculo)) {
275 276 $set .= "{$gruda}cod_veiculo = '{$this->cod_veiculo}'";
... ...
ieducar/intranet/include/pessoa/clsCadastroDeficiencia.inc.php
... ... @@ -106,6 +106,7 @@ class clsCadastroDeficiencia extends Model
106 106 if (is_numeric($this->cod_deficiencia)) {
107 107 $db = new clsBanco();
108 108 $set = '';
  109 + $gruda = '';
109 110  
110 111 if (is_string($this->nm_deficiencia)) {
111 112 $set .= "{$gruda}nm_deficiencia = '{$this->nm_deficiencia}'";
... ...
ieducar/intranet/include/pessoa/clsCadastroEscolaridade.inc.php
... ... @@ -88,6 +88,7 @@ class clsCadastroEscolaridade extends Model
88 88 if (is_numeric($this->idesco)) {
89 89 $db = new clsBanco();
90 90 $set = '';
  91 + $gruda = '';
91 92  
92 93 if (is_string($this->descricao)) {
93 94 $descricao = $db->escapeString($this->descricao);
... ...
ieducar/intranet/include/pessoa/clsCadastroFisicaFoto.inc.php
... ... @@ -74,6 +74,7 @@ class clsCadastroFisicaFoto extends Model
74 74 if (is_numeric($this->idpes)) {
75 75 $db = new clsBanco();
76 76 $set = '';
  77 + $gruda = '';
77 78  
78 79 if (is_string($this->caminho)) {
79 80 $set .= "{$gruda}caminho = '{$this->caminho}'";
... ...
ieducar/intranet/include/pessoa/clsCadastroRaca.inc.php
... ... @@ -117,6 +117,7 @@ class clsCadastroRaca extends Model
117 117 if (is_numeric($this->cod_raca)) {
118 118 $db = new clsBanco();
119 119 $set = '';
  120 + $gruda = '';
120 121  
121 122 if (is_numeric($this->idpes_exc)) {
122 123 $set .= "{$gruda}idpes_exc = '{$this->idpes_exc}'";
... ... @@ -177,10 +178,6 @@ class clsCadastroRaca extends Model
177 178  
178 179 $whereAnd = ' WHERE ';
179 180  
180   - if (is_numeric($int_cod_raca)) {
181   - $filtros .= "{$whereAnd} cod_raca = '{$int_cod_raca}'";
182   - $whereAnd = ' AND ';
183   - }
184 181 if (is_numeric($int_idpes_exc)) {
185 182 $filtros .= "{$whereAnd} idpes_exc = '{$int_idpes_exc}'";
186 183 $whereAnd = ' AND ';
... ...
ieducar/intranet/include/pessoa/clsCadastroReligiao.inc.php
... ... @@ -111,6 +111,7 @@ class clsCadastroReligiao extends Model
111 111 if (is_numeric($this->cod_religiao)) {
112 112 $db = new clsBanco();
113 113 $set = '';
  114 + $gruda = '';
114 115  
115 116 if (is_numeric($this->idpes_exc)) {
116 117 $set .= "{$gruda}idpes_exc = '{$this->idpes_exc}'";
... ... @@ -167,10 +168,6 @@ class clsCadastroReligiao extends Model
167 168  
168 169 $whereAnd = ' WHERE ';
169 170  
170   - if (is_numeric($int_cod_religiao)) {
171   - $filtros .= "{$whereAnd} cod_religiao = '{$int_cod_religiao}'";
172   - $whereAnd = ' AND ';
173   - }
174 171 if (is_numeric($int_idpes_exc)) {
175 172 $filtros .= "{$whereAnd} idpes_exc = '{$int_idpes_exc}'";
176 173 $whereAnd = ' AND ';
... ...
ieducar/intranet/include/pessoa/clsDocumento.inc.php
... ... @@ -600,6 +600,7 @@ class clsDocumento
600 600 $int_idpes = false
601 601 ) {
602 602 $whereAnd = 'WHERE ';
  603 + $where = '';
603 604  
604 605 if (is_string($int_idpes)) {
605 606 $where .= "{$whereAnd}idpes IN ({$int_idpes})";
... ... @@ -619,7 +620,7 @@ class clsDocumento
619 620 $whereAnd = ' AND ';
620 621 }
621 622 if (is_string($this->tipo_cert_civil)) {
622   - $where .= "{$whereAnd}tipo_cert_civil LIKE '%$str_tipo_cert_civil%'";
  623 + $where .= "{$whereAnd}tipo_cert_civil LIKE '%$this->tipo_cert_civil%'";
623 624 $whereAnd = ' AND ';
624 625 }
625 626 if (is_numeric($this->num_termo)) {
... ... @@ -631,7 +632,7 @@ class clsDocumento
631 632 $whereAnd = ' AND ';
632 633 }
633 634 if (is_numeric($this->num_folha)) {
634   - $where .= "{$whereAnd}num_folha = '$intnum_folha'";
  635 + $where .= "{$whereAnd}num_folha = '$this->num_folha'";
635 636 $whereAnd = ' AND ';
636 637 }
637 638 if (is_string($this->data_emissao_cert_civil)) {
... ... @@ -697,12 +698,6 @@ class clsDocumento
697 698 while ($db->ProximoRegistro()) {
698 699 $tupla = $db->Tupla();
699 700  
700   - $tupla['idpes'] = $tupla['idpes'];
701   - $tupla['idorg_exp_rg'] = $tupla['idorg_exp_rg'];
702   - $tupla['sigla_uf_cart_trabalho'] = $tupla['sigla_uf_cart_trabalho'];
703   - $tupla['sigla_uf_cert_civil'] = $tupla['sigla_uf_cert_civil'];
704   - $tupla['sigla_uf_exp_rg'] = $tupla['sigla_uf_exp_rg'];
705   -
706 701 $tupla['total'] = $total;
707 702 $resultado[] = $tupla;
708 703 }
... ... @@ -747,10 +742,6 @@ class clsDocumento
747 742 $this->passaporte = $tupla['passaporte'];
748 743  
749 744 $tupla['idpes'] = $tupla['idpes'] ?? null;
750   - $tupla['idorg_exp_rg'] = $tupla['idorg_exp_rg'];
751   - $tupla['sigla_uf_cart_trabalho'] = $tupla['sigla_uf_cart_trabalho'];
752   - $tupla['sigla_uf_cert_civil'] = $tupla['sigla_uf_cert_civil'];
753   - $tupla['sigla_uf_exp_rg'] = $tupla['sigla_uf_exp_rg'];
754 745  
755 746 return $tupla;
756 747 }
... ...
ieducar/intranet/include/pessoa/clsEscolaridade.inc.php
... ... @@ -76,6 +76,7 @@ class clsEscolaridade
76 76 */
77 77 public function lista($int_idesco = false, $str_descricao = false, $str_ordenacao = 'descricao', $int_limite_ini = 0, $int_limite_qtd = 30)
78 78 {
  79 + $where = '';
79 80 $whereAnd = 'WHERE ';
80 81  
81 82 if (is_numeric($int_idesco)) {
... ...
ieducar/intranet/include/pessoa/clsFisica.inc.php
... ... @@ -166,7 +166,7 @@ class clsFisica
166 166 $this->nacionalidade = $nacionalidade;
167 167  
168 168 // todo Remover variável não usada
169   - $this->data_chegada_brasil = $data_chegada_brasil ?? null;
  169 + $this->data_chegada_brasil = null;
170 170 $this->ultima_empresa = $ultima_empresa;
171 171 $this->nome_mae = $nome_mae;
172 172 $this->nome_pai = $nome_pai;
... ... @@ -178,7 +178,7 @@ class clsFisica
178 178 $this->empresa = $empresa;
179 179 $this->ddd_telefone_empresa = $ddd_telefone_empresa;
180 180 $this->telefone_empresa = $telefone_empresa;
181   - $this->pessoa_contato = $pessoa_contato ?? null;
  181 + $this->pessoa_contato = null;
182 182 $this->renda_mensal = $renda_mensal;
183 183 $this->data_admissao = $data_admissao;
184 184 $this->zona_localizacao_censo = $zona_localizacao_censo;
... ... @@ -769,6 +769,7 @@ class clsFisica
769 769 */
770 770 public function lista($int_idpes = false, $data_data_nasc = false, $str_sexo = false, $int_idpes_mae = false, $int_idpes_pai = false, $int_idpes_responsavel = false, $int_idesco = false, $int_ideciv = false, $int_idpes_con = false, $data_data_uniao = false, $data_data_obito = false, $int_nacionalidade = false, $int_idpais_estrangeiro = false, $data_data_chagada_brasil = false, $int_idmun_nascimento = false, $str_ultima_empresa = false, $int_idocup = false, $str_nome_mae = false, $str_nome_pai = false, $str_nome_conjuge = false, $str_nome_responsavel = false, $str_justificativa_provisorio = false, $str_ordenacao = false, $int_limite_ini = 0, $int_limite_qtd = 20, $arrayint_idisin = false, $arrayint_idnotin = false, $str_data_nasc_ini = false, $str_data_nasc_fim = false, $int_mes_aniversario = false, $int_ref_cod_sistema = false, $int_cpf = false)
771 771 {
  772 + $where = '';
772 773 $whereAnd = 'WHERE ';
773 774  
774 775 if (is_numeric($int_idpes)) {
... ... @@ -815,10 +816,6 @@ class clsFisica
815 816 $where .= "{$whereAnd}idpes_con = '$int_idpes_con'";
816 817 $whereAnd = ' AND ';
817 818 }
818   - if (is_string($data_data_uniao)) {
819   - $where .= "{$whereAnd}data_uniao = '$data_data-uniao'";
820   - $whereAnd = ' AND ';
821   - }
822 819 if (is_string($data_data_obito)) {
823 820 $where .= "{$whereAnd}data_obito = '$data_data_obito'";
824 821 $whereAnd = ' AND ';
... ... @@ -831,10 +828,6 @@ class clsFisica
831 828 $where .= "{$whereAnd}idpais_estrangeiro = '$int_idpais_estrangeiro'";
832 829 $whereAnd = ' AND ';
833 830 }
834   - if (is_string($data_data_chegada_brasil)) {
835   - $where .= "{$whereAnd}data_chegada_brasil = '$data_data_chegada_brasil'";
836   - $whereAnd = ' AND ';
837   - }
838 831 if (is_numeric($int_idmun_nascimento)) {
839 832 $where .= "{$whereAnd}idmun_nascimento = '$int_idmun_nascimento'";
840 833 $whereAnd = ' AND ';
... ... @@ -964,7 +957,6 @@ class clsFisica
964 957 $resultado = [];
965 958 while ($db->ProximoRegistro()) {
966 959 $tupla = $db->Tupla();
967   - $tupla['idesco'] = $tupla['idesco'];
968 960 $tupla['ideciv'] = new clsEstadoCivil($tupla['ideciv']);
969 961 $tupla['idocup'] = new clsOcupacao($tupla['idocup']);
970 962  
... ...
ieducar/intranet/include/pessoa/clsFisicaCpf.inc.php
... ... @@ -62,6 +62,7 @@ class clsFisicaCpf
62 62 */
63 63 public function lista($int_idpes = false, $int_cpf = false, $str_ordenacao = 'idpes', $int_limite_ini = false, $int_limite_qtd = false)
64 64 {
  65 + $where = '';
65 66 $whereAnd = 'WHERE ';
66 67  
67 68 if (is_numeric($int_idpes)) {
... ... @@ -106,6 +107,7 @@ class clsFisicaCpf
106 107 */
107 108 public function listaCod($int_idpes = false, $int_cpf = false, $str_ordenacao = 'idpes', $int_limite_ini = false, $int_limite_qtd = false)
108 109 {
  110 + $where = '';
109 111 $whereAnd = 'WHERE ';
110 112  
111 113 if (is_numeric($int_idpes)) {
... ...
ieducar/intranet/include/pessoa/clsFuncionario.inc.php
... ... @@ -32,7 +32,6 @@ class clsFuncionario extends clsPessoaFisica
32 32 $this->data_troca_senha = $data_troca_senha;
33 33 $this->data_reativa_conta = $data_reativa_conta;
34 34 $this->tempo_expira_senha = $tempo_expira_senha;
35   - $this->data_expiracao = $data_expiracao;
36 35 $this->ref_cod_funcionario_vinculo = $ref_cod_funcionario_vinculo;
37 36 $this->email = $email;
38 37 $this->_campos_lista = '
... ... @@ -135,11 +134,6 @@ class clsFuncionario extends clsPessoaFisica
135 134 $filtro_pessoa = true;
136 135 }
137 136  
138   - if (is_string($str_email)) {
139   - $filtros .= "{$whereAnd} f.email ILIKE '%{$str_email}%'f";
140   - $whereAnd = ' AND ';
141   - }
142   -
143 137 $limite = '';
144 138 if ($int_inicio_limit !== false && $int_qtd_registros !== false) {
145 139 $limite = "LIMIT $int_qtd_registros OFFSET $int_inicio_limit ";
... ...
ieducar/intranet/include/pessoa/clsJuridica.inc.php
... ... @@ -166,6 +166,7 @@ class clsJuridica
166 166 public function lista($str_fantasia = false, $str_insc_estadual = false, $int_cnpj = false, $str_ordenacao = false, $int_limite_ini = false, $int_limite_qtd = false, $arrayint_idisin = false, $arrayint_idnotin = false, $int_idpes = false)
167 167 {
168 168 $db = new clsBanco;
  169 + $where = '';
169 170 $whereAnd = 'WHERE ';
170 171 $join = '';
171 172 if (is_string($str_fantasia)) {
... ...
ieducar/intranet/include/pessoa/clsOcupacao.inc.php
... ... @@ -73,7 +73,7 @@ class clsOcupacao
73 73 */
74 74 public function lista($int_idocup = false, $str_descricao = false, $str_ordenacao = 'descricao', $int_limite_ini = 0, $int_limite_qtd = 20)
75 75 {
76   - // verificacoes de filtros a serem usados
  76 + $where = '';
77 77 $whereAnd = 'WHERE ';
78 78 if (is_numeric($int_idocup)) {
79 79 $where .= "{$whereAnd}idocup = '$int_idocup'";
... ...
ieducar/intranet/include/pessoa/clsOrgaoEmissorRg.inc.php
... ... @@ -34,8 +34,6 @@ class clsOrgaoEmissorRg
34 34 $db->Consulta("INSERT INTO {$this->schema}.{$this->tabela} ( sigla, descricao, situacao$campos ) VALUES ( '{$this->sigla}', '{$this->descricao}', '{$this->situacao}'$values )");
35 35  
36 36 return $db->InsertId("{$this->tabela}_idorg_rg_seq");
37   -
38   - return true;
39 37 }
40 38  
41 39 return false;
... ... @@ -84,6 +82,7 @@ class clsOrgaoEmissorRg
84 82 */
85 83 public function lista($str_sigla = false, $str_descricao = false, $str_situacao = false, $int_limite_ini = 0, $int_limite_qtd = false, $str_orderBy = false)
86 84 {
  85 + $where = '';
87 86 $whereAnd = 'WHERE ';
88 87 if (is_string($str_sigla)) {
89 88 $where .= "{$whereAnd}sigla LIKE '%$str_sigla%'";
... ...
ieducar/intranet/include/pessoa/clsPessoa_.inc.php
... ... @@ -158,13 +158,8 @@ class clsPessoa_
158 158 }
159 159  
160 160 if (is_string($str_data_cad_ini)) {
161   - if (!$str_data_edicao_fim) {
162   - $where .= "{$whereAnd}data_cad >= '$str_data_cad_ini 00:00:00' AND data_cad <= '$str_data_cad_ini 23:59:59'";
163   - $whereAnd = ' AND ';
164   - } else {
165   - $where .= "{$whereAnd}data_cad >= '$str_data_cad_ini'";
166   - $whereAnd = ' AND ';
167   - }
  161 + $where .= "{$whereAnd}data_cad >= '$str_data_cad_ini'";
  162 + $whereAnd = ' AND ';
168 163 }
169 164  
170 165 if (is_string($str_data_cad_fim)) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarAbandonoTipo.inc.php
... ... @@ -102,6 +102,7 @@ class clsPmieducarAbandonoTipo extends Model
102 102 {
103 103 if (is_numeric($this->cod_abandono_tipo) && is_numeric($this->ref_usuario_exc)) {
104 104 $db = new clsBanco();
  105 + $gruda = '';
105 106 $set = '';
106 107  
107 108 if (is_numeric($this->ref_usuario_exc)) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarAcervo.inc.php
... ... @@ -386,6 +386,7 @@ class clsPmieducarAcervo extends Model
386 386 {
387 387 if (is_numeric($this->cod_acervo) && is_numeric($this->ref_usuario_exc)) {
388 388 $db = new clsBanco();
  389 + $gruda = '';
389 390 $set = '';
390 391  
391 392 if (is_numeric($this->ref_cod_exemplar_tipo)) {
... ... @@ -603,22 +604,6 @@ class clsPmieducarAcervo extends Model
603 604 $filtros .= "{$whereAnd} a.cutter LIKE $$%{$str_cutter}%$$";
604 605 $whereAnd = ' AND ';
605 606 }
606   - if (is_numeric($int_volume)) {
607   - $filtros .= "{$whereAnd} a.volume = '{$int_volume}'";
608   - $whereAnd = ' AND ';
609   - }
610   - if (is_numeric($int_num_edicao)) {
611   - $filtros .= "{$whereAnd} a.num_edicao = '{$int_num_edicao}'";
612   - $whereAnd = ' AND ';
613   - }
614   - if (is_string($str_ano)) {
615   - $filtros .= "{$whereAnd} a.ano = '{$str_ano}'";
616   - $whereAnd = ' AND ';
617   - }
618   - if (is_numeric($int_num_paginas)) {
619   - $filtros .= "{$whereAnd} a.num_paginas = '{$int_num_paginas}'";
620   - $whereAnd = ' AND ';
621   - }
622 607 if (is_string($str_isbn)) {
623 608 $filtros .= "{$whereAnd} a.isbn = '{$str_isbn}'";
624 609 $whereAnd = ' AND ';
... ... @@ -654,24 +639,14 @@ class clsPmieducarAcervo extends Model
654 639 $filtros .= "{$whereAnd} a.ref_cod_biblioteca = '{$int_ref_cod_biblioteca}'";
655 640 $whereAnd = ' AND ';
656 641 }
657   - if (is_numeric($int_ref_cod_instituicao)) {
658   - $filtro .= "{$whereAnd} b.ref_cod_instituicao = '{$int_ref_cod_instituicao}'";
659   - $whereAnd = ' AND ';
660   - }
661 642 if (is_numeric($int_ref_cod_escola)) {
662   - $filtro .= "{$whereAnd} b.ref_cod_escola = '{$int_ref_cod_escola}'";
  643 + $filtros .= "{$whereAnd} b.ref_cod_escola = '{$int_ref_cod_escola}'";
663 644 $whereAnd = ' AND ';
664 645 }
665 646 if (!empty($str_nm_autor)) {
666 647 $filtros .= "{$whereAnd} aa.nm_autor LIKE $$%{$str_nm_autor}%$$";
667 648 $whereAnd = ' AND ';
668 649 }
669   - /*else
670   - {
671   - $filtros .= "{$whereAnd} aaa.principal = '1'";
672   - $whereAnd = " AND ";
673   - }*/
674   -
675 650 $db = new clsBanco();
676 651 $countCampos = count(explode(',', $this->_campos_lista));
677 652 $resultado = [];
... ... @@ -727,6 +702,7 @@ class clsPmieducarAcervo extends Model
727 702 'LEFT JOIN pmieducar.acervo_acervo_autor aaa ON (aaa.ref_cod_acervo = a.cod_acervo) ' .
728 703 'LEFT JOIN pmieducar.acervo_autor aa ON (aa.cod_acervo_autor = aaa.ref_cod_acervo_autor)';
729 704  
  705 + $filtros = '';
730 706 $whereAnd = ' WHERE ';
731 707 if (is_array($int_ref_cod_biblioteca)) {
732 708 $bibs = implode(', ', $int_ref_cod_biblioteca);
... ...
ieducar/intranet/include/pmieducar/clsPmieducarAcervoAcervoAutor.inc.php
... ... @@ -75,6 +75,7 @@ class clsPmieducarAcervoAcervoAutor extends Model
75 75 {
76 76 if (is_numeric($this->ref_cod_acervo_autor) && is_numeric($this->ref_cod_acervo)) {
77 77 $db = new clsBanco();
  78 + $gruda = '';
78 79 $set = '';
79 80  
80 81 if (is_numeric($this->principal)) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarAcervoAssunto.inc.php
... ... @@ -112,6 +112,7 @@ class clsPmieducarAcervoAssunto extends Model
112 112 {
113 113 if (is_numeric($this->cod_acervo_assunto) && is_numeric($this->ref_usuario_exc)) {
114 114 $db = new clsBanco();
  115 + $gruda = '';
115 116 $set = '';
116 117  
117 118 if (is_numeric($this->ref_usuario_exc)) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarAcervoAutor.inc.php
... ... @@ -112,6 +112,7 @@ class clsPmieducarAcervoAutor extends Model
112 112 {
113 113 if (is_numeric($this->cod_acervo_autor) && is_numeric($this->ref_usuario_exc)) {
114 114 $db = new clsBanco();
  115 + $gruda = '';
115 116 $set = '';
116 117  
117 118 if (is_numeric($this->ref_usuario_exc)) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarAcervoColecao.inc.php
... ... @@ -119,6 +119,7 @@ class clsPmieducarAcervoColecao extends Model
119 119 {
120 120 if (is_numeric($this->cod_acervo_colecao) && is_numeric($this->ref_usuario_exc)) {
121 121 $db = new clsBanco();
  122 + $gruda = '';
122 123 $set = '';
123 124  
124 125 if (is_numeric($this->ref_usuario_exc)) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarAcervoEditora.inc.php
... ... @@ -186,6 +186,7 @@ class clsPmieducarAcervoEditora extends Model
186 186 {
187 187 if (is_numeric($this->cod_acervo_editora) && is_numeric($this->ref_usuario_exc)) {
188 188 $db = new clsBanco();
  189 + $gruda = '';
189 190 $set = '';
190 191  
191 192 if (is_numeric($this->ref_usuario_cad)) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarAcervoIdioma.inc.php
... ... @@ -102,6 +102,7 @@ class clsPmieducarAcervoIdioma extends Model
102 102 {
103 103 if (is_numeric($this->cod_acervo_idioma) && is_numeric($this->ref_usuario_exc)) {
104 104 $db = new clsBanco();
  105 + $gruda = '';
105 106 $set = '';
106 107  
107 108 if (is_numeric($this->ref_usuario_exc)) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarAluno.inc.php
... ... @@ -348,8 +348,8 @@ class clsPmieducarAluno extends Model
348 348 {
349 349 if (is_numeric($this->cod_aluno)) {
350 350 $db = new clsBanco();
351   - $set = '';
352 351 $gruda = '';
  352 + $set = '';
353 353  
354 354 if (is_numeric($this->ref_cod_religiao) || $this->ref_cod_religiao == 'NULL') {
355 355 $set .= "{$gruda}ref_cod_religiao = {$this->ref_cod_religiao}";
... ...
ieducar/intranet/include/pmieducar/clsPmieducarAlunoBeneficio.inc.php
... ... @@ -103,7 +103,7 @@ class clsPmieducarAlunoBeneficio extends Model
103 103 {
104 104 if (is_numeric($this->cod_aluno_beneficio) && is_numeric($this->ref_usuario_exc)) {
105 105 $db = new clsBanco();
106   -
  106 + $gruda = '';
107 107 $set = '';
108 108  
109 109 if (is_numeric($this->ref_usuario_exc)) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarAlunoHistoricoAlturaPeso.inc.php
... ... @@ -89,6 +89,7 @@ class clsPmieducarAlunoHistoricoAlturaPeso extends Model
89 89 {
90 90 if (is_numeric($this->ref_cod_aluno)) {
91 91 $db = new clsBanco();
  92 + $gruda = '';
92 93 $set = '';
93 94  
94 95 if (is_string($this->data_historico)) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarArredondamento.inc.php
... ... @@ -93,6 +93,7 @@ class clsPmieducarArredondamento extends Model
93 93 {
94 94 if (is_numeric($this->ref_cod_curso) && is_numeric($this->sequencial)) {
95 95 $db = new clsBanco();
  96 + $gruda = '';
96 97 $set = '';
97 98  
98 99 if (is_numeric($this->valor)) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarAvaliacao.inc.php
... ... @@ -140,6 +140,7 @@ class clsPmieducarAvaliacao extends Model
140 140 {
141 141 if (is_numeric($this->cod_avaliacao) && is_numeric($this->ref_usuario_exc)) {
142 142 $db = new clsBanco();
  143 + $gruda = '';
143 144 $set = '';
144 145  
145 146 if (is_numeric($this->disc_ref_ref_cod_serie)) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarAvaliacaoDesempenho.inc.php
... ... @@ -121,6 +121,7 @@ class clsPmieducarAvaliacaoDesempenho extends Model
121 121 {
122 122 if (is_numeric($this->sequencial) && is_numeric($this->ref_cod_servidor) && is_numeric($this->ref_ref_cod_instituicao) && is_numeric($this->ref_usuario_exc)) {
123 123 $db = new clsBanco();
  124 + $gruda = '';
124 125 $set = '';
125 126  
126 127 if (is_numeric($this->ref_usuario_exc)) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarBiblioteca.inc.php
... ... @@ -196,6 +196,7 @@ class clsPmieducarBiblioteca extends Model
196 196 {
197 197 if (is_numeric($this->cod_biblioteca)) {
198 198 $db = new clsBanco();
  199 + $gruda = '';
199 200 $set = '';
200 201  
201 202 if (is_numeric($this->ref_cod_instituicao)) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarBibliotecaDia.inc.php
... ... @@ -66,6 +66,7 @@ class clsPmieducarBibliotecaDia extends Model
66 66 {
67 67 if (is_numeric($this->ref_cod_biblioteca) && is_numeric($this->dia)) {
68 68 $db = new clsBanco();
  69 + $gruda = '';
69 70 $set = '';
70 71  
71 72 if ($set) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarBibliotecaFeriados.inc.php
... ... @@ -106,6 +106,7 @@ class clsPmieducarBibliotecaFeriados extends Model
106 106 {
107 107 if (is_numeric($this->cod_feriado)) {
108 108 $db = new clsBanco();
  109 + $gruda = '';
109 110 $set = '';
110 111  
111 112 if (is_numeric($this->ref_cod_biblioteca)) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarBibliotecaUsuario.inc.php
... ... @@ -65,6 +65,7 @@ class clsPmieducarBibliotecaUsuario extends Model
65 65 {
66 66 if (is_numeric($this->ref_cod_biblioteca) && is_numeric($this->ref_cod_usuario)) {
67 67 $db = new clsBanco();
  68 + $gruda = '';
68 69 $set = '';
69 70  
70 71 if ($set) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarBloqueioAnoLetivo.inc.php
... ... @@ -83,6 +83,7 @@ class clsPmieducarBloqueioAnoLetivo extends Model
83 83 {
84 84 if (is_numeric($this->ref_cod_instituicao) && is_numeric($this->ref_ano) && is_string($this->data_inicio) && is_string($this->data_fim)) {
85 85 $db = new clsBanco();
  86 + $gruda = '';
86 87 $set = '';
87 88  
88 89 if (is_string($this->data_inicio)) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarBloqueioLancamentoFaltasNotas.inc.php
... ... @@ -109,6 +109,7 @@ class clsPmieducarBloqueioLancamentoFaltasNotas extends Model
109 109 {
110 110 if (is_numeric($this->cod_bloqueio)) {
111 111 $db = new clsBanco();
  112 + $gruda = '';
112 113 $set = '';
113 114  
114 115 if (is_numeric($this->ano)) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarCalendarioAnoLetivo.inc.php
... ... @@ -101,6 +101,7 @@ class clsPmieducarCalendarioAnoLetivo extends Model
101 101 {
102 102 if (is_numeric($this->cod_calendario_ano_letivo) && is_numeric($this->ref_usuario_exc)) {
103 103 $db = new clsBanco();
  104 + $gruda = '';
104 105 $set = '';
105 106  
106 107 if (is_numeric($this->ref_cod_escola)) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarCalendarioAnotacao.inc.php
... ... @@ -101,6 +101,7 @@ class clsPmieducarCalendarioAnotacao extends Model
101 101 {
102 102 if (is_numeric($this->cod_calendario_anotacao) && is_numeric($this->ref_usuario_exc)) {
103 103 $db = new clsBanco();
  104 + $gruda = '';
104 105 $set = '';
105 106  
106 107 if (is_numeric($this->ref_usuario_exc)) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarCalendarioAtividade.inc.php
... ... @@ -101,6 +101,7 @@ class clsPmieducarCalendarioAtividade extends Model
101 101 {
102 102 if (is_numeric($this->cod_calendario_atividade) && is_numeric($this->ref_usuario_exc)) {
103 103 $db = new clsBanco();
  104 + $gruda = '';
104 105 $set = '';
105 106  
106 107 if (is_numeric($this->ref_usuario_exc)) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarCalendarioDia.inc.php
... ... @@ -126,6 +126,7 @@ class clsPmieducarCalendarioDia extends Model
126 126 {
127 127 if (is_numeric($this->ref_cod_calendario_ano_letivo) && is_numeric($this->mes) && is_numeric($this->dia) && is_numeric($this->ref_usuario_exc)) {
128 128 $db = new clsBanco();
  129 + $gruda = '';
129 130 $set = '';
130 131  
131 132 if (is_numeric($this->ref_usuario_exc)) {
... ... @@ -239,11 +240,6 @@ class clsPmieducarCalendarioDia extends Model
239 240 $whereAnd = ' AND ';
240 241 }
241 242  
242   - if (is_string($tipo_dia)) {
243   - $filtros .= "{$whereAnd} exists (SELECT FROM pmieducar.calendario_dia_motivo WHERE )";
244   - $whereAnd = ' AND ';
245   - }
246   -
247 243 $db = new clsBanco();
248 244 $countCampos = count(explode(',', $this->_campos_lista));
249 245 $resultado = [];
... ...
ieducar/intranet/include/pmieducar/clsPmieducarCalendarioDiaAnotacao.inc.php
... ... @@ -79,6 +79,7 @@ class clsPmieducarCalendarioDiaAnotacao extends Model
79 79 {
80 80 if (is_numeric($this->ref_dia) && is_numeric($this->ref_mes) && is_numeric($this->ref_ref_cod_calendario_ano_letivo) && is_numeric($this->ref_cod_calendario_anotacao)) {
81 81 $db = new clsBanco();
  82 + $gruda = '';
82 83 $set = '';
83 84  
84 85 if ($set) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarCalendarioDiaMotivo.inc.php
... ... @@ -132,6 +132,7 @@ class clsPmieducarCalendarioDiaMotivo extends Model
132 132 {
133 133 if (is_numeric($this->cod_calendario_dia_motivo) && is_numeric($this->ref_usuario_exc)) {
134 134 $db = new clsBanco();
  135 + $gruda = '';
135 136 $set = '';
136 137  
137 138 if (is_numeric($this->ref_cod_escola)) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarCandidatoFilaUnica.inc.php
... ... @@ -273,8 +273,8 @@ class clsPmieducarCandidatoFilaUnica extends Model
273 273 && is_numeric($this->ref_cod_aluno)
274 274 ) {
275 275 $db = new clsBanco();
276   - $set = '';
277 276 $gruda = '';
  277 + $set = '';
278 278  
279 279 if (is_numeric($this->ref_cod_serie)) {
280 280 $set .= "{$gruda}ref_cod_serie = {$this->ref_cod_serie}";
... ...
ieducar/intranet/include/pmieducar/clsPmieducarCandidatoReservaVaga.inc.php
... ... @@ -227,8 +227,8 @@ class clsPmieducarCandidatoReservaVaga extends Model
227 227 {
228 228 if (is_numeric($this->cod_candidato_reserva_vaga)) {
229 229 $db = new clsBanco();
230   - $set = '';
231 230 $gruda = '';
  231 + $set = '';
232 232 $campos = '';
233 233  
234 234 if (is_numeric($this->ano_letivo)) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarCategoriaNivel.inc.php
... ... @@ -93,6 +93,7 @@ class clsPmieducarCategoriaNivel extends Model
93 93 {
94 94 if (is_numeric($this->cod_categoria_nivel) && is_numeric($this->ref_usuario_exc)) {
95 95 $db = new clsBanco();
  96 + $gruda = '';
96 97 $set = '';
97 98  
98 99 if (is_numeric($this->ref_usuario_exc)) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarCategoriaObra.inc.php
... ... @@ -116,6 +116,7 @@ class clsPmieducarCategoriaObra extends Model
116 116 {
117 117 if (is_numeric($this->id)) {
118 118 $db = new clsBanco();
  119 + $gruda = '';
119 120 $set = '';
120 121 if (is_string($this->descricao)) {
121 122 $descricao = $db->escapeString($this->descricao);
... ...
ieducar/intranet/include/pmieducar/clsPmieducarCliente.inc.php
... ... @@ -131,6 +131,7 @@ class clsPmieducarCliente extends Model
131 131 {
132 132 if (is_numeric($this->cod_cliente) && is_numeric($this->ref_usuario_exc)) {
133 133 $db = new clsBanco();
  134 + $gruda = '';
134 135 $set = '';
135 136  
136 137 if (is_numeric($this->ref_usuario_exc)) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarClienteSuspensao.inc.php
... ... @@ -119,6 +119,7 @@ class clsPmieducarClienteSuspensao extends Model
119 119 {
120 120 if (is_numeric($this->sequencial) && is_numeric($this->ref_cod_cliente)) {
121 121 $db = new clsBanco();
  122 + $gruda = '';
122 123 $set = '';
123 124  
124 125 if (is_numeric($this->ref_usuario_libera)) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarClienteTipo.inc.php
... ... @@ -112,6 +112,7 @@ class clsPmieducarClienteTipo extends Model
112 112 {
113 113 if (is_numeric($this->cod_cliente_tipo) && is_numeric($this->ref_usuario_exc)) {
114 114 $db = new clsBanco();
  115 + $gruda = '';
115 116 $set = '';
116 117  
117 118 if (is_numeric($this->ref_cod_biblioteca)) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarClienteTipoCliente.inc.php
... ... @@ -115,6 +115,7 @@ class clsPmieducarClienteTipoCliente extends Model
115 115 {
116 116 if (is_numeric($this->ref_cod_cliente_tipo) && is_numeric($this->ref_cod_cliente) && is_numeric($this->ref_usuario_exc) && is_numeric($this->ativo)) {
117 117 $db = new clsBanco();
  118 + $gruda = '';
118 119 $set = '';
119 120  
120 121 $set .= "{$gruda}data_exclusao = NOW()";
... ... @@ -146,6 +147,7 @@ class clsPmieducarClienteTipoCliente extends Model
146 147 {
147 148 if (is_numeric($this->ref_cod_cliente_tipo) && is_numeric($this->ref_cod_cliente) && is_numeric($this->ref_usuario_exc) && is_numeric($this->ativo)) {
148 149 $db = new clsBanco();
  150 + $gruda = '';
149 151 $set = '';
150 152  
151 153 $set .= "{$gruda}data_exclusao = NOW()";
... ... @@ -180,6 +182,7 @@ class clsPmieducarClienteTipoCliente extends Model
180 182 {
181 183 if (is_numeric($this->ref_cod_cliente_tipo) && is_numeric($this->ref_cod_cliente) && is_numeric($this->ref_usuario_exc) && is_numeric($this->ativo) && is_numeric($this->ref_cod_biblioteca) && $ref_cod_biblioteca_atual) {
182 184 $db = new clsBanco();
  185 + $gruda = '';
183 186 $set = '';
184 187  
185 188 $set .= "{$gruda}data_exclusao = NOW()";
... ...
ieducar/intranet/include/pmieducar/clsPmieducarClienteTipoExemplarTipo.inc.php
... ... @@ -75,6 +75,7 @@ class clsPmieducarClienteTipoExemplarTipo extends Model
75 75 {
76 76 if (is_numeric($this->ref_cod_cliente_tipo) && is_numeric($this->ref_cod_exemplar_tipo)) {
77 77 $db = new clsBanco();
  78 + $gruda = '';
78 79 $set = '';
79 80  
80 81 if (is_numeric($this->dias_emprestimo)) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarCoffebreakTipo.inc.php
... ... @@ -110,6 +110,7 @@ class clsPmieducarCoffebreakTipo extends Model
110 110 {
111 111 if (is_numeric($this->cod_coffebreak_tipo) && is_numeric($this->ref_usuario_exc)) {
112 112 $db = new clsBanco();
  113 + $gruda = '';
113 114 $set = '';
114 115  
115 116 if (is_numeric($this->ref_usuario_exc)) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarCurso.inc.php
... ... @@ -305,6 +305,7 @@ class clsPmieducarCurso extends Model
305 305 $gruda = '';
306 306 if (is_numeric($this->cod_curso) && is_numeric($this->ref_usuario_exc)) {
307 307 $db = new clsBanco();
  308 + $gruda = '';
308 309 $set = '';
309 310  
310 311 if (is_numeric($this->ref_usuario_cad)) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarDisciplinaDependencia.inc.php
... ... @@ -130,6 +130,7 @@ class clsPmieducarDisciplinaDependencia extends Model
130 130 is_numeric($this->ref_cod_escola) && is_numeric($this->ref_cod_disciplina)
131 131 ) {
132 132 $db = new clsBanco();
  133 + $gruda = '';
133 134 $set = '';
134 135  
135 136 if (is_string($this->observacao)) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarDisciplinaDisciplinaTopico.inc.php
... ... @@ -79,6 +79,7 @@ class clsPmieducarDisciplinaDisciplinaTopico extends Model
79 79 {
80 80 if (is_numeric($this->ref_ref_cod_disciplina) && is_numeric($this->ref_ref_ref_cod_escola) && is_numeric($this->ref_ref_ref_cod_serie) && is_numeric($this->ref_cod_disciplina_topico)) {
81 81 $db = new clsBanco();
  82 + $gruda = '';
82 83 $set = '';
83 84  
84 85 if ($set) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarDisciplinaSerie.inc.php
... ... @@ -73,6 +73,7 @@ class clsPmieducarDisciplinaSerie extends Model
73 73 {
74 74 if (is_numeric($this->ref_cod_disciplina) && is_numeric($this->ref_cod_serie)) {
75 75 $db = new clsBanco();
  76 + $gruda = '';
76 77 $set = '';
77 78  
78 79 if (is_numeric($this->ativo)) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarDisciplinaTopico.inc.php
... ... @@ -101,6 +101,7 @@ class clsPmieducarDisciplinaTopico extends Model
101 101 {
102 102 if (is_numeric($this->cod_disciplina_topico) && is_numeric($this->ref_usuario_exc)) {
103 103 $db = new clsBanco();
  104 + $gruda = '';
104 105 $set = '';
105 106  
106 107 if (is_numeric($this->ref_usuario_exc)) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarDispensaDisciplina.inc.php
... ... @@ -203,8 +203,8 @@ class clsPmieducarDispensaDisciplina extends Model
203 203 is_numeric($this->ref_cod_escola) && is_numeric($this->ref_cod_disciplina) &&
204 204 is_numeric($this->ref_usuario_exc)) {
205 205 $db = new clsBanco();
206   - $set = '';
207 206 $gruda = '';
  207 + $set = '';
208 208  
209 209 if (is_numeric($this->ref_usuario_exc)) {
210 210 $set .= "{$gruda}ref_usuario_exc = '{$this->ref_usuario_exc}'";
... ...
ieducar/intranet/include/pmieducar/clsPmieducarDispensaDisciplinaEtapa.inc.php
... ... @@ -68,6 +68,7 @@ class clsPmieducarDispensaDisciplinaEtapa extends Model
68 68 {
69 69 if (is_numeric($this->ref_cod_dispensa) && is_numeric($this->etapa)) {
70 70 $db = new clsBanco();
  71 + $gruda = '';
71 72 $set = '';
72 73  
73 74 if (is_numeric($this->etapa)) {
... ...
ieducar/intranet/include/pmieducar/clsPmieducarDocumentos.inc.php
... ... @@ -174,6 +174,7 @@ class clsPmieducarDocumentos extends Model
174 174 {
175 175 if (is_numeric($this->ref_cod_pessoa_educ)) {
176 176 $db = new clsBanco();
  177 + $gruda = '';
177 178 $set = '';
178 179  
179 180 if (is_numeric($this->ref_idorg_rg)) {
... ...