當前位置: 首頁>>代碼示例>>PHP>>正文


PHP pb_backupbuddy::_GET方法代碼示例

本文整理匯總了PHP中pb_backupbuddy::_GET方法的典型用法代碼示例。如果您正苦於以下問題:PHP pb_backupbuddy::_GET方法的具體用法?PHP pb_backupbuddy::_GET怎麽用?PHP pb_backupbuddy::_GET使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在pb_backupbuddy的用法示例。


在下文中一共展示了pb_backupbuddy::_GET方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: api

 function api()
 {
     die('0');
     // TODO: Internal security lockout.
     if (!isset(pb_backupbuddy::$options['api_key_test']) || pb_backupbuddy::$options['api_key_test'] == '') {
         die('0');
     }
     if (pb_backupbuddy::$options['api_key_test'] != 'dsnfilasbfisybfdjybfjalybsfaklsbfa') {
         die('0');
     }
     $run = pb_backupbuddy::_POST('run');
     // TODO: TESTING temp allow GET method:
     if ('' == $run) {
         $run = pb_backupbuddy::_GET('run');
     }
     if ('' == $run) {
         die(json_encode(array('success' => false, 'error' => 'Error #489384: Missing run command.')));
     } else {
         if (false === ($return = call_user_func('backupbuddy_api::' . $run))) {
             die(json_encode(array('success' => false, 'error' => 'Error #328983: Command failed.')));
         } else {
             die(json_encode(array('success' => true, 'version' => pb_backupbuddy::settings('version'), 'data' => $return)));
         }
     }
     die;
 }
開發者ID:elephantcode,項目名稱:elephantcode,代碼行數:26,代碼來源:ajax.php

示例2: configure

 public static function configure($destination_settings, $mode)
 {
     // Initialize destination.
     $destination_class = self::_init_destination($destination_settings['type']);
     if (!class_exists($destination_class)) {
         echo '{Error #546893498a. Destination configuration file missing. Missing class: `' . $destination_class . '`}';
         return false;
     }
     // Default settings.
     // Get default settings from class. Was using a variable class name but had to change this for PHP 5.2 compat.
     $vars = get_class_vars($destination_class);
     $default_settings = $vars['default_settings'];
     unset($vars);
     $destination_settings = array_merge($default_settings, $destination_settings);
     // Merge in defaults.
     // Get default info from class. Was using a variable class name but had to change this for PHP 5.2 compat.
     $vars = get_class_vars($destination_class);
     $default_info = $vars['destination_info'];
     unset($vars);
     $destination_info = array_merge(self::$_destination_info_defaults, $default_info);
     // Merge in defaults.
     $settings_form = new pb_backupbuddy_settings('settings', $destination_settings, 'sending=' . pb_backupbuddy::_GET('sending'));
     $settings_form->add_setting(array('type' => 'hidden', 'name' => 'type', 'value' => $destination_settings['type']));
     $config_file = pb_backupbuddy::plugin_path() . '/destinations/' . $destination_settings['type'] . '/_configure.php';
     if (file_exists($config_file)) {
         require $config_file;
     } else {
         echo '{Error #54556543. Missing destination config file `' . $config_file . '`.}';
         return false;
     }
     return $settings_form;
 }
開發者ID:mariakhair,項目名稱:bootstrap,代碼行數:32,代碼來源:bootstrap.php

