/**
 * A wrapper function that includes the backup to Dropbox monitor page
 * @return void
 */
function backup_to_dropbox_monitor()
{
    if (!Dropbox_Facade::construct()->is_authorized()) {
        backup_to_dropbox_admin_menu_contents();
    } else {
        $uri = rtrim(WP_PLUGIN_URL, '/') . '/wordpress-backup-to-dropbox';
        include 'Views/wp-backup-to-dropbox-monitor.php';
    }
}
 public function __construct($dropbox = false, $config = false)
 {
     $this->dropbox = $dropbox ? $dropbox : Dropbox_Facade::construct();
     $this->config = $config ? $config : WP_Backup_Config::construct();
     $this->last_backup_time = $this->config->get_option('last_backup_time');
     $this->dropbox_location = null;
     if ($this->config->get_option('store_in_subfolder')) {
         $this->dropbox_location = $this->config->get_option('dropbox_location');
     }
     $this->max_file_size = $this->config->get_max_file_size();
 }
 *          but WITHOUT ANY WARRANTY; without even the implied warranty of
 *          MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *          GNU General Public License for more details.
 *
 *          You should have received a copy of the GNU General Public License
 *          along with this program; if not, write to the Free Software
 *          Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA.
 */
try {
    $v = phpversion();
    if ($v < 5) {
        throw new Exception(sprintf(__('Your PHP version (%s) is too old for this plugin to function correctly please update to PHP 5.2 or higher.'), $v));
    }
    global $wpdb;
    $validation_errors = null;
    $dropbox = Dropbox_Facade::construct();
    $config = WP_Backup_Config::construct();
    $backup = new WP_Backup();
    $disable_backup_now = $config->in_progress();
    //We have a form submit so update the schedule and options
    if (array_key_exists('save_changes', $_POST)) {
        check_admin_referer('backup_to_dropbox_options_save');
        $config->set_schedule($_POST['day'], $_POST['time'], $_POST['frequency']);
        $options = array('store_in_subfolder' => $_POST['store_in_subfolder'] == "on", 'dump_location' => $_POST['dump_location'], 'dropbox_location' => $_POST['dropbox_location']);
        $validation_errors = $config->set_options($options);
    } else {
        if (array_key_exists('unlink', $_POST)) {
            check_admin_referer('backup_to_dropbox_options_save');
            $dropbox->unlink_account();
        } else {
            if (array_key_exists('clear_history', $_POST)) {
 public function __construct($dropbox = null, $output = null)
 {
     $this->dropbox = $dropbox ? $dropbox : Dropbox_Facade::construct();
     $this->output = $output ? $output : WP_Backup_Extension_Manager::construct()->get_output();
     $this->config = WP_Backup_Config::construct();
 }