Commit 173ca484eca8cdaeb6cc99caf54394eb59749667

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

Corrigida possibilidade de erro de SQL ao usar a data em formato dd/mm/aaaa, con…

…vertendo para o formato [http://pt.wikipedia.org/wiki/ISO_8601 ISO 8601]
ieducar/intranet/educar_falta_atraso_compensado_cad.php
@@ -153,7 +153,7 @@ class indice extends clsCadastro @@ -153,7 +153,7 @@ class indice extends clsCadastro
153 $obj_permissoes->permissao_cadastra(635, $this->pessoa_logada, 7, 153 $obj_permissoes->permissao_cadastra(635, $this->pessoa_logada, 7,
154 "educar_falta_atraso_det.php?ref_cod_servidor={$this->ref_cod_servidor}&ref_cod_escola={$this->ref_cod_escola}&ref_cod_instituicao={$this->ref_cod_instituicao}"); 154 "educar_falta_atraso_det.php?ref_cod_servidor={$this->ref_cod_servidor}&ref_cod_escola={$this->ref_cod_escola}&ref_cod_instituicao={$this->ref_cod_instituicao}");
155 155
156 - // 156 + // Transforma a data para o formato aceito pelo banco
157 $this->data_inicio = dataToBanco($this->data_inicio); 157 $this->data_inicio = dataToBanco($this->data_inicio);
158 $this->data_fim = dataToBanco($this->data_fim); 158 $this->data_fim = dataToBanco($this->data_fim);
159 159
@@ -171,7 +171,6 @@ class indice extends clsCadastro @@ -171,7 +171,6 @@ class indice extends clsCadastro
171 } 171 }
172 172
173 $this->mensagem = 'Cadastro não realizado.<br />'; 173 $this->mensagem = 'Cadastro não realizado.<br />';
174 - echo "<!--\nErro ao cadastrar clsPmieducarFaltaAtrasoCompensado\nvalores obrigatorios\nis_numeric( $this->ref_cod_escola ) && is_numeric( $this->ref_cod_instituicao ) && is_numeric( $this->ref_cod_servidor ) && is_numeric( $this->ref_usuario_cad ) && is_string( $this->data_inicio ) && is_string( $this->data_fim )\n-->";  
175 return FALSE; 174 return FALSE;
176 } 175 }
177 176
@@ -186,6 +185,10 @@ class indice extends clsCadastro @@ -186,6 +185,10 @@ class indice extends clsCadastro
186 sprintf('educar_falta_atraso_det.php?ref_cod_servidor=%d&ref_cod_escola=%d&ref_cod_instituicao=%d', 185 sprintf('educar_falta_atraso_det.php?ref_cod_servidor=%d&ref_cod_escola=%d&ref_cod_instituicao=%d',
187 $this->ref_cod_servidor, $this->ref_cod_escola, $this->ref_cod_instituicao)); 186 $this->ref_cod_servidor, $this->ref_cod_escola, $this->ref_cod_instituicao));
188 187
  188 + // Transforma a data para o formato aceito pelo banco
  189 + $this->data_inicio = dataToBanco($this->data_inicio);
  190 + $this->data_fim = dataToBanco($this->data_fim);
  191 +
189 $obj = new clsPmieducarFaltaAtrasoCompensado($this->cod_compensado, 192 $obj = new clsPmieducarFaltaAtrasoCompensado($this->cod_compensado,
190 $this->ref_cod_escola, $this->ref_cod_instituicao, $this->ref_cod_servidor, 193 $this->ref_cod_escola, $this->ref_cod_instituicao, $this->ref_cod_servidor,
191 $this->pessoa_logada, $this->pessoa_logada, $this->data_inicio, 194 $this->pessoa_logada, $this->pessoa_logada, $this->data_inicio,
@@ -201,7 +204,6 @@ class indice extends clsCadastro @@ -201,7 +204,6 @@ class indice extends clsCadastro
201 } 204 }
202 205
203 $this->mensagem = 'Edição não realizada.<br />'; 206 $this->mensagem = 'Edição não realizada.<br />';
204 - echo "<!--\nErro ao editar clsPmieducarFaltaAtrasoCompensado\nvalores obrigatorios\nif( is_numeric( $this->cod_compensado ) && is_numeric( $this->ref_usuario_exc ) )\n-->";  
205 return FALSE; 207 return FALSE;
206 } 208 }
207 209
@@ -216,6 +218,10 @@ class indice extends clsCadastro @@ -216,6 +218,10 @@ class indice extends clsCadastro
216 sprintf('educar_falta_atraso_det.php?ref_cod_servidor=%d&ref_cod_escola=%d&ref_cod_instituicao=%d', 218 sprintf('educar_falta_atraso_det.php?ref_cod_servidor=%d&ref_cod_escola=%d&ref_cod_instituicao=%d',
217 $this->ref_cod_servidor, $this->ref_cod_escola, $this->ref_cod_instituicao)); 219 $this->ref_cod_servidor, $this->ref_cod_escola, $this->ref_cod_instituicao));
218 220
  221 + // Transforma a data para o formato aceito pelo banco
  222 + $this->data_inicio = dataToBanco($this->data_inicio);
  223 + $this->data_fim = dataToBanco($this->data_fim);
  224 +
219 $obj = new clsPmieducarFaltaAtrasoCompensado($this->cod_compensado, 225 $obj = new clsPmieducarFaltaAtrasoCompensado($this->cod_compensado,
220 $this->ref_cod_escola, $this->ref_cod_instituicao, $this->ref_cod_servidor, 226 $this->ref_cod_escola, $this->ref_cod_instituicao, $this->ref_cod_servidor,
221 $this->pessoa_logada, $this->pessoa_logada, $this->data_inicio, 227 $this->pessoa_logada, $this->pessoa_logada, $this->data_inicio,
@@ -230,7 +236,6 @@ class indice extends clsCadastro @@ -230,7 +236,6 @@ class indice extends clsCadastro
230 } 236 }
231 237
232 $this->mensagem = 'Exclusão não realizada.<br />'; 238 $this->mensagem = 'Exclusão não realizada.<br />';
233 - echo "<!--\nErro ao excluir clsPmieducarFaltaAtrasoCompensado\nvalores obrigatorios\nif( is_numeric( $this->cod_compensado ) && is_numeric( $this->ref_usuario_exc ) )\n-->";  
234 return FALSE; 239 return FALSE;
235 } 240 }
236 } 241 }