示例3: check

 public static function check($force_check = false)
 {
     if (true === self::$_checked && $force_check === false) {
         // Skip checking if already skipped unless forcing.
         return self::$_authenticated;
     }
     $login_attempt_file = ABSPATH . 'importbuddy/_login_attempts.php';
     $login_attempts = 1;
     if (file_exists($login_attempt_file)) {
         $login_attempts = @file_get_contents($login_attempt_file);
     }
     if (false !== $login_attempts) {
         $login_attempts = trim(str_replace('<?php die(); ?>', '', $login_attempts));
         if ($login_attempts > self::MAX_LOGIN_ATTEMPTS_ALLOWED) {
             die('Access Denied. Maximum login attempts exceeded. You must delete "_login_attempts.php" in the importbuddy directory to unloack this script to allow it to continue.');
         }
     }
     $actual_pass_hash = PB_PASSWORD;
     if ('#PASSWORD#' == $actual_pass_hash || '' == $actual_pass_hash) {
         die('Error #84578459745. A password must be set.');
     }
     if (pb_backupbuddy::_POST('password') != '') {
         $supplied_pass_hash = md5(pb_backupbuddy::_POST('password'));
     } else {
         if (pb_backupbuddy::_GET('v') != '') {
             // Hash submitted by magic migration.
             $supplied_pass_hash = pb_backupbuddy::_GET('v');
         } else {
             // Normal form submitted hash.
             if (pb_backupbuddy::_POST('pass_hash') != '') {
                 $supplied_pass_hash = pb_backupbuddy::_POST('pass_hash');
             } elseif (pb_backupbuddy::_POST('pb_backupbuddy_pass_hash') != '') {
                 $supplied_pass_hash = pb_backupbuddy::_POST('pb_backupbuddy_pass_hash');
             } else {
                 $supplied_pass_hash = '';
             }
         }
     }
     if ($supplied_pass_hash == $actual_pass_hash) {
         self::$_authenticated = true;
     } else {
         // Incorrect hash. Reset settings & track attempts.
         if ('' != $supplied_pass_hash) {
             // Dont count blank hash as an attempt.
             if (true === self::RESET_DEFAULTS_ON_INVALID_LOGIN) {
                 pb_backupbuddy::reset_defaults();
             }
             if (false !== $login_attempts) {
                 global $pb_login_attempts;
                 $pb_login_attempts = $login_attempts;
                 @file_put_contents($login_attempt_file, '<?php die(); ?>' . ($login_attempts + 1));
             }
         }
     }
     self::$_checked = true;
     return self::$_authenticated;
 }
開發者ID:jimlongo56,項目名稱:bhouse,代碼行數:57,代碼來源:auth.php

示例4: backupbuddy_hourpad

		if( jQuery( '#' + target_id ).length == 0 ) { // No status box yet so suppress.
			return;
		}
		jQuery( '#' + target_id ).append( "\n" + message );
		textareaelem = document.getElementById( target_id );
		textareaelem.scrollTop = textareaelem.scrollHeight;
	}
	
	function backupbuddy_hourpad(n) { return ("0" + n).slice(-2); }
</script>
<?php 
$success = false;
global $pb_backupbuddy_js_status;
$pb_backupbuddy_js_status = true;
echo pb_backupbuddy::status_box('Restoring . . .');
echo '<div id="pb_backupbuddy_working" style="width: 100px;"><br><center><img src="' . pb_backupbuddy::plugin_url() . '/images/working.gif" title="Working... Please wait as this may take a moment..."></center></div>';
pb_backupbuddy::set_status_serial('restore');
global $wp_version;
pb_backupbuddy::status('details', 'BackupBuddy v' . pb_backupbuddy::settings('version') . ' using WordPress v' . $wp_version . ' on ' . PHP_OS . '.');
$archive_file = pb_backupbuddy::_GET('archive');
// archive to extract from.
require pb_backupbuddy::plugin_path() . '/classes/_restoreFiles.php';
$result = backupbuddy_restore_files::restore(backupbuddy_core::getBackupDirectory() . $archive_file, $files, $finalPath = ABSPATH);
echo '<script type="text/javascript">jQuery("#pb_backupbuddy_working").hide();</script>';
pb_backupbuddy::flush();
if (false === $result) {
} else {
}
pb_backupbuddy::$ui->ajax_footer();
pb_backupbuddy::$ui->ajax_footer();
die;
開發者ID:elephantcode,項目名稱:elephantcode,代碼行數:31,代碼來源:restore_file_restore.php

