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 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
| <?php
include("header.inc.php");
$tmpself=$_SERVER["PHP_SELF"];
$tab_tmpself=split('/',$tmpself);
$selfurl='http://'.$_SERVER["SERVER_NAME"].ereg_replace($tab_tmpself[(count($tab_tmpself)-1)],'',$tmpself);
if ($_POST["submit_mdp"])
{
$email=trim($_POST["email2"]);
if ($email=='')
{
?>
<script type="text/javascript">
alert('Veuillez renseigner votre adresse email !');
</script>
<?php
}
else
{
$qexists = mysql_query("SELECT count(*) as nb FROM users WHERE email='$email'");
$rexists = mysql_fetch_assoc($qexists);
if ((int) $rexists['nb']==0)
{
?>
<script type="text/javascript">
alert('Cette adresse email n\'est associée à aucun compte !');
</script>
<?php
}
else
{
$qexists = mysql_query("SELECT * as nb FROM users WHERE email='$email'");
$rexists = mysql_fetch_assoc($qexists);
$sujet="Youresto.com - Votre mot de passe";
$msg="Votre demande de mot de passe a bien été enregistrée, retrouvez ci-dessous vos identifiants: <br /><br />Compte: ".$email."<br />Mot de passe: ".$rexists["pwd"]."<br /><br />Vous pouvez vous connecter à votre compte en cliquant <a href=\"www.youresto.com/identification.php\">ici</a><br /><br />Cordialement,<br /><br />L'equipe Youresto.com.";
$entete = "MIME-Version: 1.0\r\n";
$entete .= "Content-type: text/html; charset=iso-8859-1\r\n";
$entete .= "From: youResto@".$ip.".com\r\n";
mail($email,$sujet,$msg,$entete);
?>
<script type="text/javascript">
alert('Votre demande de mot de passe a bien été enregistrée. Un email contenant votre mot de passe vous a été envoyé.');
</script>
<?php
}
}
}
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>YouResto.com - Inscription</title>
<link rel="stylesheet" type="text/css" href="css/main-style.css"/>
<link rel="stylesheet" type="text/css" href="css/mobile-style.css"/>
<link rel="stylesheet" type="text/css" href="js_scripts/jquery.fancybox/jquery.fancybox.css" media="screen" />
<script type="text/javascript" src="js_scripts/jquery.fancybox/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js_scripts/jquery.fancybox/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="js_scripts/jquery.fancybox/jquery.fancybox-1.2.1.pack.js"></script>
<script type="text/javascript">
$(document).ready(function()
{
$("a.inline").fancybox();
$("a.inline").fancybox({ 'hideOnContentClick': false });
});
</script>
</head>
<body>
<div id="cadre_principal">
<div id="header"><? include("headerhtml.inc.php"); ?></div>
<div class="top-bar white"><h2><a href="http://youresto.com">youresto.com </a><span class="right">acceder à votre compte</span></h2></div>
<div class="medium right ">
<h2 class="bloc2">Identification</h2>
<form name="form_resto" action="#" method="post">
<h3>Me connecter</h3><hr>
<p class="button"><strong>Email:</strong></p>
<span ><input class="input-search" type="text" name="email" value="<?=htmlentities(stripslashes($_POST["email"]));?>"/></span>
<div class="clear"></div>
<p class="button"><strong>Mot de passe:</strong></p>
<span ><input class="input-search" type="password" name="pwd" value=""/></span>
<p class="title-xs"><a class="inline" href="#mdp_oublie">Mot de passe oublié ?</a></p>
<p><br /><input type="submit" name="submit_identification" value="Go!" style="color: white; background: none
repeat scroll 0% 0% rgb(0, 155, 119);
font-weight: bold; text-decoration:
none; font-size: 50px; padding: 3px
15px;margin-top:4px;width:98%; "/></p>
</form><br>
</div>
<div style="display:none" id="mdp_oublie">
<form name="form_mdp" action="#" method="post">
<div class="popupf" style="height:450px;">
<h2 style="font-size:13px; padding-bottom:10px;"><strong>Vous avez perdu votre mot de passe</strong></h2>
<p class="title-xs">Afin de retrouver votre mot de passe, renseignez ci-dessous votre adresse email utilisée lors de votre inscription sur youresto.com:</p>
<h4><strong>Email</strong></h4>
<p style="padding-bottom:15px"><strong><input type="text" name="email2" id="email2" style="width:200px; border:1px solid #AAAAAA;"/></strong></p>
<p><input type="submit" value="Valider ma demande" name="submit_mdp" id="email2"/></p>
</div>
</form>
</div>
</div>
</body>
</html> |
Partager