mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-01-07 14:22:22 +00:00
Liste des administrateurs
This commit is contained in:
parent
eb1a95c5c2
commit
3e2690d819
@ -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["^(|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["^(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-equipe$"] = ["server_files/controllers/ajouter_equipe.php"];
|
||||||
$ROUTES["^ajouter-admin$"] = ["server_files/controllers/ajouter_admin.php"];
|
$ROUTES["^ajouter-admin$"] = ["server_files/controllers/ajouter_admin.php"];
|
||||||
$ROUTES["^calendrier/(modifier)$"] = ["server_files/controllers/calendrier.php", "edit"];
|
$ROUTES["^calendrier/(modifier)$"] = ["server_files/controllers/calendrier.php", "edit"];
|
||||||
|
8
server_files/controllers/admins.php
Normal file
8
server_files/controllers/admins.php
Normal 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";
|
72
server_files/views/admins.php
Normal file
72
server_files/views/admins.php
Normal 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";
|
@ -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/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="/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="/profils-orphelins">Profils orphelins</a></li>
|
||||||
|
<li class="nav-item active"><a class="nav-link" href="/admins">Administrateurs</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item active">
|
<li class="nav-item active">
|
||||||
|
Loading…
Reference in New Issue
Block a user