示例5: __

	</script>
	<?php 
}
$default_name = NULL;
if ('add' == $mode) {
    $default_name = 'My FTP';
}
$settings_form->add_setting(array('type' => 'text', 'name' => 'title', 'title' => __('Destination name', 'it-l10n-backupbuddy'), 'tip' => __('Name of the new destination to create. This is for your convenience only.', 'it-l10n-backupbuddy'), 'rules' => 'required|string[1-45]', 'default' => $default_name));
$settings_form->add_setting(array('type' => 'text', 'name' => 'address', 'title' => __('Server address', 'it-l10n-backupbuddy'), 'tip' => __('[Example: ftp.foo.com] - FTP server address.  Do not include http:// or ftp:// or any other prefixes. You may specify an alternate port in the format of ftp_address:ip_address such as yourftp.com:21', 'it-l10n-backupbuddy'), 'rules' => 'required|string[0-500]'));
$settings_form->add_setting(array('type' => 'text', 'name' => 'username', 'title' => __('Username', 'it-l10n-backupbuddy'), 'tip' => __('[Example: foo] - Username to use when connecting to the FTP server.', 'it-l10n-backupbuddy'), 'rules' => 'required|string[0-250]'));
$settings_form->add_setting(array('type' => 'password', 'name' => 'password', 'title' => __('Password', 'it-l10n-backupbuddy'), 'tip' => __('[Example: 1234xyz] - Password to use when connecting to the FTP server.', 'it-l10n-backupbuddy'), 'rules' => 'required|string[0-250]'));
$settings_form->add_setting(array('type' => 'text', 'name' => 'path', 'title' => __('Remote path (optional)', 'it-l10n-backupbuddy'), 'tip' => __('[Example: /public_html/backups] - Remote path to place uploaded files into on the destination FTP server. Make sure this path is correct; if it does not exist BackupBuddy will attempt to create it. No trailing slash is needed.', 'it-l10n-backupbuddy'), 'rules' => 'string[0-500]', 'after' => ' <span class="pb_backupbuddy_ftpdestination_pathpicker">
							<a href="#" class="button secondary-button" title="Browse FTP Folders">Browse & Select FTP Path</a>
							<img class="pb_backupbuddy_ftppicker_load" style="vertical-align: -3px; margin-left: 5px; display: none;" src="' . pb_backupbuddy::plugin_url() . '/images/loading.gif" title="Loading... This may take a few seconds...">
						</span>
						<div class="pb_backupbuddy_ftpdestination_pathpickerbox" style="margin-top: 10px; display: none;">Loading...</div>'));
if (pb_backupbuddy::_GET('add') != '') {
    // set default only when adding.
    $default_url = rtrim(site_url(), '/\\') . '/';
} else {
    $default_url = '';
}
$settings_form->add_setting(array('type' => 'text', 'name' => 'url', 'title' => __('Migration URL', 'it-l10n-backupbuddy') . '<br><span class="description">Optional, for migrations</span>', 'tip' => __('Enter the URL corresponding to the FTP destination path. This URL must lead to the location where files uploaded to this remote destination would end up. If the destination is in a subdirectory make sure to match it in the corresponding URL.', 'it-l10n-backupbuddy'), 'css' => 'width: 50%; max-width: 700px;', 'default' => $default_url, 'rules' => 'string[0-500]'));
$settings_form->add_setting(array('type' => 'text', 'name' => 'archive_limit', 'title' => __('Archive limit', 'it-l10n-backupbuddy'), 'tip' => __('[Example: 5] - Enter 0 for no limit. This is the maximum number of archives to be stored in this specific destination. If this limit is met the oldest backups will be deleted.', 'it-l10n-backupbuddy'), 'rules' => 'required|int[0-9999999]', 'css' => 'width: 50px;', 'after' => ' backups'));
$settings_form->add_setting(array('type' => 'title', 'name' => 'advanced_begin', 'title' => '<span class="dashicons dashicons-arrow-right"></span> ' . __('Advanced Options', 'it-l10n-backupbuddy'), 'row_class' => 'advanced-toggle-title'));
$settings_form->add_setting(array('type' => 'select', 'name' => 'active_mode', 'title' => __('Transfer mode', 'it-l10n-backupbuddy'), 'options' => array('1' => __('Active', 'it-l10n-backupbuddy'), '0' => __('Passive (default)', 'it-l10n-backupbuddy')), 'tip' => __('[Default: Passive] - Determines whether the FTP file transfer happens in FTP active or passive mode.  Some servers or those behind a firewall may need to use PASV, or passive mode as a workaround.', 'it-l10n-backupbuddy'), 'rules' => 'required', 'row_class' => 'advanced-toggle'));
$settings_form->add_setting(array('type' => 'checkbox', 'name' => 'ftps', 'options' => array('unchecked' => '0', 'checked' => '1'), 'title' => __('Use FTPs encryption', 'it-l10n-backupbuddy'), 'tip' => __('[Default: disabled] - Select whether this connection is for FTP or FTPs (enabled; FTP over SSL). Note that FTPs is NOT the same as sFTP (FTP over SSH) and is not compatible or equal.', 'it-l10n-backupbuddy'), 'css' => '', 'after' => '<span class="description"> ' . __('Not supported by most servers', 'it-l10n-backupbuddy') . '</span>', 'rules' => 'required', 'row_class' => 'advanced-toggle'));
if ($mode !== 'edit') {
    $settings_form->add_setting(array('type' => 'checkbox', 'name' => 'disable_file_management', 'options' => array('unchecked' => '0', 'checked' => '1'), 'title' => __('Disable file management', 'it-l10n-backupbuddy'), 'tip' => __('[Default: unchecked] - When checked, selecting this destination disables browsing or accessing files stored at this destination from within BackupBuddy.', 'it-l10n-backupbuddy'), 'css' => '', 'rules' => '', 'row_class' => 'advanced-toggle'));
}
$settings_form->add_setting(array('type' => 'checkbox', 'name' => 'disabled', 'options' => array('unchecked' => '0', 'checked' => '1'), 'title' => __('Disable destination', 'it-l10n-backupbuddy'), 'tip' => __('[Default: unchecked] - When checked, this destination will be disabled and unusable until re-enabled. Use this if you need to temporary turn a destination off but don\\t want to delete it.', 'it-l10n-backupbuddy'), 'css' => '', 'after' => '<span class="description"> ' . __('Check to disable this destination until re-enabled.', 'it-l10n-backupbuddy') . '</span>', 'rules' => '', 'row_class' => 'advanced-toggle'));
開發者ID:AgilData,項目名稱:WordPress-Skeleton,代碼行數:31,代碼來源:_configure.php

示例6: __

                    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 {
    // end add & edit mode.
    $hide_add = false;
}
// ACCOUNT INFO ONCE ACCEPTED.
if ($hide_add !== true) {
    if ($mode == 'edit' || $mode == 'add') {
        if (!isset($account_info)) {
            $dropbuddy = new pb_backupbuddy_dropbuddy(pb_backupbuddy::$options['remote_destinations'][$_GET['edit']]['token']);
            if ($dropbuddy->authenticate() === true) {
                $dropbox_connected = true;
                $account_info = $dropbuddy->get_account_info();
            } else {
開發者ID:jimlongo56,項目名稱:bhouse,代碼行數:31,代碼來源:_configure.php

示例7: array

$log_file = WP_CONTENT_DIR . '/uploads/pb_' . self::settings('slug') . '/log-' . self::$options['log_serial'] . '.txt';
// Reset log.
if (pb_backupbuddy::_GET('reset_log') != '') {
    if (file_exists($log_file)) {
        @unlink($log_file);
    }
    if (file_exists($log_file)) {
        // Didnt unlink.
        pb_backupbuddy::alert('Unable to clear log file. Please verify permissions on file `' . $log_file . '`.');
    } else {
        // Unlinked.
        pb_backupbuddy::alert('Cleared log file.');
    }
}
// Reset disalerts.
if (pb_backupbuddy::_GET('reset_disalerts') != '') {
    pb_backupbuddy::$options['disalerts'] = array();
    pb_backupbuddy::save();
    pb_backupbuddy::alert('Dismissed alerts have been reset. They may now be visible again.');
}
echo '<textarea readonly="readonly" style="width: 100%;" wrap="off" cols="65" rows="7">';
if (file_exists($log_file)) {
    readfile($log_file);
} else {
    echo __('Nothing has been logged.', 'it-l10n-backupbuddy');
}
echo '</textarea>';
echo '<a href="' . pb_backupbuddy::page_url() . '&reset_log=true" class="button secondary-button">' . __('Clear Log', 'it-l10n-backupbuddy') . '</a>';
pb_backupbuddy::$ui->end_metabox();
plugin_information(pb_backupbuddy::settings('slug'), array('name' => pb_backupbuddy::settings('name'), 'path' => pb_backupbuddy::plugin_path()));
?>
開發者ID:brettex,項目名稱:pspark,代碼行數:31,代碼來源:getting_started.php

示例8: die

<?php

if (!is_admin()) {
    die('Access denied.');
}
// File viewer (view content only) in the file restore page.
/* restore_file_view()
*
* View contents of a file (text) that is inside a zip archive.
*
*/
pb_backupbuddy::$ui->ajax_header(true, false);
// js, no padding
$archive_file = pb_backupbuddy::_GET('archive');
// archive to extract from.
$file = pb_backupbuddy::_GET('file');
// file to extract.
$serial = backupbuddy_core::get_serial_from_file($archive_file);
// serial of archive.
$temp_file = uniqid();
// temp filename to extract into.
require_once pb_backupbuddy::plugin_path() . '/lib/zipbuddy/zipbuddy.php';
$zipbuddy = new pluginbuddy_zipbuddy(backupbuddy_core::getBackupDirectory());
// Calculate temp directory & lock it down.
$temp_dir = get_temp_dir();
$destination = $temp_dir . 'backupbuddy-' . $serial;
if (!file_exists($destination) && false === mkdir($destination)) {
    $error = 'Error #458485945b: Unable to create temporary location.';
    pb_backupbuddy::status('error', $error);
    die($error);
}
開發者ID:Ezyva2015,項目名稱:SMSF-Academy-Wordpress,代碼行數:31,代碼來源:restore_file_view.php

示例9: array

            $backup_type = 'Full';
        } else {
            $backup_type = 'Unknown';
        }
    }
    // Make list without directory in name.
    $removePrefixDirs = array('full/', 'db/');
    $filesNoDir = str_replace($removePrefixDirs, '', $file);
    // Generate array of table rows.
    $backup_list_temp[$last_modified] = array(array($file, $filesNoDir), pb_backupbuddy::$format->date(pb_backupbuddy::$format->localize_time($last_modified)) . '<br /><span class="description">(' . pb_backupbuddy::$format->time_ago($last_modified) . ' ago)</span>', pb_backupbuddy::$format->file_size($size), $backup_type);
}
krsort($backup_list_temp);
$backup_list = array();
foreach ($backup_list_temp as $backup_item) {
    $backup_list[$backup_item[0][0]] = $backup_item;
    //str_replace( 'db/', '', str_replace( 'full/', '', $backup_item ) );
}
unset($backup_list_temp);
$urlPrefix = pb_backupbuddy::ajax_url('remoteClient') . '&destination_id=' . htmlentities(pb_backupbuddy::_GET('destination_id'));
// Render table listing files.
if (count($backup_list) == 0) {
    echo '<b>';
    _e('You have not completed sending any backups to BackupBuddy Stash for this site yet.', 'it-l10n-backupbuddy');
    echo '</b>';
} else {
    pb_backupbuddy::$ui->list_table($backup_list, array('action' => pb_backupbuddy::ajax_url('remoteClient') . '&function=remoteClient&destination_id=' . htmlentities(pb_backupbuddy::_GET('destination_id')) . '&remote_path=' . htmlentities(pb_backupbuddy::_GET('remote_path') . '&stashhash=' . $stash_hash), 'columns' => array('Backup File', 'Uploaded <img src="' . pb_backupbuddy::plugin_url() . '/images/sort_down.png" style="vertical-align: 0px;" title="Sorted most recent first">', 'File Size', 'Type'), 'hover_actions' => array($urlPrefix . '&cpy_file=' => 'Copy to Local', $urlPrefix . '&downloadlink_file=' => 'Get download link'), 'hover_action_column_key' => '0', 'bulk_actions' => array('delete_backup' => 'Delete'), 'css' => 'width: 100%;'));
}
// Display troubleshooting subscriber key.
echo '<span class="description" style="margin-top: -20px; float: right;">Subscriber key: ' . $subscriber_prefix . '</span>';
echo '<br style="clear: both;">';
return;
開發者ID:AgilData,項目名稱:WordPress-Skeleton,代碼行數:31,代碼來源:_manage.php

示例10: savesettings

            }
        }
        if ($missing_field !== false) {
            pb_backupbuddy::alert('One or more required fields were missing. Destination settings not saved.');
        } else {
            savesettings($_POST['savepoint']);
            pb_backupbuddy::alert(__('Destination settings saved.', 'it-l10n-backupbuddy'));
        }
    } else {
        pb_backupbuddy::alert('Access denied in demo mode.', true);
    }
}
pb_backupbuddy::$ui->start_tab('ftp');
require_once '_destination_ftp.php';
pb_backupbuddy::$ui->end_tab();
if (pb_backupbuddy::_GET('migrate') != '1') {
    // Show all destinations if not a migration.
    pb_backupbuddy::$ui->start_tab('email');
    require_once '_destination_email.php';
    pb_backupbuddy::$ui->end_tab();
    pb_backupbuddy::$ui->start_tab('rackspace');
    require_once '_destination_rackspace.php';
    pb_backupbuddy::$ui->end_tab();
    pb_backupbuddy::$ui->start_tab('s3');
    require_once '_destination_s3.php';
    pb_backupbuddy::$ui->end_tab();
    pb_backupbuddy::$ui->start_tab('dropbox');
    require_once '_destination_dropbox.php';
    pb_backupbuddy::$ui->end_tab();
}
// End if not a migration.
開發者ID:verbazend,項目名稱:AWFA,代碼行數:31,代碼來源:_destination_picker.php

