<?php
require_once 'config/database.php';

if (isLoggedIn()) {
    if ($_SESSION['user_role'] === 'ADMIN') {
        header("Location: admin/dashboard.php");
    } else {
        header("Location: asesor/index.php");
    }
    exit;
} else {
    header("Location: login.php");
    exit;
}
