return false; } if(flag==false) alert ("Có lỗi trong thông tin đăng ký. Xin kiểm tra lại"); var url = "index.php?sendemail="+strEmail; if (confirm("Bạn có reset mật khẩu hay không?")) window.location = url; return flag; } </script> <?php if (isset($_GET["sendemail"]) && isset($_GET["sendemail"]) != null) { $txtEmail = $_GET["sendemail"]; include_once "../BUS/UsersBUS.php"; include_once "../module/PHPMailer/email.php"; $checkstatus = UsersBUS::GetUser_StatusByEmail($txtEmail); if ($checkstatus !== null) { $random = rand(1, 1000000); $changePass = UsersBUS::SetPassword($checkstatus['id'], $random); if ($changePass == true) { $tag = ""; $content_Subject = "RealEstate_HoaPhuong.com"; $content_Body = "\r\n\t\t\t\t<div id='yiv1540714745'>\r\n\t\t\t\t\tXin chào, " . $checkstatus['hoten'] . "\r\n\t\t\t\t\t<br><br>\r\n\t\t\t\t\tWebsite RealEstate_HoaPhuong.com có nhận được yêu cầu thay đổi mật khẩu cùa quý khách vào ngày " . date('d-m-Y , h:i:s') . "\r\n\t\t\t\t\t<br>\r\n\t\t\t\t\tMật khẩu đã được thay đổi:<b style='color:#336699;'>" . $random . "</b>\r\n\t\t\t\t\t<br>\r\n\t\t\t\t\t<br>\r\n\t\t\t\t\tQuí khách vui lòng quay trở lại trang web để đăng nhập lại.\r\n\t\t\t\t\t<br>\r\n\r\n\t\t\t\t\t<br>\r\n\t\t\t\t\t<br>\r\n\t\t\t\t\t__________________________________________________\r\n\t\t\t\t\t<br>\r\n\t\t\t\t\tBộ phận kỹ thuật:\r\n\t\t\t\t\t<br>\r\n\t\t\t\t\tĐiện thoại : (08) 38777939. - Fax : (08) 62602665\r\n\t\t\t\t\t<br>\r\n\t\t\t\t\tE-mail: support@realestate_hoaphuong.com\r\n\t\t\t\t\t<br>\r\n\t\t\t\t</div>"; for ($i = strlen($txtEmail) - 9; $i < strlen($txtEmail); $i++) { $tag .= $txtEmail[$i]; } if ($tag == "yahoo.com") { $type = 1; } else { if ($tag == "gmail.com") { $type = 2;