Compare commits

..

No commits in common. 'master' and 'pre-master' have entirely different histories.

@ -3,7 +3,7 @@ namespace controleur;
use model\ArticleModel; use model\ArticleModel;
class erControleur class UserControleur
{ {
public function __construct() public function __construct()
{ {

@ -21,7 +21,7 @@ class AdminModel
} }
if(Validation::validationMdp($mdp)){ if(Validation::validationMdp($mdp)){
foreach ($lmdp as $motDePasse){ foreach ($lmdp as $motDePasse){
if (password_verify($mdp,$motDePasse['password']) or $mdp == $motDePasse['password']){ //Si ajout d'admin on créer avec password_hash(string $mdp) if (password_verify($mdp,$motDePasse['password']) or $mdp == $motDePasse['password']){
$_SESSION['role'] = 'admin'; $_SESSION['role'] = 'admin';
$_SESSION['pseudo'] = $username; $_SESSION['pseudo'] = $username;
return new Admin($username,$motDePasse['mail']); return new Admin($username,$motDePasse['mail']);

@ -51,3 +51,12 @@
</div> </div>
</body> </body>
</html> </html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login</title>
</head>
<body>

@ -36,10 +36,11 @@
<p class="d-flex justify-content-center enTitre"> Pas d'articles à afficher</p> <p class="d-flex justify-content-center enTitre"> Pas d'articles à afficher</p>
{% endif %} {% endif %}
<script> <script>
// Actualiser la page toutes les 3 heures // Actualiser la page toutes les 5 secondes
setTimeout(function(){ setTimeout(function(){
location.reload(); location.reload();
}, 10800000); }, 50000000);
</script> </script>
</body> </body>
</html> </html>

@ -30,10 +30,10 @@
<p class="d-flex justify-content-center enTitre">Pas d'articles à afficher</p> <p class="d-flex justify-content-center enTitre">Pas d'articles à afficher</p>
{% endif %} {% endif %}
<script> <script>
// Actualiser la page toutes les 3 heures // Actualiser la page toutes les 5 secondes
setTimeout(function(){ setTimeout(function(){
location.reload(); location.reload();
}, 10800000); }, 50000);
</script> </script>
</body> </body>
</html> </html>
Loading…
Cancel
Save