From 8948a0b798b9d0193cda47f481d8b2abfd38b31d Mon Sep 17 00:00:00 2001 From: dev Date: Thu, 19 Sep 2024 14:55:54 -0300 Subject: [PATCH 1/2] Corrigindo issue [#228] --- html/saude/listar_historico_pacientes.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/html/saude/listar_historico_pacientes.php b/html/saude/listar_historico_pacientes.php index ed36c77b..e4a98fc2 100644 --- a/html/saude/listar_historico_pacientes.php +++ b/html/saude/listar_historico_pacientes.php @@ -23,8 +23,9 @@ require_once($config_path); } $conexao = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); - $id_pessoa = $_SESSION['id_pessoa']; + $id_pessoa = mysqli_real_escape_string($conexao, $_SESSION['id_pessoa']); $resultado = mysqli_query($conexao, "SELECT * FROM funcionario WHERE id_pessoa=$id_pessoa"); + if(!is_null($resultado)){ $id_cargo = mysqli_fetch_array($resultado); if(!is_null($id_cargo)){ From cbb36442827b88000dc6d352cf929356f142550d Mon Sep 17 00:00:00 2001 From: dev Date: Thu, 19 Sep 2024 16:19:45 -0300 Subject: [PATCH 2/2] Corrigindo issue [#229] --- html/saude/intercorrencia_visualizar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/saude/intercorrencia_visualizar.php b/html/saude/intercorrencia_visualizar.php index 7a198c9c..852988fe 100644 --- a/html/saude/intercorrencia_visualizar.php +++ b/html/saude/intercorrencia_visualizar.php @@ -23,7 +23,7 @@ require_once '../../controle/AvisoNotificacaoControle.php'; $conexao = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); -$id_pessoa = $_SESSION['id_pessoa']; +$id_pessoa = mysqli_real_escape_string($conexao, $_SESSION['id_pessoa']); $resultado = mysqli_query($conexao, "SELECT * FROM funcionario WHERE id_pessoa=$id_pessoa"); if (!is_null($resultado)) { $id_cargo = mysqli_fetch_array($resultado);