Compare commits

...

6 Commits

@ -3,7 +3,7 @@ namespace controleur;
use model\ArticleModel; use model\ArticleModel;
class UserControleur class erControleur
{ {
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']){ if (password_verify($mdp,$motDePasse['password']) or $mdp == $motDePasse['password']){ //Si ajout d'admin on créer avec password_hash(string $mdp)
$_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,12 +51,3 @@
</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,11 +36,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 5 secondes // Actualiser la page toutes les 3 heures
setTimeout(function(){ setTimeout(function(){
location.reload(); location.reload();
}, 50000000); }, 10800000);
</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 5 secondes // Actualiser la page toutes les 3 heures
setTimeout(function(){ setTimeout(function(){
location.reload(); location.reload();
}, 50000); }, 10800000);
</script> </script>
</body> </body>
</html> </html>
Loading…
Cancel
Save