mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-06-23 21:48:45 +02:00
Design inscription, connexion, calendrier
This commit is contained in:
@ -3,96 +3,64 @@ require_once "header.php";
|
||||
|
||||
if (!$has_error) {
|
||||
if (isset($recuperate_account))
|
||||
echo "<h2>Le mail de récupération de mot de passe a bien été envoyé.</h2>";
|
||||
elseif (isset($reset_password))
|
||||
echo "<h2>Le mot de passe a bien été changé. Vous pouvez désormais vous connecter.</h2>";
|
||||
echo "<div class=\"alert alert-warning\">Le mail de récupération de mot de passe a bien été envoyé.</div>";
|
||||
elseif (isset($reset_password) && isset($_POST["password"]))
|
||||
echo "<div class=\"alert alert-success\">Le mot de passe a bien été changé. Vous pouvez désormais vous connecter.</div>";
|
||||
elseif (isset($_GET["confirmation-mail"]))
|
||||
echo "<h2>Le mail a bien été renvoyé.</h2>";
|
||||
echo "<div class=\"alert alert-success\">Le mail a bien été renvoyé.</div>";
|
||||
else if (isset($logging_in_user)) {
|
||||
echo "<h2>Connexion réussie !</h2>";
|
||||
echo "<div class=\"alert alert-success\">Connexion réussie !</div>";
|
||||
require_once "footer.php";
|
||||
} else if (isset($_SESSION["user_id"])) {
|
||||
echo "<h2>Vous êtes déjà connecté.</h2>";
|
||||
echo "<div class=\"alert alert-danger\">Vous êtes déjà connecté !</div>";
|
||||
require_once "footer.php";
|
||||
}
|
||||
}
|
||||
if (isset($_GET["mdp-oublie"])) { ?>
|
||||
<form method="POST">
|
||||
<table style="width: 100%;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width: 30%;">
|
||||
<label for="email">E-mail associée au compte :</label>
|
||||
</td>
|
||||
<td style="width: 70%;">
|
||||
<input style="width: 100%;" type="email" id="email" name="email"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input style="width: 100%;" type="submit" name="forgotten_password"
|
||||
value="Envoyer l'e-mail de récupération"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
if (isset($_GET["mdp_oublie"])) { ?>
|
||||
<form method="POST" class="jumbotron mt-5">
|
||||
<h1 class="display-4">Réinitialisation du mot de passe</h1>
|
||||
<label for="email">E-mail associée au compte :</label>
|
||||
<input type="email" class="form-control" id="email" name="email"/>
|
||||
<input class="btn btn-lg btn-primary btn-block" type="submit" name="forgotten_password"
|
||||
value="Envoyer l'e-mail de récupération"/>
|
||||
</form>
|
||||
<?php } elseif (isset($_GET["reset_password"])) {
|
||||
if ($reset_password->user != null) { ?>
|
||||
<form method="POST">
|
||||
<table style="width: 100%;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width: 30%;">
|
||||
<label for="password">Nouveau mot de passe :</label>
|
||||
</td>
|
||||
<td style="width: 70%;">
|
||||
<input style="width: 100%;" type="password" id="password" name="password"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 30%;">
|
||||
<label for="confirm_password">Confirmer le mot de passe :</label>
|
||||
</td>
|
||||
<td style="width: 70%;">
|
||||
<input style="width: 100%;" type="password" id="confirm_password" name="confirm_password"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input style="width: 100%;" type="submit" name="reset_password"
|
||||
value="Changer le mot de passe"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<?php }
|
||||
} elseif (isset($_GET["confirmation-mail"])) { ?>
|
||||
<?php } elseif (isset($reset_password) && $reset_password->user != null && ($has_error || !isset($_POST["password"]))) { ?>
|
||||
<form method="POST" class="jumbotron mt-5">
|
||||
<h1 class="display-4">Connexion</h1>
|
||||
<input type="hidden" name="token" value="<?= $_GET["token"] ?>"/>
|
||||
<div class="form-group">
|
||||
<label for="password">Nouveau mot de passe :</label>
|
||||
<input type="password" id="password" name="password" class="form-control"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="confirm_password">Confirmer le mot de passe :</label>
|
||||
<input type="password" id="confirm_password" name="confirm_password" class="form-control"/>
|
||||
</div>
|
||||
<input type="submit" name="reset_password" class="btn btn-block btn-primary"
|
||||
value="Changer le mot de passe"/>
|
||||
</form>
|
||||
<?php } elseif (isset($_GET["confirmation-mail"])) { ?>
|
||||
<?php } else { ?>
|
||||
<form method="POST">
|
||||
<form method="POST" class="jumbotron mt-5">
|
||||
<h1 class="display-4">Connexion</h1>
|
||||
<hr class="mt-2 mb-4"/>
|
||||
<input type="hidden" name="submitted" value="true"/>
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td style="width: 30%;"><label for="email">E-mail :</label></td>
|
||||
<td style="width: 70%;"><input style="width: 100%;" type="email" id="email" name="email"
|
||||
value="<?php if (isset($email)) echo $email ?>"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="password">Mot de passe :</label></td>
|
||||
<td><input style="width: 100%;" type="password" id="password" name="password"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<!--suppress HtmlUnknownTarget -->
|
||||
<a href="/connexion/mdp-oublie">Mot de passe oublié ?</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><input style="width: 100%;" type="submit" value="Se connecter"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="form-group">
|
||||
<label for="email">E-mail :</label>
|
||||
<input class="form-control" type="email" id="email" name="email"
|
||||
value="<?php if (isset($email)) echo $email ?>"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password">Mot de passe :</label>
|
||||
<input class="form-control" type="password" id="password" name="password"/>
|
||||
</div>
|
||||
<input class="btn btn-primary btn-block" type="submit" value="Se connecter"/>
|
||||
</form>
|
||||
<div class="alert">
|
||||
<!--suppress HtmlUnknownTarget -->
|
||||
<a href="/connexion/mdp-oublie">Mot de passe oublié ?</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php require_once "footer.php" ?>
|
||||
<?php require_once "footer.php" ?>
|
||||
|
Reference in New Issue
Block a user