HEX
Server: Apache
System: Linux hvh16.mirohost.net 6.14.0-29-generic #29~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Aug 14 16:52:50 UTC 2 x86_64
User: likoholding (1037)
PHP: 7.3.33-25+0~20250707.133+debian12~1.gbp70fb14
Disabled: apache_child_terminate, dl, exec, imap_body, imap_createmailbox, imap_deletemailbox, imap_list, imap_open, imap_renamemailbox, inject_code, mb_send_mail, passthru, pcntl_alarm, pcntl_async_signals, pcntl_errno, pcntl_exec, pcntl_fork, pcntl_get_last_error, pcntl_getpriority, pcntl_setpriority, pcntl_signal, pcntl_signal_dispatch, pcntl_signal_get_handler, pcntl_sigprocmask, pcntl_sigtimedwait, pcntl_sigwaitinfo, pcntl_strerror, pcntl_wait, pcntl_waitpid, pcntl_wexitstatus, pcntl_wifcontinued, pcntl_wifexited, pcntl_wifsignaled, pcntl_wifstopped, pcntl_wstopsig, pcntl_wtermsig, popen, posix_getpwuid, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, proc_close, proc_get_status, proc_nice, proc_open, proc_terminate, set_time_limit, shell_exec, symlink, system
Upload Files
File: /var/www/likoholding/liko-holding.com.ua/wp-content/plugins/wp-fastest-cache/js/db.js
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();
	},
	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"},
			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();}