Belépés"; include("frame-header.php"); if(isset($_POST["pass-reminder"])) { $email = trim($_POST["field"]); $sql = "SELECT id, name_first, name_last FROM user WHERE email='" . $email . "'"; $mysql_query = mysql_query($sql); while($line = mysql_fetch_array($mysql_query)) { $userid = $line["id"]; $username = ucwords($line["name_first"] . " " . $line["name_last"]); } if($userid != "") { $name = $username; $mail = $email; $subject = "Jelszo kerese"; $html = "email/password.html"; $open = fopen($html, "r"); $size = filesize($html); $message = fread($open, $size); // DATA function generateRandomString($length = 10) { $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $charactersLength = strlen($characters); $randomString = ''; for ($i = 0; $i < $length; $i++) { $randomString .= $characters[rand(0, $charactersLength - 1)]; } return $randomString; } $newPass = generateRandomString(); $sql = "UPDATE user SET password='" . sha1($newPass) . "' WHERE id='$userid'"; mysql_query($sql); $message = str_replace("[name]", $name, $message); $message = str_replace("[mail]", $mail, $message); $message = str_replace("[pass]", $newPass, $message); $message = str_replace("[title]", $settings["title"], $message); $message = str_replace("[href]", $settings["href"], $message); include("includes/email.php"); header("location: " . $settings["href"] . "uzenet/jelszo-kerese"); } else { $errorMSG = 2; } } elseif(isset($_POST["password"])) { $errorMSG = 0; $email = trim($_POST["email"]); $pass = sha1(trim($_POST["password"])); $sql = "SELECT id FROM user WHERE email='" . $email . "' AND password='" . $pass . "'"; $mysql_query = mysql_query($sql); while($line = mysql_fetch_array($mysql_query)) { $userid = $line["id"]; } if($userid != "") { $_SESSION["user-id"] = $userid; $_SESSION["user-pass"] = $pass; if($_POST["refresh"] == "cart") { header("location: " . $settings["href"] . "kosar"); } else { header("location: " . $settings["href"] . "fiokom"); } } else { $errorMSG = 1; } } ?>
Belépés
Hibás e-mail cím és/vagy jelszó.
A regisztrációkor megadott belépési adataid
E-mail címed
Jelszavad
Elfelejtett jelszó
Hibás e-mail cím.
A regisztrációkor megadott e-mail címed
E-mail cím