1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Identifiants oubliés</title>
<link href="style/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="content" >
<?php
if(isset($_POST['send'])){
$forget = prepare ("SELECT `username`,`password` FROM `users` WHERE `email` = :email LIMIT 1");
$forget-> execute(array(
"email" => $_POST['email']
));
$dnn = $forget->fetchObject();
$password = rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, md5(key_encrypt), base64_decode($dnn->password), MCRYPT_MODE_CBC, md5(md5(key_encrypt))));
$message = "Identifiants :<br><br>
Pseudo : ".$dnn->pseudo."
<br>Mot de passe : ".$password;
$headers = "From: ".company_name."<".company_mail.">\n";
$headers .= "Reply-To: ".company_mail."\n";
$headers .= "Content-Type: text/html; charset=\"iso-8859-1\"";
email($_POST['email'],"Identifiants [".company_name."]",$message,$headers);
redirect('index.php');
}
?>
<h2>Identifiants oublié ?</h2>
<form action="?page=oublie" method="post" dir="ltr" lang="fr">
<p><label>Adresse mail :
<input type="email" name="email">
</label></p>
<p><input type="submit" name="send" value="Envoyer"></p>
</form>
</div>
</body>
</html> |
Partager