37193-vm/index.php
Flatlogic Bot 01a63cbdaa 1.0
2025-12-29 07:28:15 +00:00

15 lines
338 B
PHP

<?php
// index.php - Main router
if (session_status() == PHP_SESSION_NONE) {
session_start();
}
if (isset($_SESSION['user_id'])) {
// User is logged in, redirect to the dashboard
header('Location: dashboard.php');
} else {
// User is not logged in, redirect to the login page
header('Location: login.php');
}
exit();