<?php $bd = new Mypdo(); $manager = new PersonneManager($bd); if (!empty($_GET["num"])) { $log = $manager->getLoginPersonne($_GET["num"])->per_login; $nom = $manager->getNomPersonne($log)->per_nom; $prenom = $manager->getPrenomPersonne($log)->per_prenom; $decrypt = Chiffrement::decrypt($manager->getPwdPersonne($log)->per_pwd); echo '<h1>Info sur l\'élève ' . $prenom . ' ' . $nom . '</h1>'; ?> <table align="center"> <tr> <th>nom</th><th>Prénom</th><th>Mot de passe</th> </tr> <tr> <?php echo '<td>' . $nom . '</td><td>' . $prenom . '</td><td>' . $decrypt . '</td>'; ?> </tr> </table> <br/><br/><a href="?page=6" ><b>Retour</b></a><br/><br/> <?php }
<div class="row"> <div class="col s10 offset-s2"> <table id="tableau" class="bordered highlight"> <thead> <tr> <th>Libelle</th> <th>Mot de passe</th> <th>Actions</th> </tr> </thead> <tbody> <?php foreach (Modele::recupererMotsDePassesDe($_SESSION['chiffree']['email']) as $ligne) { echo '<tr>'; echo '<td>' . Chiffrement::dechiffrer($ligne['libelle']) . '</td>'; echo '<td><input type="password" value="' . Chiffrement::dechiffrer($ligne['valeur']) . '" disabled/></td>'; echo ' <td> <a class="waves-effect waves-light btn-floating blue visibility"><i class="material-icons right">visibility</i></a> <a class="waves-effect waves-light btn-floating red accent-4" href="/action?delete=' . $ligne['id'] . '"><i class="material-icons right">delete</i></a> </td>'; echo '</tr>'; } ?> </tbody> </table> </div> </div> <script src="lib/jquery/jquery-2.1.4.min.js"></script> <script src="lib/materialize/js/materialize.min.js"></script>
public static function ajouterMotDePasse($donnees) { Modele::ajouterMotDePasse($_SESSION['id'], Chiffrement::chiffrer($donnees['libelle']), Chiffrement::chiffrer($donnees['motDePasse'])); self::redirigerVers('/administrer'); }