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 45 46 47 48 49 50 51 52 53 54 55 56 57 58
| if(isset($_REQUEST['send_email']) and $_REQUEST['send_email'] == 1)
{
$str_sql = "select * from tbl_user where email='".$_REQUEST['email']."'";
$result = $db->sql_query($str_sql);
$row = $db->sql_fetchrow($result);
if($db->sql_numrows($result) > 0)
{
$str_sql = "select admin_email_id from tbl_admin";
$admin_res = $db->sql_query($str_sql);
$admin_row = $db->sql_fetchrow($admin_res);
$to = $_REQUEST['email'];
$subject = 'Mot de passe oublié';
$from = $admin_row['admin_email_id'];
$message ="Bonjour,\n";
$message .="Vous nous avez demandé de vous envoyer votre mot de passe :\n\n";
$message .="<strong>Votre mot de passe :</strong> ".$row['password']."\n\n";
$message .="Vous pouvez modifier votre mot de passe en vous connectant à <strong>Mon Imobile</strong> dans » Mon profil \n\n";
$mail_suc = $util->send_mail($to, $from, $subject, $message);
$msg1 = "Votre mot de passe a été envoyé à votre adresse e-mail. <a href=\"index.php\">Cliquez ici</a> pour vous connecter";
}
else
{
$msg1 = "Vous n'êtes pas enregistré dans notre base de données.";
}
}
?>
<?php
</script>
<h1>Mot de passe oublié ?</h1><br>
<form name="forgotpassword_frm" method="post" action="forgotpass.php">
<table width="100%" cellpadding="0" cellspacing="4" border="0">
<?php if (isset($msg1)) { ?>
<tr>
<td colspan="2" align="center"><?php echo $msg1?></td>
</tr>
<?php } ?>
<tr>
<td align="right"> </td>
<td align="left"> </td>
</tr>
<tr>
<td width="44%" align="right" nowrap>Entrez votre adresse e-mail :</td>
<td width="56%" align="left" nowrap><input type="text" name="email"></td>
</tr>
<tr><td colspan="2"> </td></tr>
<tr>
<td> </td>
<td align="left" nowrap>
<input type="hidden" name="send_email" value="1">
<input name="submit" type="submit" onclick="javascript: return check_fill();" value=" OK "> </td>
</tr>
</table>
</form>
</td>
<td id="droite"> |
Partager