var Slide = false; $(window).on('load', function() { $("#API").fadeIn("slow", function() {}); setTimeout(function() { $('#token').val('').attr('type', 'password'); }, 420); }); $(document).ready(function() { $(".Disabled").prop('disabled', true); $(".close, #Exit").click(function() { if ($(".Agenda").is(":visible")) { $(".modal-menu").hide('slide', { direction: 'left' }, 700); setTimeout(() => { $('.modal').delay(200).fadeOut('slow'); }, "300"); } else { $('.modal').delay(200).fadeOut('slow'); } }); $("#Scheduler").on("click", function() { $(".Emoticons").hide(); $(".modal, .Agenda").show(); setTimeout(() => { $(".modal-menu").show('slide', { direction: 'left' }, 700); }, "300"); }); $(".SendEmoji").on("click", function() { $(".Agenda").hide(); $(".modal, .Emoticons").show(); }); }); $(document).on('click', '.btn-emoji', (event) => { event.preventDefault(); $.ajax({ type: "POST", url: "/emoji", data: { find: $(event.target).attr('data-code'), in: 'key', out: 'emoji' }, success: function(data) { Emoji = data.Return; InsertEmotion(Emoji); } }); event.stopImmediatePropagation(); }); function InsertEmotion(Emoji) { $('.modal').fadeOut('fast'); if ($("#Message").is(":visible")) { $('#Message').val($('#Message').val() + Emoji).focus(); } if ($("#MSG_A01").is(":visible")) { $('#MSG_A01').val($('#MSG_A01').val() + Emoji).focus(); } if ($("#MSG_A02").is(":visible")) { $('#MSG_A02').val($('#MSG_A02').val() + Emoji).focus(); } if ($("#MSG_A03").is(":visible")) { $('#MSG_A03').val($('#MSG_A03').val() + Emoji).focus(); } if ($("#MSG_B01").is(":visible")) { $('#MSG_B01').val($('#MSG_B01').val() + Emoji).focus(); } if ($("#MSG_B02").is(":visible")) { $('#MSG_B02').val($('#MSG_B02').val() + Emoji).focus(); } if ($("#MSG_B03").is(":visible")) { $('#MSG_B03').val($('#MSG_B03').val() + Emoji).focus(); } if ($("#MSG_C01").is(":visible")) { $('#MSG_C01').val($('#MSG_C01').val() + Emoji).focus(); } if ($("#MSG_C02").is(":visible")) { $('#MSG_C02').val($('#MSG_C02').val() + Emoji).focus(); } if ($("#MSG_C03").is(":visible")) { $('#MSG_C03').val($('#MSG_C03').val() + Emoji).focus(); } if ($("#MSG_D01").is(":visible")) { $('#MSG_D01').val($('#MSG_D01').val() + Emoji).focus(); } if ($("#MSG_D02").is(":visible")) { $('#MSG_D02').val($('#MSG_D02').val() + Emoji).focus(); } if ($("#MSG_D03").is(":visible")) { $('#MSG_D03').val($('#MSG_D03').val() + Emoji).focus(); } if ($("#MSG_E01").is(":visible")) { $('#MSG_E01').val($('#MSG_E01').val() + Emoji).focus(); } if ($("#MSG_E02").is(":visible")) { $('#MSG_E02').val($('#MSG_E02').val() + Emoji).focus(); } if ($("#MSG_E03").is(":visible")) { $('#MSG_E03').val($('#MSG_E03').val() + Emoji).focus(); } if ($("#MSG_F01").is(":visible")) { $('#MSG_F01').val($('#MSG_F01').val() + Emoji).focus(); } if ($("#MSG_F02").is(":visible")) { $('#MSG_F02').val($('#MSG_F02').val() + Emoji).focus(); } if ($("#MSG_F03").is(":visible")) { $('#MSG_F03').val($('#MSG_F03').val() + Emoji).focus(); } if ($("#MSG_G01").is(":visible")) { $('#MSG_G01').val($('#MSG_G01').val() + Emoji).focus(); } if ($("#MSG_G02").is(":visible")) { $('#MSG_G02').val($('#MSG_G02').val() + Emoji).focus(); } if ($("#MSG_G03").is(":visible")) { $('#MSG_G03').val($('#MSG_G03').val() + Emoji).focus(); } if ($("#MSG_H01").is(":visible")) { $('#MSG_H01').val($('#MSG_H01').val() + Emoji).focus(); } if ($("#MSG_H02").is(":visible")) { $('#MSG_H02').val($('#MSG_H02').val() + Emoji).focus(); } if ($("#MSG_H03").is(":visible")) { $('#MSG_H03').val($('#MSG_H03').val() + Emoji).focus(); } if ($("#MSG_I01").is(":visible")) { $('#MSG_I01').val($('#MSG_I01').val() + Emoji).focus(); } if ($("#MSG_I02").is(":visible")) { $('#MSG_I02').val($('#MSG_I02').val() + Emoji).focus(); } if ($("#MSG_I03").is(":visible")) { $('#MSG_I03').val($('#MSG_I03').val() + Emoji).focus(); } if ($("#MSG_J01").is(":visible")) { $('#MSG_J01').val($('#MSG_J01').val() + Emoji).focus(); } if ($("#MSG_J02").is(":visible")) { $('#MSG_J02').val($('#MSG_J02').val() + Emoji).focus(); } if ($("#MSG_J03").is(":visible")) { $('#MSG_J03').val($('#MSG_J03').val() + Emoji).focus(); } if ($("#MSG_K01").is(":visible")) { $('#MSG_K01').val($('#MSG_K01').val() + Emoji).focus(); } if ($("#MSG_K02").is(":visible")) { $('#MSG_K02').val($('#MSG_K02').val() + Emoji).focus(); } if ($("#MSG_K03").is(":visible")) { $('#MSG_K03').val($('#MSG_K03').val() + Emoji).focus(); } } $(document).ready(function() { var Turno = $('#Turno').val(); var Select = $('#Select').val(); $(".MSG_Box").hide(); switch (Turno) { case "before": $("#Placeholder_001").text("Days Before"); switch (Select) { case "1": $("#MSG_A01, #Placeholder_001, #MSG_Box_001").fadeIn("slow", function() { }); break; case "2": $("#MSG_A02, #Placeholder_001, #MSG_Box_001").fadeIn("slow", function() { }); break; case "3": $("#MSG_A03, #Placeholder_001, #MSG_Box_001").fadeIn("slow", function() { }); break; } break; case "day": $("#Placeholder_002").text("In Day"); switch (Select) { case "1": $("#MSG_B01, #Placeholder_002, #MSG_Box_002").fadeIn("slow", function() { }); break; case "2": $("#MSG_B02, #Placeholder_002, #MSG_Box_002").fadeIn("slow", function() { }); break; case "3": $("#MSG_B03, #Placeholder_002, #MSG_Box_002").fadeIn("slow", function() { }); break; } break; case "later": $("#Placeholder_003").text("Days Later"); switch (Select) { case "1": $("#MSG_C01, #Placeholder_003, #MSG_Box_003").fadeIn("slow", function() { }); break; case "2": $("#MSG_C02, #Placeholder_003, #MSG_Box_003").fadeIn("slow", function() { }); break; case "3": $("#MSG_C03, #Placeholder_003, #MSG_Box_003").fadeIn("slow", function() { }); break; } break; case "Pay": $("#Placeholder_004").text("Payment Received"); switch (Select) { case "1": $("#MSG_D01, #Placeholder_004, #MSG_Box_004").fadeIn("slow", function() { }); break; case "2": $("#MSG_D02, #Placeholder_004, #MSG_Box_004").fadeIn("slow", function() { }); break; case "3": $("#MSG_D03, #Placeholder_004, #MSG_Box_004").fadeIn("slow", function() { }); break; } break; case "Lock": $("#Placeholder_005").text("Locked User"); switch (Select) { case "1": $("#MSG_E01, #Placeholder_005, #MSG_Box_005").fadeIn("slow", function() { }); break; case "2": $("#MSG_E02, #Placeholder_005, #MSG_Box_005").fadeIn("slow", function() { }); break; case "3": $("#MSG_E03, #Placeholder_005, #MSG_Box_005").fadeIn("slow", function() { }); break; } break; case "Unlock": $("#Placeholder_006").text("Unlocked User"); switch (Select) { case "1": $("#MSG_F01, #Placeholder_006, #MSG_Box_006").fadeIn("slow", function() { }); break; case "2": $("#MSG_F02, #Placeholder_006, #MSG_Box_006").fadeIn("slow", function() { }); break; case "3": $("#MSG_F03, #Placeholder_006, #MSG_Box_006").fadeIn("slow", function() { }); break; } break; case "Maintenance": $("#Placeholder_007").text("Maintenance"); switch (Select) { case "1": $("#MSG_G01, #Placeholder_007, #MSG_Box_007").fadeIn("slow", function() { }); break; case "2": $("#MSG_G02, #Placeholder_007, #MSG_Box_007").fadeIn("slow", function() { }); break; case "3": $("#MSG_G03, #Placeholder_007, #MSG_Box_007").fadeIn("slow", function() { }); break; } break; case "Unistall": $("#Placeholder_008").text("Unistall Device"); switch (Select) { case "1": $("#MSG_H01, #Placeholder_008, #MSG_Box_008").fadeIn("slow", function() { }); break; case "2": $("#MSG_H02, #Placeholder_008, #MSG_Box_008").fadeIn("slow", function() { }); break; case "3": $("#MSG_H03, #Placeholder_008, #MSG_Box_008").fadeIn("slow", function() { }); break; } break; case "Speed": $("#Placeholder_009").text("Low Speed"); switch (Select) { case "1": $("#MSG_I01, #Placeholder_009, #MSG_Box_009").fadeIn("slow", function() { }); break; case "2": $("#MSG_I02, #Placeholder_009, #MSG_Box_009").fadeIn("slow", function() { }); break; case "3": $("#MSG_I03, #Placeholder_009, #MSG_Box_009").fadeIn("slow", function() { }); break; } break; case "Block": $("#Placeholder_010").text("Blocked User"); switch (Select) { case "1": $("#MSG_J01, #Placeholder_010, #MSG_Box_010").fadeIn("slow", function() { }); break; case "2": $("#MSG_J02, #Placeholder_010, #MSG_Box_010").fadeIn("slow", function() { }); break; case "3": $("#MSG_J03, #Placeholder_010, #MSG_Box_010").fadeIn("slow", function() { }); break; } break; case "Support": $("#Placeholder_011").text("Support Opening"); switch (Select) { case "1": $("#MSG_K01, #Placeholder_011, #MSG_Box_011").fadeIn("slow", function() { }); break; case "2": $("#MSG_K02, #Placeholder_011, #MSG_Box_011").fadeIn("slow", function() { }); break; case "3": $("#MSG_K03, #Placeholder_011, #MSG_Box_011").fadeIn("slow", function() { }); break; } break; } $("#Turno, #Select").on('change', function() { var Turno = $('#Turno').val(); var Select = $('#Select').val(); $(".MSG_Box").hide(); switch (Turno) { case "before": $("#Placeholder_001").text("Days Before"); switch (Select) { case "1": $("#MSG_A01, #Placeholder_001, #MSG_Box_001").fadeIn("slow", function() { }); break; case "2": $("#MSG_A02, #Placeholder_001, #MSG_Box_001").fadeIn("slow", function() { }); break; case "3": $("#MSG_A03, #Placeholder_001, #MSG_Box_001").fadeIn("slow", function() { }); break; } break; case "day": $("#Placeholder_002").text("In Day"); switch (Select) { case "1": $("#MSG_B01, #Placeholder_002, #MSG_Box_002").fadeIn("slow", function() { }); break; case "2": $("#MSG_B02, #Placeholder_002, #MSG_Box_002").fadeIn("slow", function() { }); break; case "3": $("#MSG_B03, #Placeholder_002, #MSG_Box_002").fadeIn("slow", function() { }); break; } break; case "later": $("#Placeholder_003").text("Days Later"); switch (Select) { case "1": $("#MSG_C01, #Placeholder_003, #MSG_Box_003").fadeIn("slow", function() { }); break; case "2": $("#MSG_C02, #Placeholder_003, #MSG_Box_003").fadeIn("slow", function() { }); break; case "3": $("#MSG_C03, #Placeholder_003, #MSG_Box_003").fadeIn("slow", function() { }); break; } break; case "Pay": $("#Placeholder_004").text("Payment Received"); switch (Select) { case "1": $("#MSG_D01, #Placeholder_004, #MSG_Box_004").fadeIn("slow", function() { }); break; case "2": $("#MSG_D02, #Placeholder_004, #MSG_Box_004").fadeIn("slow", function() { }); break; case "3": $("#MSG_D03, #Placeholder_004, #MSG_Box_004").fadeIn("slow", function() { }); break; } break; case "Lock": $("#Placeholder_005").text("Locked User"); switch (Select) { case "1": $("#MSG_E01, #Placeholder_005, #MSG_Box_005").fadeIn("slow", function() { }); break; case "2": $("#MSG_E02, #Placeholder_005, #MSG_Box_005").fadeIn("slow", function() { }); break; case "3": $("#MSG_E03, #Placeholder_005, #MSG_Box_005").fadeIn("slow", function() { }); break; } break; case "Unlock": $("#Placeholder_006").text("Unlocked User"); switch (Select) { case "1": $("#MSG_F01, #Placeholder_006, #MSG_Box_006").fadeIn("slow", function() { }); break; case "2": $("#MSG_F02, #Placeholder_006, #MSG_Box_006").fadeIn("slow", function() { }); break; case "3": $("#MSG_F03, #Placeholder_006, #MSG_Box_006").fadeIn("slow", function() { }); break; } break; case "Maintenance": $("#Placeholder_007").text("Maintenance"); switch (Select) { case "1": $("#MSG_G01, #Placeholder_007, #MSG_Box_007").fadeIn("slow", function() { }); break; case "2": $("#MSG_G02, #Placeholder_007, #MSG_Box_007").fadeIn("slow", function() { }); break; case "3": $("#MSG_G03, #Placeholder_007, #MSG_Box_007").fadeIn("slow", function() { }); break; } break; case "Unistall": $("#Placeholder_008").text("Unistall Device"); switch (Select) { case "1": $("#MSG_H01, #Placeholder_008, #MSG_Box_008").fadeIn("slow", function() { }); break; case "2": $("#MSG_H02, #Placeholder_008, #MSG_Box_008").fadeIn("slow", function() { }); break; case "3": $("#MSG_H03, #Placeholder_008, #MSG_Box_008").fadeIn("slow", function() { }); break; } break; case "Speed": $("#Placeholder_009").text("Low Speed"); switch (Select) { case "1": $("#MSG_I01, #Placeholder_009, #MSG_Box_009").fadeIn("slow", function() { }); break; case "2": $("#MSG_I02, #Placeholder_009, #MSG_Box_009").fadeIn("slow", function() { }); break; case "3": $("#MSG_I03, #Placeholder_009, #MSG_Box_009").fadeIn("slow", function() { }); break; } break; case "Block": $("#Placeholder_010").text("Blocked User"); switch (Select) { case "1": $("#MSG_J01, #Placeholder_010, #MSG_Box_010").fadeIn("slow", function() { }); break; case "2": $("#MSG_J02, #Placeholder_010, #MSG_Box_010").fadeIn("slow", function() { }); break; case "3": $("#MSG_J03, #Placeholder_010, #MSG_Box_010").fadeIn("slow", function() { }); break; } break; case "Support": $("#Placeholder_011").text("Support Opening"); switch (Select) { case "1": $("#MSG_K01, #Placeholder_011, #MSG_Box_011").fadeIn("slow", function() { }); break; case "2": $("#MSG_K02, #Placeholder_011, #MSG_Box_011").fadeIn("slow", function() { }); break; case "3": $("#MSG_K03, #Placeholder_011, #MSG_Box_011").fadeIn("slow", function() { }); break; } break; } }); $("#TABLE").tooltip({ selector: '[data-toggle=tooltip]', position: { my: 'left center', at: 'right center' }, placement: 'right' }); }); $(document).ready(function() { $("#HASHTABLE, #HASHTABLESCHED").tooltip({ selector: '[data-toggle=tooltip]', position: { my: 'left center', at: 'right center' }, placement: 'right' }); }); function toCapitalize(str) { return str .toLowerCase() .split(' ') .map(word => word.charAt(0).toUpperCase() + word.substr(1)) .join(' '); } $(document).ready(function() { $("tbody.onClick").delegate('tr', 'click', function(event) { event.preventDefault(); const uID_Push = "#push_" + $(this).attr('data-code') + ""; const uID_Status = "#status_" + $(this).attr('data-code') + ""; const uID_Code = "#" + $(this).attr('data-code') + ""; var Cursor = "default"; if (($(uID_Status).text()).toLowerCase() != "finished") { $.ajax({ type: "POST", url: "/send-mkauth", data: { client: $(this).attr('data-client'), user: $(this).attr('data-user'), code: $(this).attr('data-code'), status: $(this).attr('data-status'), payment: $(this).attr('data-payment'), contact: $(this).attr('data-contact'), reward: $(this).attr('data-reward'), push: $(this).attr('data-push'), cash: $(this).attr('data-cash'), gateway: $(this).attr('data-gateway'), token: $("#token").val() }, beforeSend: function(data) { $("#MkSend").fadeIn("slow", function() { $(".Reset").removeClass("change").addClass("fa-spin").prop('disabled', true); }); }, success: function(data) { if (data.Status == "Success") { var Icon = "fa-check"; $(uID_Push).text(new Date(data.RPush).toLocaleString("pt-br").replace(",", "")); $(uID_Status).text(data.RStatus); } if (data.Status == "Fail") { var Icon = "fa-exclamation"; $(uID_Push).text(new Date(data.RPush).toLocaleString("pt-br").replace(",", "")); $(uID_Status).text(data.Status); } if ((data.RStatus).toLowerCase() == "finished") { Cursor = "no-drop"; } else { Cursor = "pointer"; } $(uID_Code).attr('style', 'cursor: ' + Cursor); $.jGrowl(' ' + data.Return, { header: '