- <?php
- // Shared session auth guard — include at the top of every protected HTML page.
- if (session_status() === PHP_SESSION_NONE) session_start();
- if (empty($_SESSION['pl_authed'])) {
- $next = $_SERVER['REQUEST_URI'] ?? '/';
- header('Location: /login.php?next=' . urlencode($next));
- exit;
- }
|