/
home
/
efamember
/
domains
/
efa-member.com
/
public_html
/
up file
home
<!DOCTYPE html> <html lang="en" dir="ltr"> <head> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0"> <meta charset="utf-8"> <meta name="robots" content="noindex"> <title>ระบบสมาชิก - สมาคมผู้ประกอบการนำคนต่างด้าวมาทำงานในประเทศ (ประเทศไทย)</title> <link rel="icon" type="image/png" href="Logo.png" /> <link rel="stylesheet" type="text/css" href="main.css"> <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700;800&display=swap" rel="stylesheet"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link href="vendor/sweetalert/sweetalert.css" rel="stylesheet"> </head> <body> <div class="main"> <div class="container b-container" id="b-container"> <form class="form" id="a-form" method="" action=""> <h2 class="form_title title">Forget Password ?</h2> <div class="form__icons"> </div> <input class="form__input" id="email" type="text" placeholder="Email" onchange="Checkemail($(this));"> <button class="form__button button submit" id="forgotBtn" onclick="send_request();" disabled>ยืนยัน</button> </form> </div> <!-- <div class="container a-container" id="a-container"> <form class="form" id="b-form" method="" action=""> <h2 class="form_title title">Sign in to Website</h2> <div class="form__icons"> </div> <input class="form__input" id="email_login" type="text" placeholder="Email"> <input class="form__input" id="password_login" type="password" placeholder="Password"> <a class="form__link" href="forget_password">Forgot your password?</a> <button class="form__button button submit" onclick="login();">SIGN IN</button> </form> </div> --> <div class="switch" id="switch-cnt"> <div class="switch__circle"></div> <div class="switch__circle switch__circle--t"></div> <div class="switch__container" id="switch-c1"> <!-- <h2 class="switch__title title">Welcome Back !</h2> --> <img src="Logo.png" alt="" class="switch__title title" style="width: 150px;"> <br> <p class="switch__description description">To keep connected with us please login with your personal info</p><a href="join"><button class="switch__button button switch-btn">ย้อนกลับ</button></a> </div> <!-- <div class="switch__container is-hidden" id="switch-c2"> <img src="Logo.png" alt="" class="switch__title title" style="width: 150px;"> <p class="switch__description description">Enter your personal details and start journey with us</p> <button class="switch__button button switch-btn">SIGN IN</button> </div> --> </div> </div> <script src="main.js"></script> <script src="vendor/sweetalert/sweetalert.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function() { // let member_id = localStorage.getItem("member_id"); // if (member_id != "") { // member_id มีอยู่ใน LocalStorage // $.ajax({ // type: "POST", // data: { // member_id: member_id // }, // dataType: 'json', // url: "ajax/form-login/check_local.php", // success: function(response) { // if (response.result == // 1) { // เช็คแล้วว่าข้อมูลใน LocalStorage มีอยู่จริงในฐานข้อมูล // location.href = "main/index"; // } // } // }) // } if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) { // เช็คว่าเป็นโทรศัพท์หรือไม่ ถ้าเป็นเปิดหน้าล็อกอินอันที่เป็น Mobile location.href = "forget_password_mobile"; } }); function Checkemail(attr) { var Email = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/; if (!attr.val().match(Email)) { swal({ title: "คำเตือน", text: "รูปแบบ Email ไม่ถูกต้อง", type: "warning", }); attr.val(''); return false; } else { let check_mail = attr.val(); $.ajax({ data: { check_mail: check_mail }, dataType: "json", type: "POST", url: "ajax/forget_password/check_mail.php", success: function(response) { if (response.result == '1') { $('#forgotBtn').prop('disabled', false) console.log('SSR'); } else if (response.result == '0') { swal({ title: "คำเตือน", text: "ไม่พบ Email นี้ในระบบ", type: "warning", }); attr.val('') } } }); } } function send_request() { let email = $("#email").val(); $.ajax({ type: "POST", url: "ajax/forget_password/send_mail.php", data: { email: email }, dataType: "json", beforeSend: function() { swal({ title: "กำลังทำการบันทึก", text: "กรุณารอสักครู่", imageUrl: "ajax-loader.gif", showConfirmButton: false, allowOutsideClick: false }); }, error: function(data) { // console.log("error : " + data.responseText); swal({ title: "เกิดข้อผิดพลาด", text: "ไม่สามารถบันทึกรายการได้ กรุณาแจ้งทีมงาน", type: "error", }); }, success: function(data) { if (data.result == 1) { swal({ title: 'คำขอถูกส่งไปยัง email แล้ว กรุณาทำรายการภายใน 15 นาที', type: 'success', showConfirmButton: false, timer: 2000 }, function() { location.reload(); }) } } }); } // function CheckPassword() { // let reCheckPassword = $('#re_password').val(); // let password = $('#password').val(); // if(reCheckPassword != ""){ // if (password != reCheckPassword) { // swal({ // title: "คำเตือน", // text: "รหัสไม่ถูกต้อง กรุณากรอกใหม่", // type: "warning", // }); // $('#re_password').val(''); // $('#password').val(''); // return false; // } // } // } // function register() { // let username = $('#email').val(); // let password = $('#password').val(); // let re_password = $('#re_password').val(); // if (password != re_password) { // swal({ // title: "เกิดข้อผิดพลาด", // text: "รหัสไม่ถูกต้อง กรุณากรอกใหม่", // type: "error" // }); // $('#re_password').val(''); // $('#password').val(''); // return false; // } // swal({ // title: 'กรุณายืนยันเพื่อทำรายการ', // type: 'warning', // showCancelButton: true, // confirmButtonColor: '#3085d6', // cancelButtonColor: '#d33', // cancelButtonText: 'ยกเลิก', // confirmButtonText: 'ยืนยัน', // closeOnConfirm: false // }, function() { // $.ajax({ // type: 'POST', // url: 'ajax/form-login/register.php', // data: { // username: username, // password: password, // name: name, // phone: phone, // }, // dataType: 'json', // beforeSend: function() { // swal({ // title: "กำลังทำการบันทึก", // text: "กรุณารอสักครู่", // imageUrl: "ajax-loader.gif", // showConfirmButton: false, // allowOutsideClick: false // }); // }, // error: function(data) { // console.log("error : " + data.responseText); // swal({ // title: "เกิดข้อผิดพลาด", // text: "ไม่สามารถบันทึกรายการได้ กรุณาแจ้งทีมงาน", // type: "error", // }); // }, // success: function(data) { // if (data.result == 1) { // localStorage.setItem("member_id", data.login_code); // localStorage.setItem("member_name", data.member_name); // swal({ // title: "ดำเนินการสำเร็จ", // text: "ทำการลงทะเบียนสำเร็จ", // type: "success" // }, function() { // swal.close(); // location.href = "main/index" // }); // } else if (data.result == 0) { // swal({ // title: "เกิดข้อผิดพลาด", // text: "เกิดข้อผิดพลาดระหว่างบันทึก กรุณาแจ้งผู้พัฒนา", // type: "error" // //Please Check Your Account // }, function() { // //location.reload(); // }); // } // } // }) // }); // } // function login() { // let username = $('#email_login').val(); // let password = $('#password_login').val(); // $.ajax({ // type: 'POST', // url: 'auth.php', // data: { // username: username, // password: password, // }, // dataType: 'json', // beforeSend: function() { // swal({ // title: "กำลังทำการบันทึก", // text: "กรุณารอสักครู่", // imageUrl: "ajax-loader.gif", // showConfirmButton: false, // allowOutsideClick: false // }); // }, // error: function(data) { // console.log("error : " + data.responseText); // swal({ // title: "เกิดข้อผิดพลาด", // text: "ไม่สามารถบันทึกรายการได้ กรุณาแจ้งทีมงาน", // type: "error", // }); // }, // success: function(data) { // if (data.result == 1) { // localStorage.setItem("member_id", data.login_code); // localStorage.setItem("member_name", data.member_name); // swal({ // title: "ดำเนินการสำเร็จ", // text: "เข้าสู่ระบบสำเร็จ", // type: "success" // }, function() { // swal.close(); // location.href = "main/index"; // }); // } else if (data.result == 0) { // swal({ // title: "เกิดข้อผิดพลาด", // text: "เกิดข้อผิดพลาด กรุณาแจ้งผู้พัฒนา", // type: "error" // }); // } // } // }) // } </script> </body> </html>