Atualiza estrutura MVC e integração com banco de dados

This commit is contained in:
2026-08-30 22:18:31 -03:00
parent 6231cc46a8
commit 966f6b7587
26 changed files with 3265 additions and 8 deletions
+21
View File
@@ -0,0 +1,21 @@
<?php
declare(strict_types=1);
if (session_status() !== PHP_SESSION_ACTIVE) {
session_start();
}
function usuarioAutenticado(): bool
{
return isset($_SESSION['usuario_id']);
}
function exigirLogin(): void
{
if (!usuarioAutenticado()) {
header('Location: /login.php');
exit;
}
}