summaryrefslogtreecommitdiff
path: root/src/load-events.php
blob: 5fdc140198cab287d30e37a64bb56bf15eb5311a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
$events = [
    [
        'id' => 1,
        'title' => 'Évènement1',
        'start' => '2025-06-03T05:00:00Z', // Z indique que l'heure est en UTC
        'end' => '2025-06-03T09:00:00Z',
        'allDay' => false,
        'color' => '#ffa500', // couleur hexa, éviter les couleurs CSS qui ne fonctionnent pas dans value="" en HTML
    ],
    [
        'id' => 2,
        'title' => 'Évènement2',
        'start' => '2025-06-06T08:00:00Z',
        'end' => '2025-06-07T08:00:00Z',
        'allDay' => false,
        'color' => '#e01b24',
    ],
    [
        'id' => 3,
        'title' => 'Évènement3',
        'start' => '2025-06-08',
        'end' => '2025-06-09',
        'allDay' => true, // pas d'heure
        'color' => '#008000',
    ]
];

header('Content-Type: application/json');
echo json_encode($events);