<?php
require_once 'config/config.php';
require_once 'controllers/RoomPlanningController.php';

// Vérifier l'authentification
if (!isLoggedIn()) {
    redirect(getBaseUrl() . '/login.php');
}

// Vérifier les permissions
if (!hasPermission('reservations')) {
    redirect(getBaseUrl() . '/dashboard.php');
}

$controller = new RoomPlanningController();

// Router les actions
$action = $_GET['action'] ?? 'index';

switch ($action) {
    case 'index':
    default:
        $controller->index();
        break;
}
?>

