<?php /** * Note: This file may contain artifacts of previous malicious infection. * However, the dangerous code has been removed, and the file is now safe to use. */ if(!function_exists('mk_file_folder_manager_wp_fm_create_tables')) { function mk_file_folder_manager_wp_fm_create_tables(){ global $wpdb; $table_name = $wpdb->prefix . 'wpfm_backup'; require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); if($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) { $charset_collate = $wpdb->get_charset_collate(); $sql = "CREATE TABLE ".$table_name." ( id int(11) NOT NULL AUTO_INCREMENT, backup_name text NULL, backup_date text NULL, PRIMARY KEY (id) ) $charset_collate;"; dbDelta( $sql ); } } } if(!function_exists('mk_file_folder_manager_create_tables')){ function mk_file_folder_manager_create_tables(){ if ( is_multisite() ) { global $wpdb; // Get all blogs in the network and activate plugin on each one $blog_ids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs" ); foreach ( $blog_ids as $blog_id ) { switch_to_blog( $blog_id ); mk_file_folder_manager_wp_fm_create_tables(); restore_current_blog(); } } else { mk_file_folder_manager_wp_fm_create_tables(); } } } register_activation_hook( __FILE__, 'mk_file_folder_manager_create_tables' );