function init() { $args = array('slug' => 'wipe_repairbuddy', 'title' => 'Wipe RepairBuddy from Server', 'description' => 'Automatically clean and erase all RepairBuddy files.', 'page' => 'home', 'bootstrap_wordpress' => false, 'mini_mode' => true, 'is_subtle' => ''); $this->_module_name = $args['slug']; pb_register_module($args); //Actions $action = sprintf('pb_loadpage_%s_%s', $args['slug'], $args['page']); pb_add_action($action, array(&$this, 'display_page')); }
function init() { $args = array('slug' => 'database_information', 'title' => 'Database Information', 'description' => 'View information about your database and its tables.', 'page' => 'home', 'bootstrap_wordpress' => false, 'mini_mode' => true, 'subtle' => true, 'priority' => 1); $this->_module_name = $args['slug']; pb_register_module($args); //Actions $action = sprintf('pb_loadpage_%s_%s', $args['slug'], $args['page']); pb_add_action($action, array(&$this, 'display_page')); }
function init() { $args = array('slug' => 'database_string_replace', 'title' => 'Database String Replace', 'description' => 'Find & replace text within the database.', 'page' => 'home', 'bootstrap_wordpress' => true, 'mini_mode' => false, 'is_subtle' => ''); $this->_module_name = $args['slug']; pb_register_module($args); //Actions $action = sprintf('pb_loadpage_%s_%s', $args['slug'], $args['page']); pb_add_action($action, array(&$this, 'display_page')); }
function init() { $args = array('slug' => 'malware_scan', 'title' => 'Malware Scan', 'description' => 'Scan your site for malware or suspicious files.', 'page' => 'view_malware', 'bootstrap_wordpress' => true, 'mini_mode' => false, 'is_subtle' => '', 'priority' => 20); $this->_module_name = $args['slug']; pb_register_module($args); //Actions $action = sprintf('pb_loadpage_%s_%s', $args['slug'], $args['page']); pb_add_action($action, array(&$this, 'display_page')); }
function init() { $args = array('slug' => 'options_editor', 'title' => 'WordPress Options Editor', 'description' => 'View and edit data from the WordPress Options table. Serialized data is viewable.', 'page' => 'home', 'bootstrap_wordpress' => true, 'mini_mode' => true, 'subtle' => true, 'priority' => 2); $this->_module_name = $args['slug']; pb_register_module($args); //Actions $action = sprintf('pb_loadpage_%s_%s', $args['slug'], $args['page']); pb_add_action($action, array(&$this, 'display_page')); }
function init() { $args = array('slug' => 'backupbuddy_dat', 'title' => 'BackupBuddy DAT Reader', 'description' => 'Inspect the contents of a BackupBuddy data file for troubleshooting.', 'page' => 'home', 'bootstrap_wordpress' => false, 'mini_mode' => true, 'subtle' => true); $this->_module_name = $args['slug']; pb_register_module($args); //Actions $action = sprintf('pb_loadpage_%s_%s', $args['slug'], $args['page']); pb_add_action($action, array(&$this, 'display_page')); }
function init() { $args = array('slug' => 'server_info', 'title' => 'Server Info.', 'description' => 'Server details and configuration.', 'page' => 'home', 'bootstrap_wordpress' => false, 'mini_mode' => false, 'is_subtle' => '', 'priority' => 25); $this->_module_name = $args['slug']; pb_register_module($args); //Actions $action = sprintf('pb_loadpage_%s_%s', $args['slug'], $args['page']); pb_add_action($action, array(&$this, 'display_page')); pb_add_action(sprintf('pb_loadpage_%s_%s', $args['slug'], 'phpinfo'), array(&$this, 'display_phpinfo')); }
function init() { $args = array('slug' => 'admin_creator', 'title' => 'Create Admin Account', 'description' => 'Create a new administrator user account in WordPress.', 'page' => 'home', 'bootstrap_wordpress' => true, 'mini_mode' => '', 'is_subtle' => ''); $this->_module_name = $args['slug']; pb_register_module($args); //Actions pb_add_action('print_scripts', array(&$this, 'print_scripts')); pb_add_action('print_styles', array(&$this, 'print_styles')); pb_add_action('pb_ajax_search_user', array(&$this, 'ajax_search_user')); pb_add_action('pb_ajax_create_user', array(&$this, 'ajax_create_user')); $action = sprintf('pb_loadpage_%s_%s', $args['slug'], $args['page']); pb_add_action($action, array(&$this, 'display_page')); }
/** * pluginbuddy_importbuddy() * * Default constructor. * */ function __construct() { // SELF DESTRUCT IF APPLICABLE! if ($this->_selfdestruct != ' #SELFDESTRUCT#') { if ($this->_selfdestruct > time()) { echo '<html><body><h3>RepairBuddy is self-destructing . . .</h3>This copy of RepairBuddy has been set to self destruct & expire and the expiration time has passed.</body></html>'; $this->wipe_repairbuddy(); } } // Prevent access to importbuddy.php if it is still in plugin directory. if (file_exists(dirname(__FILE__) . '/backupbuddy.php')) { echo 'This file can ONLY be accessed on the destination server that you wish to use the script on.<br>'; echo 'Upload the importer in the root web directory on the destination server and try again.<br><br>'; echo 'If you need assistance visit <a href="http://pluginbuddy.com">http://pluginbuddy.com</a>'; die; } // Start logging time for steps that report how long they took. $this->time_start = microtime(true); // Set up PHP error levels. if ($this->debug === true || isset($this->_options['show_php_warnings']) && $this->_options['show_php_warnings'] === true) { error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE); // HIGH $this->log('PHP error reporting set HIGH.'); } else { error_reporting(E_ALL ^ E_NOTICE); // LOW } // Detect max execution time for database steps so they can pause when needed for additional PHP processes. $this->detected_max_execution_time = str_ireplace('s', '', ini_get('max_execution_time')); if (is_numeric($this->detected_max_execution_time) === false) { $detected_max_execution_time = 30; } // Handle authentication (if needed). $this->has_access = false; // default if ($this->_defaults['repair_password'] == '#PASSWORD#') { //$this->has_access = true; die('Error #454545. A password is required for this script to function.'); } else { if (md5($this->_options['password']) == $this->_defaults['repair_password']) { $this->has_access = true; } if (isset($_POST['password']) || isset($_GET['v'])) { if (md5($_POST['password']) == $this->_defaults['repair_password']) { $this->_options['password'] = $_POST['password']; $this->has_access = true; } if (isset($_GET['v']) && $_GET['v'] == 'xv' . md5($this->_defaults['repair_password'] . 'repairbuddy' . $_GET['page'])) { $this->has_access = true; } } elseif (isset($_POST['hash']) && isset($_POST['page'])) { if ($_POST['hash'] == 'xv' . md5($this->_defaults['repair_password'] . 'repairbuddy' . $_POST['page'])) { $this->has_access = true; } } } //Initialize The database if ($this->_wpconfig_loaded = defined('PB_WP_CONFIG')) { $this->_database_connected = defined('PB_DB_LOADED'); } pb_add_action('repairbuddy_init', array(&$this, 'init')); }