示例11: die

<?php

if (!current_user_can(pb_backupbuddy::$options['role_access'])) {
    die('Access Denied. Error 445543454754.');
}
pb_backupbuddy::load_script('jquery.leanModal.min.js');
pb_backupbuddy::load_style('admin.css');
pb_backupbuddy::load_script('filetree.js');
pb_backupbuddy::load_style('filetree.css');
if (pb_backupbuddy::_GET('value') == '') {
    $file = pb_backupbuddy::_GET('zip_viewer');
} else {
    $file = pb_backupbuddy::_GET('value');
}
$file = str_replace('\\', '', $file);
$file = str_replace('/', '', $file);
$serial = backupbuddy_core::get_serial_from_file($file);
pb_backupbuddy::disalert('restore_caution', __('Caution: Restored files may overwrite existing files of the same name.  Use caution when restoring, especially when restoring large numbers of files to avoid breaking the site.', 'it-l10n-backupbuddy'));
?>

<script type="text/javascript">
	jQuery(document).ready(function() {
		
		
		
		jQuery('#pb_backupbuddy_file_browser').fileTree(
			{
				root: '',
				multiFolder: false,
				script: '<?php 
echo pb_backupbuddy::ajax_url('file_tree');
開發者ID:Coop920,項目名稱:Sterling-Wellness,代碼行數:31,代碼來源:_zip_viewer.php

示例12: pb_bb_add_box

function pb_bb_add_box($mode, $picker_url, $hideBack = false)
{
    ?>
	<div class="bb_destinations-group bb_destinations-new">
		<h3>What kind of destination do you want to add?</h3>
		<ul>
			<?php 
    $i = 0;
    foreach (pb_backupbuddy_destinations::get_destinations_list() as $destination_name => $destination) {
        if ($mode == 'migration') {
            if ($destination_name != 'local' && $destination_name != 'ftp' && $destination_name != 'sftp') {
                // if not local or ftp when in migration mode then skip.
                continue;
            }
        }
        // Filter only showing certain destination type.
        if ('' != pb_backupbuddy::_GET('filter')) {
            if ($destination_name != pb_backupbuddy::_GET('filter')) {
                continue;
                // Move along to next destination.
            }
        }
        $i++;
        echo '<li class="bb_destination-item bb_destination-' . $destination_name . ' bb_destination-new-item"><a href="' . $picker_url . '&add=' . $destination_name . '&callback_data=' . pb_backupbuddy::_GET('callback_data') . '&sending=' . pb_backupbuddy::_GET('sending') . '" rel="' . $destination_name . '">' . $destination['name'] . '</a></li>';
        if ($i >= 5) {
            echo '<span class="bb_destination-break"></span>';
            $i = 0;
        }
    }
    if (false === $hideBack) {
        ?>
				<br><br>
				<a href="javascript:void(0)" class="btn btn-small btn-white btn-with-icon btn-back btn-back-add"  onClick="jQuery('.bb_destinations-new').hide(); jQuery('.bb_destinations-existing').show();"><span class="btn-icon"></span>Back to existing destinations</a>
			<?php 
    }
    ?>
		</ul>
	</div>
	<?php 
}
開發者ID:emjayoh,項目名稱:bhag,代碼行數:40,代碼來源:_destination_picker.php

示例13: substr

if ('embed' != pb_backupbuddy::_GET('display_mode')) {
    echo '<div class="topNav">';
    if (true === Auth::is_authenticated()) {
        // Only display these links if logged in.
        echo '<a ';
        if (pb_backupbuddy::_GET('step') != '') {
            echo 'class="activePage" ';
        }
        echo 'href="importbuddy.php">Restore / Migrate</a>';
        echo '<a ';
        if (pb_backupbuddy::_GET('page') == 'serverinfo') {
            echo 'class="activePage" ';
        }
        echo 'href="?page=serverinfo">Server Information</a>';
        echo '<a ';
        if (pb_backupbuddy::_GET('page') == 'dbreplace') {
            echo 'class="activePage" ';
        }
        echo 'href="?page=dbreplace">Database Text Replace</a>';
        echo '<a href="http://ithemes.com/codex/page/BackupBuddy" target="_new">Knowledge Base</a>';
        echo '<a href="http://ithemes.com/support/" target="_new">Support Forum</a>';
    }
    $simpleVersion = pb_backupbuddy::$options['bb_version'];
    if (strpos(pb_backupbuddy::$options['bb_version'], ' ') > 0) {
        $simpleVersion = substr(pb_backupbuddy::$options['bb_version'], 0, strpos(pb_backupbuddy::$options['bb_version'], ' '));
    }
    echo '<a href="http://ithemes.com/purchase/backupbuddy/" target="_new" title="Visit BackupBuddy Website in New Window" style="float: right;"><img src="importbuddy/images/icon_menu_32x32.png" width="16" height="16">&nbsp;&nbsp;ImportBuddy v' . $simpleVersion . ' for BackupBuddy</a>';
    echo '</div>';
}
?>
		
開發者ID:Ezyva2015,項目名稱:SMSF-Academy-Wordpress,代碼行數:30,代碼來源:_header.php

示例14: array

    $deployData['destination_id'] = pb_backupbuddy::_POST('destination_id');
    if ('push' == pb_backupbuddy::_GET('direction')) {
        $post_backup_steps = array(array('function' => 'deploy_push_start', 'args' => array($deployData), 'start_time' => 0, 'finish_time' => 0, 'attempts' => 0));
        pb_backupbuddy::status('details', 'Deployment PUSH set to send to remote destination `' . $deployData['destination_id'] . '`. Added to post backup function steps.');
    }
    // end if PUSH type deployment.
    if ('pull' == pb_backupbuddy::_GET('direction')) {
        $post_backup_steps = array(array('function' => 'deploy_pull_start', 'args' => array($deployData), 'start_time' => 0, 'finish_time' => 0, 'attempts' => 0));
        pb_backupbuddy::status('details', 'Deployment PULL set to send to remote destination `' . $deployData['destination_id'] . '`. Added to post backup function steps.');
    }
    // end if PULL type deployment.
}
// end if deployment.
$deployDestination = null;
if (isset($deployData['destination'])) {
    $deployDestination = $deployData['destination'];
}
pb_backupbuddy::load_script('backupEvents.js');
pb_backupbuddy::load_script('backupPerform.js');
// Run the backup!
pb_backupbuddy::flush();
// Flush any buffer to screen just before the backup begins.
if ($newBackup->start_backup_process($profile_array, $trigger, array(), $post_backup_steps, '', $serial_override, $export_plugins, pb_backupbuddy::_GET('direction'), $deployDestination) !== true) {
    pb_backupbuddy::alert(__('Fatal Error #4344443: Backup failure. Please see any errors listed in the Status Log for details.', 'it-l10n-backupbuddy'), true);
}
?>


</div>

開發者ID:Brandonsmith23,項目名稱:prodgyr,代碼行數:29,代碼來源:_backup-perform.php

示例15: rollback

    public function rollback()
    {
        pb_backupbuddy::$ui->ajax_header();
        pb_backupbuddy::load_script('jquery');
        echo '<div id="pb_backupbuddy_working" style="width: 100px; margin-bottom: 30px;"><br><center><img src="' . pb_backupbuddy::plugin_url() . '/images/working.gif" title="Working... Please wait as this may take a moment..."></center></div>';
        ?>
		
		
		<script>
		function pb_status_append( status_string ) {
			var win = window.dialogArguments || opener || parent || top;
			win.pb_status_append( status_string );
		}
		function pb_status_undourl( undo_url ) {
			var win = window.dialogArguments || opener || parent || top;
			win.pb_status_undourl( undo_url );
		}
		
		var win = window.dialogArguments || opener || parent || top;
		win.window.scrollTo(0,0);
		</script>
		
		
		<?php 
        global $pb_backupbuddy_js_status;
        $pb_backupbuddy_js_status = true;
        pb_backupbuddy::set_status_serial('restore');
        $step = strip_tags(pb_backupbuddy::_GET('step'));
        if ('' == $step || !is_numeric($step)) {
            $step = 0;
        }
        $backupFile = strip_tags(pb_backupbuddy::_GET('archive'));
        if ('' == $backupFile) {
            pb_backupbuddy::alert('The backup file to restore from must be specified.');
            die;
        }
        $stepFile = pb_backupbuddy::plugin_path() . '/controllers/pages/rollback/_step' . $step . '.php';
        if (!file_exists($stepFile)) {
            pb_backupbuddy::alert('Error #849743. Invalid roll back step `' . htmlentities(pb_backupbuddy::_GET('step')) . '` (' . $step . ').');
            die;
        }
        require $stepFile;
        echo '<br><br><br>';
        echo '<script type="text/javascript">jQuery("#pb_backupbuddy_working").hide();</script>';
        pb_backupbuddy::$ui->ajax_footer();
        pb_backupbuddy::flush();
        die;
    }
開發者ID:serker72,項目名稱:T3S,代碼行數:48,代碼來源:ajax.php


注:本文中的pb_backupbuddy::_GET方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。