include('cabecera.php'); ?>
echo "";
$msg_pidemail_info="Please enter your e-mail. If you are a registered user, your password will be sent to your e-mail.";
$msg_pidemail="E-mail";
?>
require("".$Master["ruta"]."menuhead.inc.php"); ?>
echo $Application["g_NombreMaster"]; ?> - Zona restringida - Password recovery system
require("".$Master["ruta"]."iniciomenu.inc.php"); ?>
titulo("Area de trabajo - Password recovery page");?>
if (isset($e))
{
$result = mysql_query("SELECT nick,nombre,email,clavelimpia FROM usuarios WHERE email='$e'", $conexion);
if ($datos = mysql_fetch_array($result))
{
$to = $datos["email"];
$subject = "[OBETS] Automatic password recovery system";
$remitente = "Webmaster";
$EmailRemitente = "oscar.santacreu@ua.es";
$mensaje = "Your access data:\n\n User: ".$datos["nick"]."\n Password: ".$datos["clavelimpia"]."\n\nPlease remove this message as soon as possible due to security reasons.";
$message = "$mensaje\n\n============\nMessage from ".$Master["Nombre"].".\n".$Master["web"]."\n";
$headers = "From: $remitente <$EmailRemitente>\nReply-To: $EmailRemitente\n";
// Envío del mensaje
if (mail($to, $subject, $message, $headers))
{
// Ha funcionado
print "
Hi, ".$datos["nombre"].". Nice to see you :-)
Your password has been sent to ".$datos["email"].".
";
}
else
{
// No ha funcionado
print "
ERROR - Your password cannot be send to ".$datos["email"].". Please contact to webmaster
";
}
} else {
echo "
:-(
Sorry, the supplied e-mail is not in our database. Maybe you misspelled it?