From 83d5ab8d0fba117739cc665f100441755834f4fd Mon Sep 17 00:00:00 2001 From: Iagooalmeida Date: Thu, 7 Dec 2023 16:41:43 -0300 Subject: [PATCH] =?UTF-8?q?adcionando=20permiss=C3=A3o=20acesso?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Views/listarVisitante.php | 4 ++++ gerenciarTema.php | 8 +++++++- gerenciarUsuario.php | 32 +++++++++++++++++++++++++++++--- painelAdmin.php | 6 +++++- 4 files changed, 45 insertions(+), 5 deletions(-) diff --git a/Views/listarVisitante.php b/Views/listarVisitante.php index 4e7c602..8c88643 100644 --- a/Views/listarVisitante.php +++ b/Views/listarVisitante.php @@ -9,6 +9,8 @@ header("Location: login/login.html"); exit(); } +// Regenerar o ID da sessão após a autenticação para maior segurança +session_regenerate_id(); $sugestao = new Sugestoes($conn); $totalRegistros = $sugestao->contarSugestoes(); @@ -148,5 +150,7 @@ + + \ No newline at end of file diff --git a/gerenciarTema.php b/gerenciarTema.php index 850a48d..a35822b 100644 --- a/gerenciarTema.php +++ b/gerenciarTema.php @@ -10,6 +10,9 @@ header("Location: login/login.html"); exit(); } +// Regenerar o ID da sessão após a autenticação para maior segurança +session_regenerate_id(); + // Cria uma instância da classe Usuario $tema = new Temas($conn); @@ -136,7 +139,7 @@ function fecharEditarModal() {
- +
@@ -209,6 +212,9 @@ function fecharEditarModal() { + + + \ No newline at end of file diff --git a/gerenciarUsuario.php b/gerenciarUsuario.php index cc80e55..2a17538 100644 --- a/gerenciarUsuario.php +++ b/gerenciarUsuario.php @@ -10,6 +10,11 @@ header("Location: login/login.html"); exit(); } +// Regenerar o ID da sessão após a autenticação para maior segurança +session_regenerate_id(); + +$idUsuarioSessao = $_SESSION['idUsuario']; +$nivelAcessoSessao = $_SESSION['nivelAcesso']; // Cria uma instância da classe Usuario $usuario = new Usuario($conn); @@ -80,7 +85,7 @@
- +
@@ -119,8 +124,25 @@ - - + + + + +
@@ -141,5 +163,9 @@ + + + + \ No newline at end of file diff --git a/painelAdmin.php b/painelAdmin.php index 457bac1..82f025c 100644 --- a/painelAdmin.php +++ b/painelAdmin.php @@ -14,6 +14,9 @@ header("Location: login/login.html"); exit(); } +// Regenerar o ID da sessão após a autenticação para maior segurança +session_regenerate_id(); + $pergunta = new Perguntas($conn); $perguntas = $pergunta->listarPerguntas(); @@ -85,7 +88,6 @@ function drawChart() { }, }, chartArea: { - //right: '20%', // Margem à esquerda top: '15%', // Margem superior width: '100%', // Largura da área do gráfico height: '900%', // Altura da área do gráfico @@ -323,6 +325,8 @@ function drawChart() { + + \ No newline at end of file