1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-01-06 00:22:21 +00:00

Liste des administrateurs

This commit is contained in:
Yohann 2019-10-23 12:17:17 +02:00
parent eb1a95c5c2
commit 3e2690d819
4 changed files with 82 additions and 0 deletions

View File

@ -29,6 +29,7 @@ $ROUTES = [];
$ROUTES["^(|accueil|index|accueil\.php|accueil\.html|accueil\.py|index\.php|index\.html|index\.py)/?$"] = ["server_files/controllers/index.php"];
$ROUTES["^(modifier-page)$"] = ["server_files/controllers/index.php", "edit"];
$ROUTES["^admins$"] = ["server_files/controllers/admins.php"];
$ROUTES["^ajouter-equipe$"] = ["server_files/controllers/ajouter_equipe.php"];
$ROUTES["^ajouter-admin$"] = ["server_files/controllers/ajouter_admin.php"];
$ROUTES["^calendrier/(modifier)$"] = ["server_files/controllers/calendrier.php", "edit"];

View File

@ -0,0 +1,8 @@
<?php
if ($_SESSION["role"] != Role::ADMIN)
require_once "server_files/403.php";
$admins = User::getAdmins();
require_once "server_files/views/admins.php";

View File

@ -0,0 +1,72 @@
<?php
require_once "header.php";
?>
<div class="mt-4 mb-4">
<h1 class="display-4">Liste des administrateurs</h1>
</div>
<hr />
<table class="table table-striped table-bordered table-hover">
<thead>
<tr>
<th scope="col">
Nom
</th>
<th scope="col">
Prénom
</th>
<th scope="col">
Adresse e-mail
</th>
</tr>
</thead>
<tbody>
<?php
/** @var User $admin */
foreach ($admins as $admin) {
?>
<tr>
<td>
<a href="/informations/<?= $admin->getId() ?>/<?= $admin->getFirstName() . " " . $admin->getSurname() ?>">
<?= $admin->getSurname() ?>
</a>
</td>
<td>
<a href="/informations/<?= $admin->getId() ?>/<?= $admin->getFirstName() . " " . $admin->getSurname() ?>">
<?= $admin->getFirstName() ?>
</a>
</td>
<td>
<a href="mailto:<?= $admin->getEmail() ?>">
<?= $admin->getEmail() ?>
</a>
</td>
</tr>
<?php
}
?>
</tbody>
<tfoot>
<tr>
<th>
Nom
</th>
<th>
Prénom
</th>
<th>
Date d'inscription
</th>
<?php if ($problem > 0) { ?>
<th>
Adresse e-mail
</th>
<?php } ?>
</tr>
</tfoot>
</table>
<?php
require_once "footer.php";

View File

@ -80,6 +80,7 @@
<li class="nav-item active"><a class="nav-link" href="/probleme/4">Problème 4</a></li>
<li class="nav-item active"><a class="nav-link" href="/probleme/0">Équipes sans problème</a></li>
<li class="nav-item active"><a class="nav-link" href="/profils-orphelins">Profils orphelins</a></li>
<li class="nav-item active"><a class="nav-link" href="/admins">Administrateurs</a></li>
</ul>
</li>
<li class="nav-item active">