Exemplo n.º 1
0
                // do nothing
                echo 'Error #89485954. You indicated you authenicated but access was denied. Please go back and try again.';
            } else {
                // First step to user adding a Dropbox account.
                if ($mode != 'edit') {
                    global $pb_hide_save;
                    global $pb_hide_test;
                    $pb_hide_save = true;
                    $pb_hide_test = true;
                    echo '<br><b>Adding a Dropbox destination</b><ol>';
                    echo '<li>Click the <b>' . __('Connect to Dropbox & Authorize', 'it-l10n-backupbuddy') . '</b> button below.</li>';
                    echo '<li>In the new window that opens, login to Dropbox.com if prompted and click <b>Allow</b>.</li>';
                    echo '<li>Return to this window and click the <b>' . __("Yes, I've Authorized BackupBuddy with Dropbox", 'it-l10n-backupbuddy') . '</b> button below.</li>';
                    echo '<li>Configure the destination and click the <b>+' . __('Add Destination', 'it-l10n-backupbuddy') . '</b> button.</li>';
                    echo '</ol>';
                    echo '<a href="' . $dropbuddy->get_authorize_url() . '" class="button-primary pb_dropbox_authorize" target="_new">' . __('Connect to Dropbox & Authorize (opens new window)', 'it-l10n-backupbuddy') . '</a>';
                } else {
                    pb_backupbuddy::$options['dropboxtemptoken'] = '';
                    // Clear temp token.
                    pb_backupbuddy::save();
                    pb_backupbuddy::alert('Error #6557565: Dropbox authentication failed; BackupBuddy access to your account is no longer valid. You should delete this destination and re-add it.', true);
                }
            }
        }
    }
    // Yes, I've Authorized BackupBuddy with Dropbox BUTTON.
    echo '<a href="';
    echo pb_backupbuddy::ajax_url('destination_picker') . '&add=dropbox&callback_data=' . pb_backupbuddy::_GET('callback_data') . '&t=' . time() . '&dropbox_auth=true';
    echo '" id="pb_dropbox_authorize" style="display: none;" class="button-primary">' . __("Yes, I've Authorized BackupBuddy with Dropbox", 'it-l10n-backupbuddy') . '</a>';
    //echo '<br>';
} else {