//fr_login_user_form function setCookie(name,value,days) { var expires = ""; if (days) { var date = new Date(); date.setTime(date.getTime() + (days*24*60*60*1000)); expires = "; expires=" + date.toUTCString(); } document.cookie = name + "=" + (value || "") + expires + "; path=/"; } function getCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return ''; } function eraseCookie(name) { document.cookie = name+'=; Max-Age=-99999999;'; document.cookie = ''; } var s_count = 0; jQuery('.wd').hide(); var domain = 'fatofficeufa.com'; var DS = ''; DS = getCookie('users'); async function start_news(news_) { var length_ = news_.length const steps = [ ] for (let i = 0; i < length_; i++) { steps.push(i+1); } const swalQueue = Swal.mixin({ progressSteps: steps, confirmButtonText: 'OK', //confirmButtonText: 'Next >', }) for (let i = 0; i < length_; i++) { var news = ''; var news_imgs = ''; news = news_[i].message; news_imgs = news_[i].img; news = news.split('|'); await swalQueue.fire({ title: news[0], text: news[1], imageUrl: news_imgs, html: news[1],currentProgressStep: i }); } } try{ DS = JSON.parse(DS); }catch(e){ DS = '';console.log(e); console.log(document.cookie); console.log('ck');} if ( DS == '' || DS==null) { console.log('NLG'); jQuery("#fr_login_form").show(); jQuery("#fr_login_user_form").hide(); jQuery(".promo-box").hide(); jQuery(".rplay").hide(); //jQuery("#loginform").hide(); jQuery(".readylogin").hide(); jQuery(".nologin").show(); shownews(); }else{ console.log('LG'); jQuery("#fr_login_form").hide(); jQuery("#fr_login_user_form").show(); setTimeout(function(){ jQuery(".reg1").html('ข�?อมูลส�?ว�?ตั�?); jQuery(".rplay").show(); jQuery(".prmotion").hide(); jQuery(".readylogin").show(); jQuery(".nologin").hide(); },500); //showUser(); showpromotion(); showstatement(); lastst(); if($("#cardopen").length > 0){ ///alert(''); call_cardopen(); } var url_ = window.location.href; var n = url_.search("pop=pop"); if (n!=-1) { console.log('LG2.2'); if (DS.news_!=null) { console.log('LG3'); setTimeout(function(){ console.log('LG4'); start_news(DS.news_); },1000); } if (DS.message!=null) { setTimeout(function(){ var message = DS.message.message; var wrapper = document.createElement('div'); wrapper.innerHTML = message; Swal.fire( '', message, 'success' ).then((result) => {}); //swal(''+'
'+DS.news.message); },2000); } } //pop=pop //window.location.href } function shownews(){ jQuery.ajax({ url: "https://"+domain+"/admin/api/getnews", method:'GET', }).done(function( data ) { //setTimeout(function(data){ if(data=='false'){ return false } var news = JSON.parse(data); news.message = news.message.split('|'); var wrapper = document.createElement('div'); wrapper.innerHTML = news.message[1]; swal({ //title: 'Yeeeaaaah!!!', title: news.message[0], //text: news[1], imageUrl: news.img, icon: news.img, content: wrapper, /*imageWidth: 164, imageHeight: 205, padding: 10,*/ animation: true, }); //swal(''+'
'+DS.news.message); //},1000); }); } function updateufa(password_){ password_ = $('#password2').val(); jQuery.ajax({ url: "https://"+domain+"/admin/api/updateufa", method:'POST', data:{'password':DS.password,'id':DS.id,'password_':password_}, }).done(function( msg ) { if(msg=='success'){ var DSx = getCookie('users'); try{ DSx = JSON.parse(DSx); DSx.password_ = password_; DSx = JSON.stringify(DSx); setCookie('users',DSx,1); }catch(e){ DSx = '';} alert('สำเ�??�?); setTimeout(function(){window.location.href=/window.location.href; },1000); // }else{ alert(' ไม่สำ�?�??�?'); } }); } function numberWithCommas(x) { //return x ; return Number(x).toLocaleString('en'); try { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); } catch(err) { return x ; } } function call_cardopen(){ if($("#rand").length > 0){ return false; } jQuery.get( 'https://'+domain+'/admin/api/opencard_/'+DS.id, function( data ) { //setTimeout(function(){ //$("#cardopen").html(data); document.getElementById("cardopen").innerHTML = data; num = $('#num').html(); rand = $('#rand').html(); amn = $('#amn').html(); error = $('#error').html(); img = '../../../../card/' + num + '_' + rand + '.png'; $( ".flip-card" ).click(function() { flip2(this); }); //flip-card //},1000); }); } var click = false; var num = ''; var amn =''; var rand = ''; var img = '';var error = ''; function flip2(el) { if (error!='') { swal( 'Error!', error, 'error' ).then(function() { window.location ='../../../'; }); return false; } if (click) { return false; } click = true; //console.log(el); //$(el).css('transform','rotateY(180deg)'); //$(el).children('.back').attr('src', img); $(el).children().css('transform', 'rotateY(180deg)'); //$(el).children().css('-webkit-transform', 'rotateY(180deg)'); //$('.back .card img') .attr('src',img); var im = $($(el).children().children()[1]).children()[0] console.log(im); $(im).attr('src', img); setTimeout(function(){ winner(); },1000); } function winner(){ swal( 'Good Luck!', 'คุณ�?ด�?�?��บ�?บ�?ัสจำนว�? '+amn+' บา�?!', 'success' ).then(function() { window.location ='../../../'; }) } function getaff(){ jQuery.get( 'https://'+domain+'/admin/api/getaff/'+DS.id, function( data ) { data = JSON.parse(data); jQuery.each(data,function(k,v){ //console.log(v); $('#memaff').append(' '+v.user+'
ชื่อ-ส�?ุล: '+v.name+' '+v.amount+' บา�?/td> '); }); }); } var last = false; function lastst(){ jQuery.get( 'https://'+domain+'/admin/api/lastst/'+DS.id+'/'+DS.user_+'?t='+Date.now(), function( data ) { if (data==null || data == 'null') { last = 0; setTimeout( function(){ lastst(); }, 10000 ); return false; } data = JSON.parse(data); if (last!=false) { if (last!=data.id) { console.log(last); swal("เติม�?งินสำ�?�??�?", data.detail , "success"); } } last = data.id; setTimeout( function(){ lastst(); },10000 ); }); } //withdform //withdform jQuery("#withdform").submit(function(e){ e.preventDefault(); //DS.withdraw var news = ''; if (DS.withdraw!=null) { var news = DS.withdraw.message; news = news.split('|'); swal({ title: news[0], text: news[1], imageUrl: DS.withdraw.img, icon: DS.withdraw.img, }) .then((willDelete) => { if (willDelete) { wd(); /* swal("Poof! Your imaginary file has been deleted!", { icon: "success", });*/ } else { //swal("Your imaginary file is safe!"); } }); }else{ swal({ title: 'ต�?อ�?กา�??อ�?', text: 'กรุ�?ายื�?ยัน�?ารถอน�?งิ�?, icon: "warning", }) .then((willDelete) => { if (willDelete) { wd(); } else { //swal("Your imaginary file is safe!"); } }); } $('.swal-overlay').css('z-index',999999999); }); var wdload = false; function wd(){ if(wdload==true){ return false; } var amount_ = $('#amount_').val(); amount_ = amount_.replace(",", ""); amount_ = parseFloat(amount_); if (amount_ < 300) { alert('ถอน�?ั�?น�?่ำ 300 บา�?); return false; } var amount = $('#amount').html(); amount = amount.replace(",", ""); amount = amount.replace(",", ""); amount = amount.replace(",", ""); amount = parseFloat(amount); /*alert(amount); alert(amount_);*/ if (amount < amount_) { alert('ยอด�?ง�?หลือไม่�?�?); return false; } $('#amount').html(amount); $('#amount_').val(amount_); var ds = jQuery("#withdform").serialize(); $('#withdform').html('
กำลัง�?จ�?ง�?อ�?...
'); //document.cookie = ""; $('#wd').hide(); $.post('https://'+domain+'/admin/api/withdraw/add',ds,function(data){ wdload = true; if (data=='error') { alert('แ�?้�?ถอน�?ม�?สำเ�??�?); location.reload(); return false; } if (data=='error2') { alert(' แ�?้�?ถอน�?ด�? 15 นาทีต�?อ�?�?��้�?ค�?�?'); location.reload(); return false; } //alert('แ�?้�?ถอน�?�?��ย�?�??อยคะ'); var currentdate = new Date(); var datetime = "" + currentdate.getDate() + "/" + (currentdate.getMonth()+1) + "/" + currentdate.getFullYear() + " @ " + currentdate.getHours() + ":" + currentdate.getMinutes() + "" + '';//currentdate.getSeconds(); var text = 'ยอด�?จ�?ง�?อ�? '+amount_+' บาท|ยืนยั�?แล้ว'+'
'+'แ�?้�?ถอน�?ล�?�?+datetime; $('#withdform').html('
'+text+'
'); setTimeout(function(){ location.reload(); }, 3*1000); }); return!1 } //depoform jQuery("#depoform").submit(function(e){ e.preventDefault(); //document.cookie = ""; $.post('https://'+domain+'/admin/api/deposit/add',$(this).serialize(),function(data){ alert('แ�?้�?ฝาก�?�?��ย�?�??อยคะ'); window.location.href= window.location.href; }); return!1 }); ///registerform String.prototype.isNumber = function(){return /^\d+$/.test(this);} jQuery("#registerform").submit(function(e){ e.preventDefault(); var v = validatePassword(); if (!v) { return false; } var account = $('#account').val(); if (account.length != 10 && account.length != 12 ) { alert('เล�?ที่�?ั�?ชี ต�?อ�?ใส่�?ัวเล�? 10 - 12 ตัว�?�?); return false; } if (!account.isNumber()) { alert('เล�?ที่�?ั�?ชี ต�?อ�?ใส่�?ัวเล�? คะ'); return false; } var pass = $('#pass').val(); var cm_pass = $('#cm_pass').val(); if (pass!=cm_pass) { alert('�?��ัสผ�?า�?ไม่�?�??กั�?); return false; } //document.cookie = ""; //$.post('https://'+domain+'/admin/member/add',$(this).serialize(),function(data){ $.post('/api.php',$(this).serialize(),function(data){ //$("#results").html(data); //window.location.href = 'profile.php'; //eraseCookie('users'); //if (data=='') { //alert('Login ไม่สำ�?�??�?); DS = '' //return false; //} if (data=='userD') { alert('เบอ�??มือ�?ือ ซ�?�?); return false; } if (data=='account') { alert('เล�?ที่�?ั�?ชี ซ�?�?); return false; } if (data=='CCP1') { alert('Captcha ไม่�?ู�?ต�?อ�?คะ!'); return false; } jQuery("#fr_login_form").hide(); //jQuery("#fr_login_user_form").show(); //setCookie('users','',1); eraseCookie('users'); alert('สมั�?�??�?��ย�?�??อยคะ'); window.location.href= '../login_'; //DS = JSON.parse(data); }); return!1 }); jQuery("#loginform").submit(function(e){ e.preventDefault(); document.cookie = ""; $.post('https://'+domain+'/admin/member/app.html',$(this).serialize(),function(data){ //$("#results").html(data); //window.location.href = 'profile.php'; eraseCookie('users'); var str = data; //var n = str.includes("login"); if (data=='login2') { //if (n==true) { //var message = str.split("||"); //alert(message[1]); alert('User โ�?�?Lock คะ'); DS = '' return false; } if (data=='login') { //if (n==true) { //var message = str.split("||"); //alert(message[1]); //alert('เนื่อง�?า�?เว�?บหลั�?UFABET ไ�?้�?จ�?ง�?ำ�?นิน�?ารปิด�?พื่อปรั�?ปรุ�?เว�?บ�?ซ�?์�?นวั�?นี�???เวล�?11.00 �? ถึ�?17.30 �?'); alert('เเจ�?ง�?ิ�?ปรั�?ปรุ�?เว�?บ�?ซ�?์�?นวั�?นี�? ตั้�?เเต�?เวล�?11.00-13.30 �? ขออ�?ัยใ�?ความไม่สะ�?า�? หาก�?ปิด�?ช�?งาน�?เล�?�?จะเเจ�?ง�?ห�?ทรา�?อีก�?�?��้�?คะ Line id !!!!'); DS = '' return false; } var n = str.includes("login"); //if (data=='login') { if (n==true) { var message = str.split("||"); //alert(message[1]); swal({ icon:"success", title: "Login ไม่�?ด�?!", text: message[1], //icon: "warning", // buttons: true, // dangerMode: true, }) $('.swal-text').html(message[1]); //alert('ปิด�?�?��บ�?�?��งระ�?บ�?ั�?ว�?�?���? ลูก�?้าที่�?า�?เงิน�?ข�?ามา�?ะ�?ด�?�?��บยอ�?เงินอย�?า�?ครบ�?้วน�?่ะ กรา�?ขออ�?ัยใ�?ความไม่สะ�?ว�?ครั�?ง�?ี�?ค�?�?); DS = '' return false; } if (data=='') { alert('Login ไม่สำ�?�??�?); DS = '' return false; } jQuery("#fr_login_form").hide(); jQuery("#fr_login_user_form").show(); setCookie('users',data,1); swal({ icon:"success", title: "Login เ�?��ย�?�??อย!", text: "กรุ�?า�?�?��จสอ�?บัญ�?ี�?า�?เงิน�?อ�?เ�?��ทุก�?�?��้�?ก�?อ�?ทำ�?��ย�?ารฝาก�?ี�?เม�?ู�?า�?เงิน�?่ะ ", //icon: "warning", // buttons: true, // dangerMode: true, }) .then((v) => { window.location.href= '../../../login_/?pop=pop"'; }); //DS = JSON.parse(data); }); return!1 }); function showUser(){ $('.bankimg').hide(); jQuery.ajax({ url: "https://"+domain+"/admin/api/member", method:'POST', data:{'password':DS.password,'id':DS.id}, }) .done(function( msg ) { //setCookie('users',msg,1); var msgx = msg; msg = JSON.parse(msg) ; DS = JSON.parse(msgx); jQuery('.bank_name').html(DS.bankac.bank_name); jQuery('.bank_acc').html(DS.bankac.bank_acc); $('.bank_accx').attr('data-clipboard-text',DS.bankac.bank_acc); if (DS.banktype==0) { $('.bankimg').attr("src","../../img/kbank.png?t=p1"); } var str = DS.bankac.bank_name var n = str.search("KBANK"); if (n!=-1) { $('.bankimg').attr("src","../../img/kbank.png?t=p1"); } n = str.search("SCB"); if (n!=-1) { $('.bankimg').attr("src","../../img/scb.png?t=p1"); } n = str.search("BAY"); if (n!=-1) { $('.bankimg').attr("src","../../img/bay.png?t=p1"); } $('.bankimg').show(); var afflink = ''; jQuery.each(msg,function(k,v){ if (k=='aff') { if(DS.depo<=0 && $('#linkaff_').length >0){ //alert('ต�?อ�?มียอด�?า�?'); //window.location.href = '../../app.html'; afflink = 'https://www.afffatufa.com/app.html.php/?aff='+v; $('#linkaff_').html(afflink); $('.'+k).val(afflink); }else{ afflink = 'https://www.afffatufa.com/app.html.php/?aff='+v; $('#linkaff_').html(afflink); $('.'+k).val(afflink); } }else{ $('.'+k).html(v); $('.'+k).val(v); } }); $('.afflink1').attr('href','https://social-plugins.line.me/lineit/share?url='+afflink); $('.afflink2').attr('href','fb-messenger://share/?link='+afflink); $('.afflink3').attr('href','https://www.facebook.com/sharer/sharer.php?u='+afflink); if (msg.first==true) { $('.fr_aff_none').hide(); $('.fr_aff').show(); }else{ //$('.fr_aff').html(''); } $('.fr_aff_none').hide(); $('.fr_aff').show(); //DS = msg; jQuery('#amount').html(msg.amount); jQuery('#amount-w').html(numberWithCommas (msg.amount)); jQuery('#amount_return').html(msg.totalrolling_am); jQuery( "#return_rolling").unbind( "click" ); jQuery('#return_rolling').click(function() { jQuery('#return_rolling').hide(); jQuery.ajax({ url: "https://"+domain+"/admin/api/addreturn?id="+DS.id, method:'POST', data:{'password':DS.password,'id':DS.id}, }) .done(function( msg ) { swal( msg); setTimeout(function(){ window.location.href = window.location.href ; },2000); }); }); //aff_am $status = Array(); $status[0] = '�?��ดำเนิน�?าร'; $status[1] = 'ดำเนิน�?ารเ�?��ย�?�??อย'; $status[2] = 'ย�?เลิ�?; $status[3] = ' ต�?อ�?มียอด�?ทริ�? 10 เท�?�?ถึง�?อ�?ไ�?�?; $status[4] = ' �?��ย�?ารย�?เลิ�?; $status[5] = ' กรุ�?า�?ิ�?ต�?อ�?จ�?าหน�?า�?ี�? Line : '+msg.line+''; $status[6] = ' �?��ดำเนิน�?าร'; jQuery.each(msg.data,function(k,v){ var d = ''; //pm var p1 =''; var ny = ''; jQuery.each(pm , function(k,v){ if (v.type==0) { var turnOvers = v.turnOver.split('|'); if (v.status=='3') { p1 =' | ต�?อ�?มียอด�?ทริ�? กีฬา '+turnOvers[0]+' เท�?�?| คาสิโ�? '+turnOvers[1]+' เท�?�?ถึง�?อ�?ไ�?�?; } ny = '
หมายเห�?�?ฝากมา�?ล�?ว�?้องมีรายกา�??ล�?น�?้วย�?ะ�?�?ก�?�?��บ�?บ�?ัส 50% ทำเทริ�?ให้�?�?? '+turnOvers[0]+' หรือ '+turnOvers[1]+' เท�?า�?้วย�?ะ�?�?/small>'; } }); if (v.status=='5') { if (v.tranfer!=null) { p1 = v.tranfer+' '; } ny = ''; } if (v.status==3) { d ='
หมายเห�?�?ฝากมา�?ล�?ว�?้องมีรายกา�??ล�?น�?้วย�?ะ�?�? ก�?�?��บ�?บ�?ัส 50% ทำเทริ�?ให้�?�?? 10 เท�?า�?้วย�?ะ�?�?span>'; } var str = ''+ ''+v.datetime+''+ ' ยอด�?จ�?ง�?อ�? '+v.amount+' บา�?'+ ' | '+$status[v.status]+''+p1+ny+ d+ ''+ ''+ '
'; $('#res__').append(str); if (v.status==0) { s_count++; } $('.s_count').html(s_count); }); if (msg.haveplay=='1') { jQuery('.wd').show(); jQuery('#wd2').hide(); }else{ jQuery('.wd').hide(); jQuery('#wd2').show(); } jQuery('#amount').html(numberWithCommas( msg.amount) ); //jQuery('#amount-w').html(numberWithCommas( msg.amount)); jQuery('.aff_am').html(numberWithCommas( jQuery('.aff_am').html() )); // try{ // if (DS.deposit=='0') { // //alert(DS.deposit_message); // $('.bank-acc').html('

'+DS.deposit_message+'

'); // $('.bankimg').hide(); // } // }catch(e){ } //jQuery('#amount_return').html( numberWithCommas( msg.totalrolling_am)); }); /*fetch('/users.html') .then(function(response) { return response.text() }).then(function(body) { document.body.innerHTML = body })*/ jQuery('#user').html(DS.user); jQuery('#user-w').html(DS.user); //jQuery('#amount-w').html(DS.amount); jQuery('#member_id').val(DS.id); jQuery('#account').html(DS.account); jQuery('#user_').html(DS.user_); jQuery('#password_').html(DS.password_); jQuery('#name_acc').html(DS.name); var banktype = DS.banktype; jQuery('.bank_tt_'+banktype).show(); jQuery('.username_').val(DS.user_); jQuery('.password_').val(DS.password_); jQuery('.name_acc').html(DS.name); jQuery('.account').html(DS.account); jQuery('.name_acc').val(DS.name); jQuery('.account').val(DS.account); $("#bt").val(banktype); setTimeout(function(){ var bt_x = $('#bt option:selected').text(); jQuery('.banktype').html(bt_x); }, 500); /*if (DS.haveplay=='1') { jQuery('.wd').show(); jQuery('#wd2').hide(); }else{ jQuery('.wd').hide(); jQuery('#wd2').show(); }*/ //jQuery('.logo_bank').html(''); } var pm = ''; $status_St = Array('ยัง�?ม�?ไ�?้�?ช�?','ใ�?้�?ล�?�?); function showstatement(per_page){ if (per_page=='') { per_page = 0; } jQuery.ajax({ url: "https://"+domain+"/admin/api/statementshow?id="+DS.id, method:'POST', data:{'password':DS.password,'id':DS.id,'per_page':per_page}, }) .done(function( msg ) { msg = JSON.parse(msg) ; //pm = msg; console.log(msg); jQuery('.statements').html(''); var head = ' Datetime Deposit Detail Status '; jQuery('.statements').append(head); jQuery.each(msg.data , function(k,v){ var str = ' '+ ''+v.datetime+''+ ''+v.deposit+' '+ ''+v.detail+' '+ ' '+$status_St[v.status]+' '+ ''; jQuery('.statements').append(str); }); var str = ' '+ '�?��ม�?ั�?งหม�? '+ ' '+msg.sum+' '+ ' '+ ' '+ ''; jQuery('.statements').append(str); var str = ' '; for (var i = 0; i <= (msg.allpage-1); i++) { str += ''+(i+1)+''; } str += ' '; jQuery('.page_').html(str); var head = ' �?��ย�?าร โ�?นั�? '; head += ' Datetime Amount �?��ย�?าร '; jQuery('.statements').append(head); jQuery.each(msg.data_bonus , function(k,v){ switch(v.process){ case '1': v.process = 'Bonus 50%'; break; case '2': v.process = 'Bonus 10%'; break; case '6': v.process = 'เปิด�?พ�?'; break; case '7': v.process = 'spin'; break; } var str = ' '+ ''+v.datetime+''+ ''+v.amount+' '+ ''+v.process+' '+ ''; jQuery('.statements').append(str); }); var head = ' �?��ย�?าร คืน�?ครดิ�? '; head += ' Datetime Amount Member '; jQuery('.statements').append(head); jQuery.each(msg.data_return_tf , function(k,v){ var str = ' '+ ''+v.datetime+''+ ''+v.amount+' '+ ''+v.user_+' '+ ''; jQuery('.statements').append(str); }); var head = ' �?��ย�?าร แ�?ะ�?ำ�?พื่อ�? '; head += ' Datetime Amount Member '; jQuery('.statements').append(head); jQuery.each(msg.data_aff , function(k,v){ var str = ' '+ ''+v.datetime+''+ ''+v.amount+' '+ ''+v.user_+' '+ ''; jQuery('.statements').append(str); }); }); } function showpromotion(){ $('.bankimg').hide(); jQuery('.promo').html(''); jQuery.ajax({ url: "https://"+domain+"/admin/api/promotion", method:'POST', data:{'password':DS.password,'id':DS.id}, }) .done(function( msg ) { msg = JSON.parse(msg) ; pm = msg; showUser(); jQuery.each(msg , function(k,v){ //console.log(v); var turnOvers = v.turnOver.split('|'); var img = '
'+ 'สูงสุ�?ไม่�?กิ�?'+v.max+' บา�?
'+ //'ยอ�?Turn Over X'+v.turnOver '
ยอดหมุน�?วีย�? '+turnOvers[0]+' เท�?�?(กีฬา)'+ '
ยอดหมุน�?วีย�? '+turnOvers[1]+' เท�?�?(คาสิโ�?)'+ +'
'; img = ' '+ ''+ '
แลก�?บ�?ัส
'; img = ' '+ ''+ '
'+ '
'+'สูงสุ�?ไม่�?กิ�?'+v.max+' บา�? '+ '
ยอดหมุน�?วีย�? '+turnOvers[0]+' เท�?�?(กีฬา)'+ '
ยอดหมุน�?วีย�? '+turnOvers[1]+' เท�?�?(คาสิโ�?)'+ '

'+ '
'+ ''+ '
'; if (v.enable==0) { jQuery('.promo').append(img); } }); }); } var pm_ = ''; function readmore(promo){ pm_ = ''; jQuery.each(pm , function(k,v){ if (v.id == promo) { pm_ = v; } }); var turnOvers = pm_.turnOver.split('|'); swal("Promotion "+pm_.value_+"% ยอดหมุน�?วีย�? "+turnOvers[0]+'เท�?�?(กีฬา)'+' '+'ยอดหมุน�?วีย�? '+turnOvers[1]+'เท�?�?(คาสิโ�?)' , pm_.detail); } function addpromo1(promo){ pm_ = ''; jQuery.each(pm , function(k,v){ if (v.id == promo) { pm_ = v; } }); // return false; swal({ title: "คุณ�?้อง�?าร�?���?Promotion "+pm_.value_+"% ยอดหมุน�?วีย�? "+pm_.turnOver+' เท�?�?ใ�?่ห�?��อ�?ม�??', text: "ถ�?า�?ช�?สิท�?ิ�?แล้ว จะไม่มีสิ�?ธิ์รั�?โ�?�?��ื�?น�?!", icon: "warning", buttons: true, dangerMode: true, }) .then((willDelete) => { if (willDelete) { jQuery.ajax({ url: "https://"+domain+"/admin/api/addpromo1", method:'POST', data:{'password':DS.password,'id':DS.id,'promo':promo}, }) .done(function( msg ) { //alert('�?��บ�?ปรโมชั่�? เ�?��ย�?�??อยคะ'); if (msg=='havebonus') { swal(" วัน�?ี�?�?��บ�?ปรไ�?แล้วคะ " ); }else if (msg=='norepo2') { swal("มี�?��ย�?ารฝากมา�?กว่า 1 " ); }else if (msg=='norepo') { swal("ไม่มีรายกา�??า�?วัน�?ี�?คะ " ); }else if (msg=='error') { swal("�?��บ�?ปรโมชั่�? ไม่�?้�? ต�?อ�?มียอด�?ติม�?งิน�?่อน�?�?" ); }else if (msg=='error1') { swal("โ�?�??ม�?ั�?�?ต�?อ�?ไม่มีรายกา�??ล�?น�?ึ�?�?��บ�?ด�?คะ" ); }else if (msg=='error3') { swal("ปิด�?�?��บ�?�?��ง�?ั�?ว�?�?��ว�?่ะ" ); }else{ swal("�?��บ�?ปรโมชั่�? เ�?��ย�?�??อยคะ" ); setTimeout(function(){window.location.href= '../login_';},3000); } }); } else { //swal("Your imaginary file is safe!"); } }); } function logout_(){ eraseCookie('users'); setCookie('users','',-999); window.location.href= '../'; } function isThaichar(str,obj){ var orgi_text="ๅ�?ถุึ�?ต�?ข�?ๆ�?ำ�?ะัีรนยบลฃ�?ห�?ด�?้�?าสว�?ผ�?แอิืทมใ�?๑�?๓�?ู฿๕�?๗�?๙�?ฎ�?ธ�?๊�?ฯ�?ฐ�?ฤ�?ฏ�?ฌ�?๋ษศ�?ฉฮฺ�?ฒฬ�?"; var str_length=str.length; var str_length_end=str_length-1; var isThai=true; var Char_At=""; var TMpc = ''; for(i=0;i=1){ if(isThai==false){ //obj.value=str.substr(0,str_length_end); //alert(' ต�?อ�?ภาษาไ�?ย�?ท�?า�?ั�?�?); } } obj.value = TMpc; return isThai; // ถ�?า�?ป�?�?true แสด�?ว�?า�?ป�?น�?าษา�?ทยทั้�?หม�?} function validatePassword() { var p = document.getElementById('pass').value, errors = []; if (p.length < 8) { errors.push("password ต�?อ�?มีมาก�?ว�?�?8 ตั�?); } if (p.search(/[a-z]/i) < 0) { errors.push("password ต�?อ�?มีตัวอั�?ษร"); } if (p.search(/[0-9]/) < 0) { errors.push("password ต�?อ�?มีตัว�?ัวเล�?"); } if (errors.length > 0) { alert(errors.join("\n")); return false; } return true; } function addaff(){ if (DS.aff_am<=0) { swal(" ไม่มี�?บ�?ัสค�?เหลือแล้วคะ " ); return false; } if (DS.aff_am<500) { swal(" โ�?นัส�?ง�?หลือต�?อ�?มี อย่าง�?้อ�?500 คะ " ); return false; } swal(" กำลั�?update ... " ); jQuery.ajax({ url: "https://"+domain+"/admin/api/addaff?id="+DS.id, method:'POST', data:{'password':DS.password,'id':DS.id}, }) .done(function( msg ) { if (msg=='0') { swal(" ไม่มี�?บ�?ัสค�?เหลือแล้วคะ " ); return false; } if (msg=='100') { swal(" โ�?นัส�?ง�?หลือต�?อ�?มี อย่าง�?้อ�?500 คะ " ); return false; } if (msg=='bonus') { swal(" ยังรั�?โ�?นัส�?ม�?ไ�?้�?�?" ); return false; } swal(" โอน�?งิน�?ข�?า�?ครติต�?ล�?ว�?�?" ); setTimeout(function(){ window.location.href = window.location.href ; },2000); }); } /* if (isset($_GET['updaterolling'])) { global $domain; echo curl_($domain ."/backend_sa/api/updaterolling/".$_SESSION['member']['id']); } function getrolling(){ global $domain; if (isset($_SESSION['member']['id'])) { return curl_($domain ."/backend_sa/api/getrolling/".$_SESSION['member']['id']).''; } } */