resolution of some problem with vue and password

pre-master
Roxane ROSSETTO 1 year ago
parent c7e5bc60cf
commit 168f30e3ba

@ -31,4 +31,5 @@ class Validation
$age = 0; $age = 0;
} }
} }
} }

@ -19,7 +19,7 @@ class AdminModel
$lmdp = $gwArticle->login($username); $lmdp = $gwArticle->login($username);
foreach ($lmdp as $motDePasse){ foreach ($lmdp as $motDePasse){
if (true){//password_verify($mdp,$motDePasse['password']) or $mdp == $motDePasse['password']){ 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']);

@ -23,14 +23,18 @@
<button type="submit">Change number of articles</button> <button type="submit">Change number of articles</button>
</form> </form>
</div> </div>
{% for article in dVue.data %} {% if dVue.data is defined %}
<p class="caseInfo"> {% for article in dVue.data %}
<p class="caseInfo">
{{article.dateStr()}}<br> {{article.dateStr()}}<br>
<img class="img-thumbnail imgArticle" src="{{ article.getMediaContent }}"/> <img class="img-thumbnail imgArticle" src="{{ article.getMediaContent }}"/>
<a class="modal-content enTitre" href="{{ article.getLink() }}" target="_blank">{{ article.getTitle() }}</a> <a class="modal-content enTitre" href="{{ article.getLink() }}" target="_blank">{{ article.getTitle() }}</a>
{{ article.getDescription() }} {{ article.getDescription() }}
</p> </p>
{% endfor %} {% endfor %}
{% else %}
<p class="d-flex justify-content-center enTitre"> Pas d'articles à afficher</p>
{% endif %}
<script> <script>
// Actualiser la page toutes les 5 secondes // Actualiser la page toutes les 5 secondes
setTimeout(function(){ setTimeout(function(){

@ -14,17 +14,21 @@
<h1 class="d-flex justify-content-center entete">Vue des articles</h1> <h1 class="d-flex justify-content-center entete">Vue des articles</h1>
</div> </div>
<form class="margOp" method="POST" action="changeNbArticle"> <form class="margOp" method="POST" action="changeNbArticle">
<input name="nbArticle" type="number" min="0"> <input name="nbArticleAdmin" type="number" min="0">
<button type="submit">Change number of articles</button> <button type="submit">Change number of articles</button>
</form> </form>
{% for article in dVue.data %} {% if dVue.data is defined %}
{% for article in dVue.data %}
<p class="caseInfo"> <p class="caseInfo">
{{article.dateStr()}}<br> {{article.dateStr()}}<br>
<img class="imgArticle" src="{{ article.getMediaContent }}"/><br> <img class="imgArticle" src="{{ article.getMediaContent }}"/><br>
<a class="modal-content enTitre" href="{{ article.getLink() }}"target="_blank">{{ article.getTitle() }}</a> <a class="modal-content enTitre" href="{{ article.getLink() }}"target="_blank">{{ article.getTitle() }}</a>
{{ article.getDescription() }} {{ article.getDescription() }}
</p> </p>
{% endfor %} {% endfor %}
{% else %}
<p class="d-flex justify-content-center enTitre">Pas d'articles à afficher</p>
{% endif %}
<script> <script>
// Actualiser la page toutes les 5 secondes // Actualiser la page toutes les 5 secondes
setTimeout(function(){ setTimeout(function(){

@ -12,6 +12,7 @@
<div class="margOp"> <div class="margOp">
<h1 class="d-flex justify-content-center entete">Liste flux</h1> <h1 class="d-flex justify-content-center entete">Liste flux</h1>
</div> </div>
{% if dVue.data is defined %}
{% for value in dVue.data %} {% for value in dVue.data %}
<div class="margOp enTitre caseInfo"> <div class="margOp enTitre caseInfo">
{{ value.getFlux() }} {{ value.getFlux() }}
@ -21,6 +22,9 @@
</form> </form>
</div> </div>
{% endfor %} {% endfor %}
{% else %}
<p class="justify-content-center d-flex enTitre">Pas de flux présent</p>
{% endif %}
<form method="POST" action="ajoutFlux"> <form method="POST" action="ajoutFlux">
<input name="fluxAdd" type="text"> <input name="fluxAdd" type="text">
<button type="submit">Ajouter Flux</button> <button type="submit">Ajouter Flux</button>

Loading…
Cancel
Save