mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-06-26 00:27:29 +02:00
Possibilité d'ajout d'un administrateur
This commit is contained in:
49
server_files/views/ajouter_admin.php
Normal file
49
server_files/views/ajouter_admin.php
Normal file
@ -0,0 +1,49 @@
|
||||
<?php
|
||||
require_once "header.php";
|
||||
|
||||
if (isset($admin)) {
|
||||
if ($has_error) {
|
||||
echo "<h2>Erreur : " . $error_message . "</h2>";
|
||||
} else {
|
||||
echo "<h2>Organisateur ajouté avec succès ! Ses identifiants ont été transmis par mail.</h2>";
|
||||
}
|
||||
} ?>
|
||||
|
||||
<form method="POST">
|
||||
<input type="hidden" name="submitted" value="true"/>
|
||||
<table style="width: 100%;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width: 30%;">
|
||||
<label for="surname">Nom :</label>
|
||||
</td>
|
||||
<td style="width: 70%;">
|
||||
<input style="width: 100%;" type="text" id="surname" name="surname"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="first_name">Prénom :</label>
|
||||
</td>
|
||||
<td>
|
||||
<input style="width: 100%;" type="text" id="first_name" name="first_name"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="email">Email :</label>
|
||||
</td>
|
||||
<td>
|
||||
<input style="width: 100%;" type="email" id="email" name="email"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input style="width: 100%;" type="submit" value="Ajouter un administrateur"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<?php require_once "footer.php" ?>
|
@ -42,6 +42,7 @@
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if ($_SESSION["role"] == Role::ADMIN) { ?>
|
||||
<li><a href="<?= $URL_BASE ?>/ajouter_admin">Ajouter un administrateur</a></li>
|
||||
<?php } ?>
|
||||
<li><a href="<?= $URL_BASE ?>/deconnexion">Déconnexion</a></li>
|
||||
<hr />
|
||||
|
Reference in New Issue
Block a user