Commit 59f1a38720429712fdef7f56ab406c6bb0322f71

Authored by Edmar Moretti
1 parent 70d14fc7

--no commit message

Showing 1 changed file with 6 additions and 3 deletions   Show diff stats
ferramentas/parametrossql/exec.php
... ... @@ -30,13 +30,16 @@ Aplica a substituicao de chaves pelos valores enviados
30 30 else{
31 31 $layer->setmetadata("FILTROORIGINAL",$filtro);
32 32 }
  33 + $chaves = str_ireplace(array("and", "or", "select","from","where","update","delete","insert","--"),"",$chaves);
33 34 $chaves = explode(",",$chaves);
34   - $valores = explode(",",$valores);
  35 + $valores = str_ireplace(array("and", "or", "select","from","where","update","delete","insert","--"),"",$valores);
  36 + $valores = explode(",",strip_tags($valores));
35 37 $n = count($chaves);
36 38 for($i = 0; $i < $n; $i++){
37   - $data = str_replace($chaves[$i],$valores[$i],$data);
  39 + $v = $valores[$i];
  40 + $data = str_replace($chaves[$i],$v,$data);
38 41 if($filtro != ""){
39   - $filtro = str_replace($chaves[$i],$valores[$i],$filtro);
  42 + $filtro = str_replace($chaves[$i],$v,$filtro);
40 43 }
41 44 }
42 45 if($filtro != ""){
... ...