/
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, 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"> <!-- <link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"> --> </head> <body> <div class="main"> <div id="changeForm"></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() { const queryString = window.location.search; const urlParams = new URLSearchParams(queryString); const acc = urlParams.get('acc') const id = urlParams.get('id') if (acc == 'change') { getForm(id) } else if (acc == 'timeout') { timeOut() } else if (acc == 'notfound') { notFound() } }); function getForm(forget_id) { $.ajax({ type: "POST", url: "ajax/forget_password/forget_form.php", data: "data", dataType: "html", success: function(response) { $('#changeForm').html(response); $('#forget_id').val(forget_id); } }); } function timeOut() { swal({ title: 'timeout', text: 'timeout', type: 'warning', showConfirmButton: false, timer: 1500 }, function() { window.location = "join"; }); } function notFound() { swal({ title: 'notfound', text: 'notfound', type: 'warning', showConfirmButton: false, timer: 1500 }, function() { window.location = "join"; }); } function CheckPassword() { let password = $('#password').val(); let reCheckPassword = $('#re_password').val(); if (reCheckPassword != "") { if (password != reCheckPassword) { swal({ title: "คำเตือน", text: "รหัสไม่ถูกต้อง กรุณากรอกใหม่", type: "warning", }); $('#password').val(''); $('#re_password').val(''); return false; } } else { $('.change').prop('disabled', false) } } function changePassword() { let forget_id = $("#forget_id").val(); let password = $("#password").val(); $.ajax({ type: "POST", url: "ajax/forget_password/update_password.php", data: { forget_id: forget_id, password: password }, dataType: "json", success: function(data) { console.log(data.result); if (data.result == 1) { swal({ title: 'Success', type: 'success', showConfirmButton: false, timer: 1500 }, function() { window.location = "join"; }); } else if (data.result == 0) { swal({ title: 'ผิดพลาด', text: 'ไม่สามารถแก้ไขรหัสผ่านได้', type: 'warning', showConfirmButton: false, timer: 1500 }); } else if (data.result == 9) { swal({ title: 'ผิดพลาด', text: 'ไม่พบ email กรุณาติดต่อเจ้าหน้าที่', type: 'warning', showConfirmButton: false, timer: 1500 }); } } }); } </script> </body> </html>