Commit 33c34751eb4e72fdf54d9cb1c1564464f4478cd9
1 parent
13386191
Exists in
mysqli
Classe DB
Showing
2 changed files
with
8 additions
and
7 deletions
Show diff stats
restrito/sis_param/manutencao.php
@@ -8,6 +8,7 @@ | @@ -8,6 +8,7 @@ | ||
8 | modificá-lo sob os termos da Licença GPL2. | 8 | modificá-lo sob os termos da Licença GPL2. |
9 | ***********************************************************************************/ | 9 | ***********************************************************************************/ |
10 | 10 | ||
11 | + include_once(DIR_CLASSES_LEIACESSO."/db.class.php"); | ||
11 | include_once("../inc/autenticar.php"); | 12 | include_once("../inc/autenticar.php"); |
12 | checkPerm("LSTPARAM"); | 13 | checkPerm("LSTPARAM"); |
13 | 14 |
restrito/sis_secretaria/index.php
@@ -17,11 +17,11 @@ include("../inc/paginacaoPorPostIni.php"); | @@ -17,11 +17,11 @@ include("../inc/paginacaoPorPostIni.php"); | ||
17 | $filtro = ""; | 17 | $filtro = ""; |
18 | if (($_REQUEST['acao'])) | 18 | if (($_REQUEST['acao'])) |
19 | { | 19 | { |
20 | - $nome = $_REQUEST["nome"]; | ||
21 | - $sigla = $_REQUEST["sigla"]; | ||
22 | - $ativado = $_REQUEST["ativado"]; | 20 | + $nome = DB::esc($_REQUEST["nome"]); |
21 | + $sigla = DB::esc($_REQUEST["sigla"]); | ||
22 | + $ativado = DB::esc($_REQUEST["ativado"]); | ||
23 | 23 | ||
24 | - if(!empty($nome)) $filtro.= " and s.nome like '%$nome%'"; | 24 | + if(!empty($nome)) $filtro.= " and s.nome like '%$nome)%'"; |
25 | if(!empty($sigla)) $filtro.= " and s.sigla like '%$sigla%'"; | 25 | if(!empty($sigla)) $filtro.= " and s.sigla like '%$sigla%'"; |
26 | if(!empty($ativado)) $filtro.= " and s.ativado = $ativado"; | 26 | if(!empty($ativado)) $filtro.= " and s.ativado = $ativado"; |
27 | } | 27 | } |
@@ -32,9 +32,9 @@ $sql = "select * from sis_secretaria s | @@ -32,9 +32,9 @@ $sql = "select * from sis_secretaria s | ||
32 | order by s.nome"; | 32 | order by s.nome"; |
33 | 33 | ||
34 | 34 | ||
35 | -$resultado = execQueryPag($sql); | 35 | +$resultado = DB::execQueryPag($sql); |
36 | 36 | ||
37 | -$num = mysql_num_rows($resultado); | 37 | +$num = mysqli_num_rows($resultado); |
38 | 38 | ||
39 | ?> | 39 | ?> |
40 | <h1>Cadastro de SIC's</h1> | 40 | <h1>Cadastro de SIC's</h1> |
@@ -84,7 +84,7 @@ $num = mysql_num_rows($resultado); | @@ -84,7 +84,7 @@ $num = mysql_num_rows($resultado); | ||
84 | </tr> | 84 | </tr> |
85 | <?php | 85 | <?php |
86 | $cor = false; | 86 | $cor = false; |
87 | - while($registro = mysql_fetch_array($resultado)){ | 87 | + while($registro = mysqli_fetch_array($resultado)){ |
88 | $click = "editar('".$registro["idsecretaria"]."')"; | 88 | $click = "editar('".$registro["idsecretaria"]."')"; |
89 | if($cor) | 89 | if($cor) |
90 | $corLinha = "#dddddd"; | 90 | $corLinha = "#dddddd"; |