document.getElementById("xuly_napthe").disabled = true;
function enableBtn(){
document.getElementById("xuly_napthe").disabled = false;
}
$(document).ready(function(){
$( "#game option:selected" ).each(function() {
str = $( this ).val();
});
$.get("get.php?type=vtc&game="+str, function(data, status){
// alert("Data: " + data + "\nStatus: " + status);
// console.log(data);
var val = data.split("|");
if(val[0] == 1){
$( "#promo" ).html( "
"+val[1]+"
" );
}else if(val[0] == -1){
$( "#promo" ).html( "Kênh nạp đang bảo trì, vui lòng thử lại sau
" );
document.getElementById("xuly_napthe").disabled = true;
}
});
});
$("#game").change(function(){
$( "#game option:selected" ).each(function() {
str = $( this ).val();
});
$.get("get.php?type=vtc&game="+str, function(data, status){
// alert("Data: " + data + "\nStatus: " + status);
var val = data.split("|");
if(val[0] == 1){
$( "#promo" ).html( ""+val[1]+"
" );
}else if(val[0] == -1){
$( "#promo" ).html( "Kênh nạp đang bảo trì, vui lòng thử lại sau
" );
document.getElementById("button1").disabled = true;
}
});
});
// var sss = "10001914407981";
// console.log( sss.replace (/(?!$|\n)([^\n]{4}(?!\n))/g, '$1 ') );
$(document).ready(function () {
$('form#myform').submit(function() {
// var tarr = {vtt:"Viettel", mobi:"Mobifone", vina:"Vinaphone"};
$( "#tendangnhap" ).each(function() {
tendangnhap = $( this ).val();
});
game = $( "#game option:selected" ).text();
server = $( "#server option:selected" ).text();
$( "#type_card" ).each(function() {
type = $( this ).val();
});
$( "#vnd" ).each(function() {
vnd = $( this ).val();
});
$( "#seri" ).each(function() {
seri = $( this ).val();
});
$( "#code" ).each(function() {
code = $( this ).val();
});
// console.log(type);
var c = confirm("Trò chơi: "+game+"\nMáy chủ: "+server+"\nTên: "+tendangnhap+"\nThẻ: "+type+"\nSeri: "+seri.replace (/(?!$|\n)([^\n]{4}(?!\n))/g, '$1 ')+"\nMã thẻ: "+code.replace (/(?!$|\n)([^\n]{4}(?!\n))/g, '$1 ')+"\nMệnh giá: "+vnd+" \nNếu bạn nhập sai bạn sẽ mất thẻ, bạn có chắc chắn hay không??");
return c;
});
});