blob: 89e0c43885ffafa1e947dfc6d377b6dd9af59d29 (
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
<?php
$title = "Fichiers partagés";
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/header.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/navigation.php";
?>
<div class="container">
<br>
<h2>Cours</h2>
<div class="dropdown" style="margin-bottom: 10px;">
<button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown">
Devoirs
</button>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="/timetable">Emploi du temps</a></li>
<li><a class="dropdown-item" href="/content">Contenus</a></li>
<li><a class="dropdown-item" href="/homework">Devoirs</a></li>
<li><a class="dropdown-item disabled" href="#">Fichiers</a></li>
</ul>
</div>
<table>
<?php $index = 1; foreach (data_files()["data"]["files"] as $file): ?>
<tr>
<td style="text-align:right;"><b><?= getSubject($file["subject"]) ?></b></td>
<td> · </td>
<td><a target="_blank" href="<?= $file['url'] ?>"><?= $file["name"] ?? "[Lien $index]" ?></a></td>
<td> · </td>
<td>déposé le <?php
$fmt = new \IntlDateFormatter('fr_FR');
$fmt->setPattern('d MMMM yyyy');
echo $fmt->format(new \DateTime(date("c", ($file["time"] + 7200000) / 1000)));
?></td>
</tr>
<?php $index++; endforeach; ?>
</table>
</div>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/footer.php"; ?>
|