<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);

require_once 'config/config.php';

// Check if user is logged in
if (!isLoggedIn()) {
    header('Location: ' . BASE_URL . '/index.php?error=' . urlencode('Please login'));
    exit;
}

$active = 'dashboard';
$title = 'Dashboard';

// Include layouts
require_once 'views/layouts/header.php';
require_once 'views/layouts/sidebar.php';
require_once 'views/layouts/alerts.php';
?>

<div class="container-fluid">
    <div class="page-header">
        <h1>Test Dashboard</h1>
        <p>If you can see this with sidebar and header, layouts are working!</p>
    </div>
</div>

<?php
require_once 'views/layouts/footer.php';
?>