File manager - Edit - /home/autoph/public_html/connectv1/dist/js/finance_required_fields.js
Back
$(function(){ checkMobile(); checkEmail(); }); function checkMobile(){ $.ajax({ url: "app/finance/finance_settings.php", type: "POST", dataType: 'json', data: { type: 1 // mobile }, beforeSend: function(){ }, success: function(result){ $('#check-mobile-import').prop('checked', parseInt(result.import)); $('#check-mobile-add').prop('checked', parseInt(result.add)); $('#check-mobile-update').prop('checked', parseInt(result.update)); } }); } function checkEmail(){ $.ajax({ url: "app/finance/finance_settings.php", type: "POST", dataType: 'json', data: { type: 2 // email }, beforeSend: function(){ }, success: function(result){ $('#check-email-import').prop('checked', parseInt(result.import)); $('#check-email-add').prop('checked', parseInt(result.add)); $('#check-email-update').prop('checked', parseInt(result.update)); } }); } $('#check-mobile-import').on('click', function(){ var mobile_import = 0; if($('#check-mobile-import').is(":checked")){ mobile_import = 1; } else { mobile_import = 0; } $.ajax({ url: "app/finance/finance_settings.php", type: "POST", dataType: 'json', data: { type: 3, // update mobile settings field: 1, // mobile import mobile_import: mobile_import }, beforeSend: function(){ }, success: function(result){ if(result.status == 1){ toastr.remove(); toastr.success("Mobile importing status changed"); } else { toastr.remove(); toastr.error("Mobile importing status changed failure"); } } }); }); $('#check-mobile-add').on('click', function(){ var mobile_add = 0; if($('#check-mobile-add').is(":checked")){ mobile_add = 1; } else { mobile_add = 0; } $.ajax({ url: "app/finance/finance_settings.php", type: "POST", dataType: 'json', data: { type: 3, // update mobile settings field: 2, // mobile add mobile_add: mobile_add }, beforeSend: function(){ }, success: function(result){ if(result.status == 1){ toastr.remove(); toastr.success("Mobile adding status changed"); } else { toastr.remove(); toastr.error("Mobile adding status changed failure"); } } }); }); $('#check-mobile-update').on('click', function(){ var mobile_update = 0; if($('#check-mobile-update').is(":checked")){ mobile_update = 1; } else { mobile_update = 0; } $.ajax({ url: "app/finance/finance_settings.php", type: "POST", dataType: 'json', data: { type: 3, // update mobile settings field: 3, // mobile update mobile_update: mobile_update }, beforeSend: function(){ }, success: function(result){ if(result.status == 1){ toastr.remove(); toastr.success("Mobile updating status changed"); } else { toastr.remove(); toastr.error("Mobile updating status changed failure"); } } }); }); $('#check-email-import').on('click', function(){ var email_import = 0; if($('#check-email-import').is(":checked")){ email_import = 1; } else { email_import = 0; } $.ajax({ url: "app/finance/finance_settings.php", type: "POST", dataType: 'json', data: { type: 3, // update email settings field: 4, // email import email_import: email_import }, beforeSend: function(){ }, success: function(result){ if(result.status == 1){ toastr.remove(); toastr.success("Email importing status changed"); } else { toastr.remove(); toastr.error("Email importing status changed failure"); } } }); }); $('#check-email-add').on('click', function(){ var email_add = 0; if($('#check-email-add').is(":checked")){ email_add = 1; } else { email_add = 0; } $.ajax({ url: "app/finance/finance_settings.php", type: "POST", dataType: 'json', data: { type: 3, // update email settings field: 5, // email add email_add: email_add }, beforeSend: function(){ }, success: function(result){ if(result.status == 1){ toastr.remove(); toastr.success("Email adding status changed"); } else { toastr.remove(); toastr.error("Email adding status changed failure"); } } }); }); $('#check-email-update').on('click', function(){ var email_update = 0; if($('#check-email-update').is(":checked")){ email_update = 1; } else { email_update = 0; } $.ajax({ url: "app/finance/finance_settings.php", type: "POST", dataType: 'json', data: { type: 3, // update email settings field: 6, // email update email_update: email_update }, beforeSend: function(){ }, success: function(result){ if(result.status == 1){ toastr.remove(); toastr.success("Email updating status changed"); } else { toastr.remove(); toastr.error("Email updating status changed failure"); } } }); }); $('#check-policy-import').on('click', function(){ var policy_import = 0; if($('#check-policy-import').is(":checked")){ policy_import = 1; } else { policy_import = 0; } $.ajax({ url: "app/finance/finance_settings.php", type: "POST", dataType: 'json', data: { type: 3, // update policy settings field: 7, // policy import policy_import: policy_import }, beforeSend: function(){ }, success: function(result){ if(result.status == 1){ toastr.remove(); toastr.success("Policy importing status changed"); } else { toastr.remove(); toastr.error("Policy importing status changed failure"); } } }); }); $('#check-policy-add').on('click', function(){ var policy_add = 0; if($('#check-policy-add').is(":checked")){ policy_add = 1; } else { policy_add = 0; } $.ajax({ url: "app/finance/finance_settings.php", type: "POST", dataType: 'json', data: { type: 3, // update policy settings field: 8, // policy adding policy_add: policy_add }, beforeSend: function(){ }, success: function(result){ if(result.status == 1){ toastr.remove(); toastr.success("Policy adding status changed"); } else { toastr.remove(); toastr.error("Policy adding status changed failure"); } } }); }); $('#check-policy-update').on('click', function(){ var policy_update = 0; if($('#check-policy-update').is(":checked")){ policy_update = 1; } else { policy_update = 0; } $.ajax({ url: "app/finance/finance_settings.php", type: "POST", dataType: 'json', data: { type: 3, // update policy settings field: 9, // policy updating policy_update: policy_update }, beforeSend: function(){ }, success: function(result){ if(result.status == 1){ toastr.remove(); toastr.success("Policy updating status changed"); } else { toastr.remove(); toastr.error("Policy updating status changed failure"); } } }); });
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings