| Server IP : 167.99.224.18 / Your IP : 216.73.216.136 Web Server : Apache/2.4.41 (Ubuntu) System : Linux wordpress-ubuntu-s-1vcpu-1gb-nyc1-01 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.0.25 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/html/wp-content/plugins-old/wp-fastest-cache/js/ |
Upload File : |
var WpfcDB = {
init: function(){
var self = this;
jQuery("#wpfc-db").change(function(e){
jQuery("#revert-loader-toolbar").show();
self.update();
});
if(jQuery(".tab8").is(":visible")){
jQuery("#revert-loader-toolbar").show();
self.update();
}
jQuery(function(){
self.update();
});
self.click_event_for_warnings();
self.click_event_for_auto_cleanup();
},
click_event_for_auto_cleanup: function(){
jQuery("#wpfc-auto-cleanup-option").change(function(){
let status = jQuery(this).val();
let nonce = jQuery("#wpfc-auto-cleanup-nonce").val();
jQuery("#revert-loader-toolbar").show();
jQuery.ajax({
type: 'POST',
url: ajaxurl,
dataType : "json",
data : {"action": "wpfc_db_set_auto_cleanup", "status" : status, "nonce" : nonce},
cache: false,
success: function(data){
if(typeof data.status != "undefined"){
jQuery("#wpfc-auto-cleanup-option").val(data.status);
}else{
jQuery("#wpfc-auto-cleanup-option").val("off");
}
jQuery("#revert-loader-toolbar").hide();
console.log(data);
}
});
});
},
click_event_for_warnings: function(){
var self = this;
jQuery("div.tab8 div[wpfc-db-name]").click(function(e){
jQuery("#revert-loader-toolbar").show();
jQuery.ajax({
type: 'GET',
url: ajaxurl,
dataType : "json",
data : {"action": "wpfc_db_fix", "type": jQuery(this).attr("wpfc-db-name")},
cache: false,
success: function(data){
if(data.success){
self.update();
}else{
jQuery("#revert-loader-toolbar").hide();
if(data.showupdatewarning){
Wpfc_New_Dialog.dialog("wpfc-modal-updatenow", {close: function(){
Wpfc_New_Dialog.clone.find("div.window-content input").each(function(){
if(jQuery(this).attr("checked")){
var id = jQuery(this).attr("action-id");
jQuery("div.tab1 div[template-id='wpfc-modal-updatenow'] div.window-content input#" + id).attr("checked", true);
}
});
Wpfc_New_Dialog.clone.remove();
}});
}else{
if(typeof data.message != "undefined" && data.message){
alert(data.message);
}else{
alert("DB Error");
}
}
}
}
});
});
},
update: function(){
var self = this;
jQuery.ajax({
type: 'GET',
url: ajaxurl,
dataType : "json",
data : {"action": "wpfc_db_statics", "nonce" : wpfc_nonce},
cache: false,
success: function(data){
jQuery.each(data, function(key, value){
jQuery(".tab8 div[wpfc-db-name='" + key + "'] span.db-number").css({'color': (value > 0) ? "red" : "#6BC359"});
jQuery(".tab8 div[wpfc-db-name='" + key + "'] span.db-number").text("(" + value + ")");
jQuery(".tab8 div[wpfc-db-name='" + key + "'] div.meta").attr('class', (value > 0) ? "meta warning" : "meta success");
});
if(data.all_warnings > 0){
jQuery("label[for='wpfc-db']").text("DB (" + data.all_warnings + ")");
}else{
jQuery("label[for='wpfc-db']").text("DB");
}
jQuery("#revert-loader-toolbar").hide();
}
});
}
};
// if(window.attachEvent) {
// window.attachEvent('onload', WpfcDB_init);
// } else {
// if(window.onload) {
// var curronload = window.onload;
// var newonload = function(evt) {
// curronload(evt);
// WpfcDB_init(evt);
// };
// window.onload = newonload;
// } else {
// window.onload = WpfcDB_init;
// }
// }
if(window.attachEvent){
window.attachEvent('onload', WpfcDB_init);
}else if(window.addEventListener){
window.addEventListener('load', WpfcDB_init, false);
}
function WpfcDB_init(){WpfcDB.init();}