Commit 7531d8a73863fae063248e1d74d10e227f8f4321

Authored by Leandro Arndt
1 parent 8a654980
Exists in mysqli

mysqli

inc/lkpcep.php
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 //include("../inc/autenticar.php"); 11 //include("../inc/autenticar.php");
12 include("../inc/security.php"); 12 include("../inc/security.php");
13 13
14 - $q = $_REQUEST['q']; 14 + $q = DB::esc($_REQUEST['q']);
15 15
16 $sql = "select cep, logradouro, bairro, cidade as municipio, uf as estado 16 $sql = "select cep, logradouro, bairro, cidade as municipio, uf as estado
17 from vw_cep 17 from vw_cep
@@ -20,9 +20,9 @@ @@ -20,9 +20,9 @@
20 and uf = 'RN' 20 and uf = 'RN'
21 limit 0,10"; 21 limit 0,10";
22 22
23 - $resultado = execQuery($sql); 23 + $resultado = DB::execQuery($sql);
24 $codigos = ""; 24 $codigos = "";
25 - while ($row = mysql_fetch_array($resultado)){ 25 + while ($row = mysqli_fetch_array($resultado)){
26 26
27 $codigos .= '"'.$row['cep'].'",' ; 27 $codigos .= '"'.$row['cep'].'",' ;
28 $nomes .= '"'.htmlentities($row['logradouro']).' - '.htmlentities($row['bairro']).', '.htmlentities($row['municipio']).'/'.$row['estado'].'",' ; 28 $nomes .= '"'.htmlentities($row['logradouro']).' - '.htmlentities($row['bairro']).', '.htmlentities($row['municipio']).'/'.$row['estado'].'",' ;
inc/security.php
@@ -74,8 +74,8 @@ function PHPMailerSendMail($to, $subject, $body, $from="", $fromname=""){ @@ -74,8 +74,8 @@ function PHPMailerSendMail($to, $subject, $body, $from="", $fromname=""){
74 } 74 }
75 if(empty($from)){ 75 if(empty($from)){
76 $sql = "SELECT nomeremetenteemail, emailremetente FROM lda_configuracao"; 76 $sql = "SELECT nomeremetenteemail, emailremetente FROM lda_configuracao";
77 - $rs = execQuery($sql);  
78 - $row = mysql_fetch_array($rs); 77 + $rs = DB::execQuery($sql);
  78 + $row = mysqli_fetch_array($rs);
79 $mail->From = $row['emailremetente']; 79 $mail->From = $row['emailremetente'];
80 $mail->FromName = $row['nomeremetenteemail']; 80 $mail->FromName = $row['nomeremetenteemail'];
81 }else{ 81 }else{
restrito/inc/security.php
@@ -74,8 +74,8 @@ function PHPMailerSendMail($to, $subject, $body, $from="", $fromname=""){ @@ -74,8 +74,8 @@ function PHPMailerSendMail($to, $subject, $body, $from="", $fromname=""){
74 } 74 }
75 if(empty($from)){ 75 if(empty($from)){
76 $sql = "SELECT nomeremetenteemail, emailremetente FROM lda_configuracao"; 76 $sql = "SELECT nomeremetenteemail, emailremetente FROM lda_configuracao";
77 - $rs = execQuery($sql);  
78 - $row = mysql_fetch_array($rs); 77 + $rs = DB::execQuery($sql);
  78 + $row = mysqli_fetch_array($rs);
79 $mail->From = $row['emailremetente']; 79 $mail->From = $row['emailremetente'];
80 $mail->FromName = $row['nomeremetenteemail']; 80 $mail->FromName = $row['nomeremetenteemail'];
81 }else{ 81 }else{