var timerClock;
var listHari = ["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"]
var listBulan = ["Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Agu", "Sep", "Okt", "Nov", "Des"]

$(document).ready(function() 
{	
	init();
	getCredit();
	getSetting();
	getBroadcast();
	getBankOnline();
	getListKeluaran();
	getMemoTotal();
	getWinBet();
	getRekening();
	
	
	//
	$.ajax({url: "mwebdata.php?status=time", success: function(result){
			timerClock = setInterval(function () {
				result++; writeTime(result);
			},1000);
		}});
	
	setInterval(function () {
	   getCredit();
    },10000);
	
	setInterval(function () {
	   //getStatus();
	   getWinBet();
	   getDepoWD();
	   checkLastLoginPro();
	   //checkIPPro()
	   getStatusMaintenance();
    },60000);
	
	setInterval(function () {
	   getBroadcast();
	   getBankOnline();
	   getListKeluaran();
	   getMemoTotal();
	   
    },60000);
	
	$("#myModal").modal();
	
	
	
});

function logout()
{
	$.ajax({url: "mdata.php?task=logout", success: function(result){
		
		window.location='/?logout';
						
	}});
}

