if (!empty($user_id)) { User_Personal_InformationBUS::Add($user_id, null, null, null, null, null, null, null); User_Contact_InformationBUS::Add($user_id, null, null, null, null); User_Basic_InformationBUS::Add($user_id, null, null, null, $username, $sex, $birthday); AlbumsBUS::Add("Avatar", null, $now, $user_id, null); } } if (isset($_POST["btUpdate"])) { include_once $PATH . "../../BUS/UsersBUS.php"; $uid = $_POST["uid"]; $user = UsersBUS::GetUserByID($uid); if ($_POST["txtEmail"] != $user[3]) { UsersBUS::SetEmail($uid, $_POST["txtEmail"]); } if (!empty($_POST["txtPassword"])) { UsersBUS::SetPassword($uid, $_POST["txtPassword"]); } if (!empty($_POST["txtAnswer"]) && !empty($_POST["lbSecurityQuestion"])) { $_POST["lbSecurityQuestion"]; UsersBUS::SetSecurityQuestion($uid, $_POST["lbSecurityQuestion"], $_POST["txtAnswer"]); } UsersBUS::SetStatus($uid, $_POST["lbStatus"]); UsersBUS::SetType($uid, $_POST["lbType"]); } ?> <script language="javascript"> $(document).ready (function () { $("#aDisable").click (function () { var url = "modules/forms/listUser.php";
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; } else { $type = 3; }