<?php
session_start();

$pagina_atual = basename($_SERVER['PHP_SELF']);

if ($pagina_atual !== 'login.php' && (!isset($_SESSION['logado']) || $_SESSION['logado'] !== true)) {
    header('Location: login.php');
    exit;
}
