if ($_POST["email"]) { $res = ask_sql("SELECT * FROM `" . $master_name . "_klienci` WHERE `email` LIKE '" . trim($_POST["email"]). "'"); $t = myFetch($res); if ($t["id"]) { $no_error = 1; $t["haslo_uzytkownika"] = rand(); ask_sql("UPDATE " . $master_name . "_klienci SET zmiana_hasla_id = 1, haslo_uzytkownika_md5 = '".md52($t["haslo_uzytkownika"])."' WHERE `email` LIKE '" .get_string($_POST, "email", 1). "'"); $email_tpl = read_template("tpl/mail/email_password_forgotten.tpl"); $email_tpl = template($t, $email_tpl); SendMail($t["email"], $mfrom, $email_tpl, template($for_index, $for_lang["RECOVER_PASSWORD_MAIL_TOPIC"])); } else $_POST["LOGIN_ERROR"] = 1; } if ($no_error) { $for_index["NAGLOWEK"] = $for_lang["strefa_nagl_przypomnij"]; $for_index["DZIEKUJEMY"] = $for_lang["przypomnij_wyslane"]; $for_index["BODY"] = template($for_index, read_template("tpl/komunikaty/thank.tpl")); } else { $for_index["BODY"] = template($_POST, read_template("tpl/logging/login_password_forgotten_form.tpl")); } $for_index["SCIEZKA"][1]["TYTUL"] = $for_lang["PRZYPOMNIJ_NAGL"]; $for_index["NAGL"] = $for_lang["PRZYPOMNIJ_NAGL"]; ?>