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


PHP pb_backupbuddy::ajax_url方法代碼示例

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


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

示例1: disalert

 /**
  *	pb_backupbuddy::disalert()
  *
  *	Displays a DISMISSABLE message to the user at the top of the page when in the dashboard.
  *
  *	@param		string		$message		Message you want to display to the user.
  *	@param		boolean		$error			OPTIONAL! true indicates this alert is an error and displays as red. Default: false
  *	@param		int			$error_code		OPTIONAL! Error code number to use in linking in the wiki for easy reference.
  *	@return		null
  */
 public function disalert($unique_id, $message, $error = false)
 {
     if (!isset(pb_backupbuddy::$options['disalerts'][$unique_id])) {
         $message = '<a style="float: right;" class="pb_backupbuddy_disalert" href="#" title="' . __('Dismiss this alert. Unhide dismissed alerts on the Getting Started page.', 'it-l10n-backupbuddy') . '" alt="' . pb_backupbuddy::ajax_url('disalert') . '">' . __('Dismiss', 'it-l10n-backupbuddy') . '</a><div style="margin-right: 60px;">' . $message . '</div>';
         $this->alert($message, $error, '', $unique_id);
     } else {
         echo '<!-- Previously Dismissed Alert: `' . htmlentities($message) . '` -->';
     }
     return;
 }
開發者ID:jimlongo56,項目名稱:bhouse,代碼行數:20,代碼來源:ui.php

示例2: __

    $hover_actions['hash'] = __('Checksum', 'it-l10n-backupbuddy');
    $bulk_actions = array('delete_backup' => __('Delete', 'it-l10n-backupbuddy'));
}
if ($listing_mode == 'migrate') {
    $hover_actions['migrate'] = __('Migrate', 'it-l10n-backupbuddy');
    $hover_actions[pb_backupbuddy::ajax_url('download_archive') . '&backupbuddy_backup='] = __('Download', 'it-l10n-backupbuddy');
    $hover_actions['note'] = __('Note', 'it-l10n-backupbuddy');
    $bulk_actions = array();
    foreach ($backups as $backup_id => $backup) {
        if ($backup[1] == 'Database') {
            unset($backups[$backup_id]);
        }
    }
}
if ($listing_mode == 'restore_migrate') {
    $hover_actions[pb_backupbuddy::ajax_url('download_archive') . '&backupbuddy_backup='] = __('Download', 'it-l10n-backupbuddy');
    $hover_actions['send'] = 'Send';
    $hover_actions['page=pb_backupbuddy_backup&zip_viewer'] = __('Browse & Restore Files', 'it-l10n-backupbuddy');
    $hover_actions['rollback'] = __('Database Rollback', 'it-l10n-backupbuddy') . ' (BETA)';
    $hover_actions['migrate'] = __('Migrate', 'it-l10n-backupbuddy');
    $hover_actions['note'] = __('Note', 'it-l10n-backupbuddy');
    $bulk_actions = array();
    /*
    foreach( $backups as $backup_id => $backup ) {
    	if ( $backup[1] == 'Database' ) {
    		unset( $backups[$backup_id] );
    	}
    }
    */
}
if (count($backups) == 0) {
開發者ID:adrianjonmiller,項目名稱:animalhealth,代碼行數:31,代碼來源:_backup_listing.php

示例3:

				jQuery.get( '<?php 
    echo pb_backupbuddy::ajax_url('destination_ftp_pathpicker');
    ?>
&' + serializedFormData,
					function(data) {
						data = jQuery.trim( data );
						pathPickerBox.html( '<div class="jQueryOuterTree" style="width: 100%;">' + data + '</div>' );
						pathPickerBox.slideDown();
						
						// File picker.
						jQuery('.pb_backupbuddy_ftpdestination_pathpickerboxtree').fileTree(
							{
								root: '/',
								multiFolder: false,
								script: '<?php 
    echo pb_backupbuddy::ajax_url('destination_ftp_pathpicker');
    ?>
&' + serializedFormData
							},
							function(file) {
								alert( file );
							},
							function(directory) {
								
								thisPickObj.closest( 'form' ).find( '#pb_backupbuddy_path' ).val( directory );
								
							}
						);
						
						jQuery( '.pb_backupbuddy_ftppicker_load' ).hide();
						
開發者ID:AgilData,項目名稱:WordPress-Skeleton,代碼行數:30,代碼來源:_configure.php

示例4: backups_list


//.........這裏部分代碼省略.........
             $pretty_status = array('pass' => 'Good', 'fail' => '<font color="red">Bad</font>');
             $pretty_type = array('full' => 'Full', 'db' => 'Database');
             //echo '<pre>' . print_r( pb_backupbuddy::$options['backups'][$serial], true ) . '</pre>';
             // Calculate time for each step.
             $step_times = array();
             $step_time_details = array();
             $zip_time = 0;
             if (isset(pb_backupbuddy::$options['backups'][$serial]['steps'])) {
                 foreach (pb_backupbuddy::$options['backups'][$serial]['steps'] as $step) {
                     if (!isset($step['finish_time']) || $step['finish_time'] == 0) {
                         $step_times[] = '<span class="description">Unknown</span>';
                     } else {
                         $step_time = $step['finish_time'] - $step['start_time'];
                         $step_times[] = $step_time;
                         // Pretty step name:
                         if ($step['function'] == 'backup_create_database_dump') {
                             $step_name = 'Database dump';
                         } elseif ($step['function'] == 'backup_zip_files') {
                             $step_name = 'Zip archive creation';
                         } elseif ($step['function'] == 'post_backup') {
                             $step_name = 'Post-backup cleanup';
                         } else {
                             $step_name = $step['function'];
                         }
                         $step_time_details[] = '<b>' . $step_name . '</b><br>&nbsp;&nbsp;&nbsp;' . $step_time . ' seconds in ' . $step['attempts'] . ' attempts.';
                         if ($step['function'] == 'backup_zip_files') {
                             $zip_time = $step_time;
                         }
                     }
                 }
                 // End foreach.
             } else {
                 // End if serial in array is set.
                 $step_times[] = '<span class="description">Unknown</span>';
             }
             // End if serial in array is NOT set.
             $step_times = implode(', ', $step_times);
             //echo '<pre>' . print_r( pb_backupbuddy::$options['backups'][$serial], true ) . '</pre>';
             // Calculate start and finish.
             if (isset(pb_backupbuddy::$options['backups'][$serial]['start_time']) && isset(pb_backupbuddy::$options['backups'][$serial]['finish_time']) && pb_backupbuddy::$options['backups'][$serial]['start_time'] > 0 && pb_backupbuddy::$options['backups'][$serial]['finish_time'] > 0) {
                 $start_time = pb_backupbuddy::$options['backups'][$serial]['start_time'];
                 $finish_time = pb_backupbuddy::$options['backups'][$serial]['finish_time'];
                 $total_time = $finish_time - $start_time;
             } else {
                 $total_time = '<span class="description">Unknown</span>';
             }
             // Calculate write speed in MB/sec for this backup.
             if ($zip_time == '0') {
                 // Took approx 0 seconds to backup so report this speed.
                 if (!isset($finish_time) || $finish_time == '0') {
                     $write_speed = '<span class="description">Unknown</span>';
                 } else {
                     $write_speed = '> ' . pb_backupbuddy::$format->file_size(pb_backupbuddy::$options['backups'][$serial]['integrity']['size']);
                 }
             } else {
                 $write_speed = pb_backupbuddy::$format->file_size(pb_backupbuddy::$options['backups'][$serial]['integrity']['size'] / $zip_time);
             }
             // Figure out trigger.
             if (isset(pb_backupbuddy::$options['backups'][$serial]['trigger'])) {
                 $trigger = pb_backupbuddy::$options['backups'][$serial]['trigger'];
             } else {
                 $trigger = __('Unknown', 'it-l10n-backupbuddy');
             }
             // HTML output for stats.
             $statistics = "\n\t\t\t\t\t<span style='width: 80px; display: inline-block;'>Total time:</span>{$total_time} secs<br>\n\t\t\t\t\t<span style='width: 80px; display: inline-block;'>Step times:</span>{$step_times}<br>\n\t\t\t\t\t<span style='width: 80px; display: inline-block;'>Write speed:</span>{$write_speed}/sec\n\t\t\t\t";
             // HTML output for stats details (for tooltip).
             $statistic_details = '<br><br>' . implode('<br>', $step_time_details) . '<br><br><i>Trigger: ' . $trigger . '</i>';
             // Calculate time ago.
             $time_ago = '<span class="description">' . pb_backupbuddy::$format->time_ago(pb_backupbuddy::$options['backups'][$serial]['integrity']['modified']) . ' ago</span>';
             // Calculate main row string.
             if ($type == 'default') {
                 // Default backup listing.
                 $main_string = '<a href="' . pb_backupbuddy::ajax_url('download_archive') . '&backupbuddy_backup=' . basename($file) . '">' . basename($file) . '</a>';
             } elseif ($type == 'migrate') {
                 // Migration backup listing.
                 $main_string = '<a class="pb_backupbuddy_hoveraction_migrate" rel="' . basename($file) . '" href="' . pb_backupbuddy::page_url() . '&migrate=' . basename($file) . '&value=' . basename($file) . '">' . basename($file) . '</a>';
             } else {
                 $main_string = '{Unknown type.}';
             }
             // Add comment to main row string if applicable.
             if (isset(pb_backupbuddy::$options['backups'][$serial]['integrity']['comment']) && pb_backupbuddy::$options['backups'][$serial]['integrity']['comment'] !== false && pb_backupbuddy::$options['backups'][$serial]['integrity']['comment'] !== '') {
                 $main_string .= '<br><span class="description">Note: <span class="pb_backupbuddy_notetext">' . pb_backupbuddy::$options['backups'][$serial]['integrity']['comment'] . '</span></span>';
             }
             $backups[basename($file)] = array(array(basename($file), $main_string), pb_backupbuddy::$format->date(pb_backupbuddy::$options['backups'][$serial]['integrity']['modified']) . '<br>' . $time_ago, pb_backupbuddy::$format->file_size(pb_backupbuddy::$options['backups'][$serial]['integrity']['size']), pb_backupbuddy::$format->prettify(pb_backupbuddy::$options['backups'][$serial]['integrity']['status'], $pretty_status) . ' ' . pb_backupbuddy::tip(pb_backupbuddy::$options['backups'][$serial]['integrity']['status_details'] . '<br><br>Checked ' . pb_backupbuddy::$format->date(pb_backupbuddy::$options['backups'][$serial]['integrity']['scan_time']) . $statistic_details, '', false) . ' <a href="' . pb_backupbuddy::page_url() . '&reset_integrity=' . $serial . '" title="' . __('Refresh backup integrity status for this file', 'it-l10n-backupbuddy') . '"><img src="' . pb_backupbuddy::plugin_url() . '/images/refresh_gray.gif" style="vertical-align: -1px;"></a>', pb_backupbuddy::$format->prettify(pb_backupbuddy::$options['backups'][$serial]['integrity']['detected_type'], $pretty_type), $statistics);
             $backup_sort_dates[basename($file)] = pb_backupbuddy::$options['backups'][$serial]['integrity']['modified'];
         }
         // End foreach().
     }
     // End if.
     // Sort backup sizes.
     arsort($backup_sort_dates);
     // Re-arrange backups based on sort dates.
     $sorted_backups = array();
     foreach ($backup_sort_dates as $backup_file => $backup_sort_date) {
         $sorted_backups[$backup_file] = $backups[$backup_file];
         unset($backups[$backup_file]);
     }
     unset($backups);
     return $sorted_backups;
 }
開發者ID:verbazend,項目名稱:AWFA,代碼行數:101,代碼來源:core.php

示例5: catch

        }
        if (false === $bad_auth_code) {
            $dropboxClient = new \Dropbox\Client($accessToken, 'BackupBuddy v' . pb_backupbuddy::settings('version'));
            $accountInfo = $dropboxClient->getAccountInfo();
            $show_config_form = true;
        }
    }
    if ('' == pb_backupbuddy::_POST('dropbox_authorization_code') || true === $bad_auth_code) {
        // No authorization code entered yet so user needs to authorize.
        try {
            $authorizeUrl = $webAuth->start();
        } catch (Exception $e) {
            pb_backupbuddy::alert('Error #8778656: Dropbox error. Details: `' . $e->getMessage() . '`.', true);
            return false;
        }
        echo '<form method="post" action="' . pb_backupbuddy::ajax_url('destination_picker') . '&add=dropbox2&callback_data=' . pb_backupbuddy::_GET('callback_data') . '">';
        echo '<br><b>Adding a Dropbox destination</b><ol>';
        echo '<li> <a href="' . $authorizeUrl . '" class="button-primary pb_dropbox_authorize" target="_new">' . __('Connect to Dropbox.com & Authorize (opens new window)', 'it-l10n-backupbuddy') . '</a></li>';
        echo '<li>Click <b>Allow</b> in the new window (you may need to login to Dropbox.com first).</li>';
        echo '<li>Enter the provided <b>Authorization Code</b>: <input type="text" name="dropbox_authorization_code" size="45"></li>';
        echo '<li><input type="submit" class="button-primary" value="' . __("Yes, I've Authorized BackupBuddy with Dropbox & Entered the Code above", 'it-l10n-backupbuddy') . '"></li>';
        echo '</ol>';
        echo '</form>';
    }
    // end authorication code submitted.
} elseif ('edit' == $mode) {
    // EDIT mode.
    $accessToken = $destination_settings['access_token'];
    try {
        $dropboxClient = new \Dropbox\Client($accessToken, 'BackupBuddy v' . pb_backupbuddy::settings('version'));
    } catch (\Exception $e) {
開發者ID:Ezyva2015,項目名稱:SMSF-Academy-Wordpress,代碼行數:31,代碼來源:_configure.php

示例6: array

    }
    // Generate array of table rows.
    $backup_files[$filename] = array($filename, $last_modified, pb_backupbuddy::$format->file_size($size), $backup_type, 'file_timestamp' => $last_modified);
}
// For sorting by array item value.
function pb_backupbuddy_aasort(&$array, $key)
{
    $sorter = array();
    $ret = array();
    reset($array);
    foreach ($array as $ii => $va) {
        $sorter[$ii] = $va[$key];
    }
    asort($sorter);
    foreach ($sorter as $ii => $va) {
        $ret[$ii] = $array[$ii];
    }
    $array = $ret;
}
pb_backupbuddy_aasort($backup_files, 'file_timestamp');
// Sort by multidimensional array with key start_timestamp.
$backup_files = array_reverse($backup_files);
// Reverse array order to show newest first.
$urlPrefix = pb_backupbuddy::ajax_url('remoteClient') . '&destination_id=' . htmlentities(pb_backupbuddy::_GET('destination_id'));
// Render table listing files.
if (count($backup_files) == 0) {
    echo '<b>' . __('You have not completed sending any backups to this destination yet.', 'it-l10n-backupbuddy') . '</b>';
} else {
    pb_backupbuddy::$ui->list_table($backup_files, array('action' => $urlPrefix, '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=' => 'Copy to Local'), 'hover_action_column_key' => '0', 'bulk_actions' => array('delete_backup' => 'Delete'), 'css' => 'width: 100%;'));
}
return;
開發者ID:Ezyva2015,項目名稱:SMSF-Academy-Wordpress,代碼行數:31,代碼來源:_manage.php

示例7: importexport_settings

 public function importexport_settings()
 {
     pb_backupbuddy::load();
     pb_backupbuddy::$ui->ajax_header();
     if (pb_backupbuddy::_POST('import_settings') != '') {
         $import = trim(stripslashes(pb_backupbuddy::_POST('import_data')));
         $import = base64_decode($import);
         if ($import === false) {
             // decode failed.
             pb_backupbuddy::alert('Unable to decode settings data. Import aborted. Insure that you fully copied the settings and did not change any of the text.');
         } else {
             // decode success.
             if (($import = maybe_unserialize($import)) === false) {
                 // unserialize fail.
                 pb_backupbuddy::alert('Unable to unserialize settings data. Import aborted. Insure that you fully copied the settings and did not change any of the text.');
             } else {
                 // unserialize success.
                 if (!isset($import['data_version'])) {
                     // missing expected content.
                     pb_backupbuddy::alert('Unserialized settings data but it did not contain expected data. Import aborted. Insure that you fully copied the settings and did not change any of the text.');
                 } else {
                     // contains expected content.
                     pb_backupbuddy::$options = $import;
                     require_once pb_backupbuddy::plugin_path() . '/controllers/activation.php';
                     // Run data migration to upgrade if needed.
                     pb_backupbuddy::save();
                     pb_backupbuddy::alert('Provided settings successfully imported. Prior settings overwritten.');
                 }
             }
         }
     }
     echo '<h2>Export BackupBuddy Settings</h2>';
     echo 'Copy the encoded plugin settings below and paste it into the destination BackupBuddy Settings Import page.<br><br>';
     echo '<textarea style="width: 100%; height: 100px;" wrap="on">';
     echo base64_encode(serialize(pb_backupbuddy::$options));
     echo '</textarea>';
     echo '<br><br><br>';
     echo '<h2>Import BackupBuddy Settings</h2>';
     echo 'Paste encoded plugin settings below to import & replace current settings.  If importing settings from an older version and errors are encountered please deactivate and reactivate the plugin.<br><br>';
     echo '<form method="post" action="' . pb_backupbuddy::ajax_url('importexport_settings') . '">';
     echo '<textarea style="width: 100%; height: 100px;" wrap="on" name="import_data"></textarea>';
     echo '<br><br><input type="submit" name="import_settings" value="Import Settings" class="button button-primary">';
     echo '</form>';
     pb_backupbuddy::$ui->ajax_footer();
     die;
 }
開發者ID:brettex,項目名稱:pspark,代碼行數:46,代碼來源:ajax.php

示例8: _e

?>
?page=pb_backupbuddy_backup&custom=remoteclient&destination_id=' + destination_id;
		}
	}
</script>


<?php 
pb_backupbuddy::$ui->title(__('Remote Destinations', 'it-l10n-backupbuddy'));
echo '<div style="width: 100%;">';
_e('BackupBuddy supports many remote destinations which you may transfer backups to.  You may manually send backups to these locations or automatically have them sent for scheduled backups. You may view the files in a remote destination by selecting a destination below once created. In addition to viewing files, you may copy remote backups to your server, and delete files.  All subscribed BackupBuddy customers are provided <b>free</b> storage to our own BackupBuddy Stash cloud destination.', 'it-l10n-backupbuddy');
echo '</div>';
echo '<br><br>';
pb_backupbuddy::$ui->start_tabs('destinations', array(array('title' => 'Remote Destinations', 'slug' => 'destinations'), array('title' => 'Recently Transferred Files', 'slug' => 'transfers')), 'width: 100%;');
pb_backupbuddy::$ui->start_tab('destinations');
echo '<iframe id="pb_backupbuddy_iframe" src="' . pb_backupbuddy::ajax_url('destination_picker') . '&action_verb=to%20manage%20files" width="100%" style="max-width: 850px;" height="1800" frameBorder="0">Error #4584594579. Browser not compatible with iframes.</iframe>';
pb_backupbuddy::$ui->end_tab();
pb_backupbuddy::$ui->start_tab('transfers');
echo '<div style="margin-left: 0px;">';
require_once 'server_info/remote_sends.php';
echo '</div>';
pb_backupbuddy::$ui->end_tab();
?>

<br style="clear: both;"><br style="clear: both;">

<?php 
// Handles thickbox auto-resizing. Keep at bottom of page to avoid issues.
if (!wp_script_is('media-upload')) {
    wp_enqueue_script('media-upload');
    wp_print_scripts('media-upload');
開發者ID:netfor,項目名稱:nextrading,代碼行數:31,代碼來源:destinations.php

示例9: function

		
		// Show options on hover.
		jQuery(document).on('mouseover mouseout', '.jqueryFileTree > li a', function(event) {
			if ( event.type == 'mouseover' ) {
				jQuery(this).children( '.pb_backupbuddy_treeselect_control' ).css( 'visibility', 'visible' );
			} else {
				jQuery(this).children( '.pb_backupbuddy_treeselect_control' ).css( 'visibility', 'hidden' );
			}
		});
		
		jQuery('#exlude_dirs').fileTree(
			{
				root: '/',
				multiFolder: false,
				script: '<?php 
echo pb_backupbuddy::ajax_url('exclude_tree');
?>
'
			},
			function(file) {
				if ( ( file == 'wp-config.php' ) ) {
					alert( "<?php 
_e('You cannot exclude wp-config.php.', 'it-l10n-backupbuddy');
?>
" );
				} else {
					jQuery( '#pb_backupbuddy_profiles__<?php 
echo $profile_id;
?>
__excludes' ).val( file + "\n" + jQuery( '#pb_backupbuddy_profiles__<?php 
echo $profile_id;
開發者ID:Coop920,項目名稱:Sterling-Wellness,代碼行數:30,代碼來源:_filetree.php

示例10: __

">
				<div style="position: absolute; width: 382px;">
					<span style="position: absolute; z-index: 42; right: 0px; display: inline-block;">
						<img src="<?php 
echo pb_backupbuddy::plugin_url();
?>
/images/beta.png" title="Beta" width="60" height="60">
					</span>
				</div>
			</a>
			
			<?php 
if (pb_backupbuddy::$options['importbuddy_pass_hash'] == '') {
    echo '<a onclick="alert(\'' . __('Please set an ImportBuddy password on the BackupBuddy Settings page to download this script. This is required to prevent unauthorized access to the script when in use.', 'it-l10n-backupbuddy') . '\'); return false;" href="" style="text-decoration: none;" title="' . __('Download the restore & migration utility, importbuddy.php', 'it-l10n-backupbuddy') . '">';
} else {
    echo '<a href="' . pb_backupbuddy::ajax_url('importbuddy') . '" style="text-decoration: none;" title="' . __('Download the restore & migration utility, importbuddy.php', 'it-l10n-backupbuddy') . '">';
}
?>
				<div class="graybutton">
					<div class="restoremigrateicon"></div>
					<div class="bbbutton-text">
						<?php 
_e('ImportBuddy', 'it-l10n-backupbuddy');
?>
<br />
						<div class="bbbutton-smalltext"><?php 
_e('restoring & migration script', 'it-l10n-backupbuddy');
?>
</div>
					</div>
				</div>
開發者ID:sonnetmedia,項目名稱:otherpress.com,代碼行數:31,代碼來源:migrate-home.php

示例11: get_quota_bar

    public static function get_quota_bar($account_info, $settings = array(), $additionalOptions = false)
    {
        $settings = self::_init($settings);
        //echo '<pre>' . print_r( $account_info, true ) . '</pre>';
        $return = '<div class="backupbuddy-stash2-quotawrap">';
        $return .= '
		<style>
			.outer_progress {
				-moz-border-radius: 4px;
				-webkit-border-radius: 4px;
				-khtml-border-radius: 4px;
				border-radius: 4px;
				
				border: 1px solid #DDD;
				background: #EEE;
				
				max-width: 700px;
				
				margin-left: auto;
				margin-right: auto;
				
				height: 30px;
			}
			
			.inner_progress {
				border-right: 1px solid #85bb3c;
				background: #8cc63f url("' . pb_backupbuddy::plugin_url() . '/destinations/stash2/progress.png") 50% 50% repeat-x;
				
				height: 100%;
			}
			
			.progress_table {
				color: #5E7078;
				font-family: "Open Sans", Arial, Helvetica, Sans-Serif;
				font-size: 14px;
				line-height: 20px;
				text-align: center;
				
				margin-left: auto;
				margin-right: auto;
				margin-bottom: 20px;
				max-width: 700px;
			}
		</style>';
        if (isset($account_info['quota_warning']) && $account_info['quota_warning'] != '') {
            //echo '<div style="color: red; max-width: 700px; margin-left: auto; margin-right: auto;"><b>Warning</b>: ' . $account_info['quota_warning'] . '</div><br>';
        }
        $return .= '
		<div class="outer_progress">
			<div class="inner_progress" style="width: ' . $account_info['quota_used_percent'] . '%"></div>
		</div>
		
		<table align="center" class="progress_table">
			<tbody><tr align="center">
			    <td style="width: 10%; font-weight: bold; text-align: center">Free Tier</td>
			    <td style="width: 10%; font-weight: bold; text-align: center">Paid Tier</td>        
			    <td style="width: 10%"></td>
			    <td style="width: 10%; font-weight: bold; text-align: center">Total</td>
			    <td style="width: 10%; font-weight: bold; text-align: center">Used</td>
			    <td style="width: 10%; font-weight: bold; text-align: center">Available</td>        
			</tr>

			<tr align="center">
			    <td style="text-align: center">' . $account_info['quota_free_nice'] . '</td>
			    <td style="text-align: center">';
        if ($account_info['quota_paid'] == '0') {
            $return .= 'none';
        } else {
            $return .= $account_info['quota_paid_nice'];
        }
        $return .= '</td>
			    <td></td>
			    <td style="text-align: center">' . $account_info['quota_total_nice'] . '</td>
			    <td style="text-align: center">' . $account_info['quota_used_nice'] . ' (' . $account_info['quota_used_percent'] . '%)</td>
			    <td style="text-align: center">' . $account_info['quota_available_nice'] . '</td>
			</tr>
			';
        $return .= '
		</tbody></table>';
        $return .= '<div style="text-align: center;">';
        $return .= '
		<b>' . __('Upgrade storage', 'it-l10n-backupbuddy') . ':</b> &nbsp;
		<a href="https://ithemes.com/member/cart.php?action=add&id=290" target="_blank" style="text-decoration: none;">+ 5GB</a>, &nbsp;
		<a href="https://ithemes.com/member/cart.php?action=add&id=291" target="_blank" style="text-decoration: none;">+ 10GB</a>, &nbsp;
		<a href="https://ithemes.com/member/cart.php?action=add&id=292" target="_blank" style="text-decoration: none;">+ 25GB</a>
		
		&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href="https://sync.ithemes.com/stash/" target="_blank" style="text-decoration: none;"><b>Manage Files & Account</b></a>';
        // Welcome text.
        $up_path = '/';
        if (count($settings) > 0 && true === $additionalOptions) {
            if ($settings['manage_all_files'] == '1') {
                if ('true' != pb_backupbuddy::_GET('listAll')) {
                    $manage_all_link = '<a href="' . pb_backupbuddy::ajax_url('remoteClient') . '&destination_id=' . htmlentities(pb_backupbuddy::_GET('destination_id')) . '&listAll=true" style="text-decoration: none;" title="By default, Stash will display files in the Stash directory for this particular site. Clicking this will display files for all your sites in Stash.">List all site\'s files</a>';
                } else {
                    $manage_all_link = '<a href="' . pb_backupbuddy::ajax_url('remoteClient') . '&destination_id=' . htmlentities(pb_backupbuddy::_GET('destination_id')) . '&listAll=false" style="text-decoration: none;" title="By default, Stash will display files in the Stash directory for this particular site. Clicking this will only show this site\'s files in Stash.">Only list this site\'s files</a>';
                }
            } else {
                $manage_all_link = '<!-- manage all disabled based on settings -->';
                if ($remote_path == '/') {
                    die('Access denied. Possible hacking attempt has been logged. Error #329773.');
//.........這裏部分代碼省略.........
開發者ID:bunnywong,項目名稱:freshlinker,代碼行數:101,代碼來源:init.php

示例12: define

        ?>
</button>
			<span class="backupbuddy_api_wpconfig-hide" style="display: none;">
				<b>For added security you must manually <i>add the following to your wp-config.php</i> file to enable. <i>Refresh this page after adding</i> the following:</b>
				<br>
<textarea style="width: 100%; padding: 15px;" readonly="readonly" onClick="this.focus();this.select();">
define( 'BACKUPBUDDY_API_ENABLE', true ); // Enable BackupBuddy Deployment access.
</textarea><!-- define( 'BACKUPBUDDY_API_SALT', '<?php 
        echo pb_backupbuddy::random_string(32);
        ?>
' ); // Random security identifier. 5+ characters. -->
			</span>
			<br>
			<?php 
    }
}
echo '</div>';
echo '<div class="backupbuddy-destination-sends" style="display: none;"><br>';
require_once 'server_info/remote_sends.php';
echo '<br></div>';
echo '<iframe id="pb_backupbuddy_iframe-dest-wrap" src="' . pb_backupbuddy::ajax_url('destinationTabs') . '&tab=' . $default_tab . '&action_verb=to%20manage%20files" width="100%" height="4000" frameBorder="0">Error #4584594579. Browser not compatible with iframes.</iframe>';
?>

<br style="clear: both;"><br style="clear: both;">

<?php 
// Handles thickbox auto-resizing. Keep at bottom of page to avoid issues.
if (!wp_script_is('media-upload')) {
    wp_enqueue_script('media-upload');
    wp_print_scripts('media-upload');
}
開發者ID:jcwproductions,項目名稱:jcwproductions-blog,代碼行數:31,代碼來源:destinations.php

示例13: function

			jQuery('#pb_infovis_container').slideToggle();
			jQuery.post( '<?php 
echo pb_backupbuddy::ajax_url('icicle');
?>
', 
				function( data ) {
					jQuery('#infovis').html('');
					icicle_init( data );
				}
			);
		});
		
		jQuery( '.pb_backupbuddy_site_size_listing_button' ).click( function() {
			jQuery( '#pb_backupbuddy_site_size_listing_intro > .pb_backupbuddy_loading' ).show();
			jQuery.post( '<?php 
echo pb_backupbuddy::ajax_url('site_size_listing');
?>
', 
				function( data ) {
					jQuery( '#pb_backupbuddy_site_size_listing_content' ).html( data );
					jQuery( '#pb_backupbuddy_site_size_listing_intro > .pb_backupbuddy_loading' ).hide();
					jQuery( '#pb_backupbuddy_site_size_listing_intro' ).slideUp();
					jQuery( '#pb_backupbuddy_site_size_listing_content' ).slideDown();
				}
			);
			jQuery( 'pb_backupbuddy_loading' ).hide();
		} );
		
	});
</script>
開發者ID:jimlongo56,項目名稱:bhouse,代碼行數:30,代碼來源:site_size.php

示例14: post_backup

 function post_backup($fail_mode = false, $cancel_backup = false)
 {
     pb_backupbuddy::status('message', __('Cleaning up after backup.', 'it-l10n-backupbuddy'));
     // Delete temporary data directory.
     if (file_exists($this->_backup['temp_directory'])) {
         pb_backupbuddy::status('details', __('Removing temp data directory.', 'it-l10n-backupbuddy'));
         pb_backupbuddy::$filesystem->unlink_recursive($this->_backup['temp_directory']);
     }
     // Delete temporary ZIP directory.
     if (file_exists(backupbuddy_core::getBackupDirectory() . 'temp_zip_' . $this->_backup['serial'] . '/')) {
         pb_backupbuddy::status('details', __('Removing temp zip directory.', 'it-l10n-backupbuddy'));
         pb_backupbuddy::$filesystem->unlink_recursive(backupbuddy_core::getBackupDirectory() . 'temp_zip_' . $this->_backup['serial'] . '/');
     }
     if (true === $fail_mode) {
         pb_backupbuddy::status('warning', 'Backup archive limiting has been skipped since there was an error to avoid deleting potentially good backups to make room for a potentially bad backup.');
     } else {
         $this->trim_old_archives();
         // Clean up any old excess archives pushing us over defined limits in settings.
     }
     if (true === $cancel_backup) {
         pb_backupbuddy::status('details', 'Backup stopped so deleting backup ZIP file.');
         $unlink_result = @unlink($this->_backup['archive_file']);
         if (true === $unlink_result) {
             pb_backupbuddy::status('details', 'Deleted stopped backup file.');
         } else {
             pb_backupbuddy::status('error', 'Unable to delete stopped backup file. You should delete it manually as it may be damaged from stopping mid-backup. File to delete: `' . $this->_backup['archive_file'] . '`.');
         }
         $this->_backup['finish_time'] = -1;
         //pb_backupbuddy::save();
         $this->_backup_options->save();
     } else {
         // Not cancelled.
         $this->_backup['archive_size'] = @filesize($this->_backup['archive_file']);
         pb_backupbuddy::status('details', __('Final ZIP file size', 'it-l10n-backupbuddy') . ': ' . pb_backupbuddy::$format->file_size($this->_backup['archive_size']));
         pb_backupbuddy::status('archiveSize', pb_backupbuddy::$format->file_size($this->_backup['archive_size']));
         if ($fail_mode === false) {
             // Not cancelled and did not fail so mark finish time.
             //error_log( print_r( $this->_backup_options->options, true ) );
             $archiveFile = basename($this->_backup_options->options['archive_file']);
             // Calculate backup download URL, if any.
             //$downloadURL = pb_backupbuddy::ajax_url( 'download_archive' ) . '&backupbuddy_backup=' . $archiveFile;
             $downloadURL = '';
             $abspath = str_replace('\\', '/', ABSPATH);
             // Change slashes to handle Windows as we store backup_directory with Linux-style slashes even on Windows.
             $backup_dir = str_replace('\\', '/', backupbuddy_core::getBackupDirectory());
             if (FALSE !== stristr($backup_dir, $abspath)) {
                 // Make sure file to download is in a publicly accessible location (beneath WP web root technically).
                 //pb_backupbuddy::status( 'details', 'mydir: `' . $backup_dir . '`, abs: `' . $abspath . '`.');
                 $sitepath = str_replace($abspath, '', $backup_dir);
                 $downloadURL = rtrim(site_url(), '/\\') . '/' . trim($sitepath, '/\\') . '/' . $archiveFile;
             }
             $integrityIsOK = '-1';
             if (isset($this->_backup_options->options['integrity']['is_ok'])) {
                 $integrityIsOK = $this->_backup_options->options['integrity']['is_ok'];
             }
             $destinations = array();
             foreach ($this->_backup_options->options['steps'] as $step) {
                 if ('send_remote_destination' == $step['function']) {
                     $destinations[] = array('id' => $step['args'][0], 'title' => pb_backupbuddy::$options['remote_destinations'][$step['args'][0]]['title'], 'type' => pb_backupbuddy::$options['remote_destinations'][$step['args'][0]]['type']);
                 }
             }
             pb_backupbuddy::status('details', 'Updating statistics for last backup completed and number of edits since last backup.');
             $finishTime = time();
             pb_backupbuddy::$options['last_backup_finish'] = $finishTime;
             pb_backupbuddy::$options['last_backup_stats'] = array('archiveFile' => $archiveFile, 'archiveURL' => $downloadURL, 'archiveSize' => $this->_backup['archive_size'], 'start' => pb_backupbuddy::$options['last_backup_start'], 'finish' => $finishTime, 'type' => $this->_backup_options->options['profile']['type'], 'profileTitle' => htmlentities($this->_backup_options->options['profile']['title']), 'scheduleTitle' => $this->_backup_options->options['schedule_title'], 'integrityStatus' => $integrityIsOK, 'destinations' => $destinations);
             //error_log( print_r( pb_backupbuddy::$options['last_backup_stats'], true ) );
             pb_backupbuddy::$options['edits_since_last'] = 0;
             // Reset edit stats for notifying user of how many posts/pages edited since last backup happened.
             pb_backupbuddy::save();
         }
     }
     backupbuddy_core::cleanTempDir();
     if ($this->_backup['trigger'] == 'manual') {
         // Do nothing. No notifications as of pre-3.0 2012.
     } elseif ($this->_backup['trigger'] == 'deployment') {
         // Do nothing. No notifications.
     } elseif ($this->_backup['trigger'] == 'deployment_pulling') {
         // Do nothing.
     } elseif ($this->_backup['trigger'] == 'scheduled') {
         if (false === $fail_mode && false === $cancel_backup) {
             pb_backupbuddy::status('details', __('Sending scheduled backup complete email notification.', 'it-l10n-backupbuddy'));
             $message = 'completed successfully in ' . pb_backupbuddy::$format->time_duration(time() - $this->_backup['start_time']) . ".\n";
             backupbuddy_core::mail_notify_scheduled($this->_backup['serial'], 'complete', __('Scheduled backup', 'it-l10n-backupbuddy') . ' "' . $this->_backup['schedule_title'] . '" ' . $message);
         }
     } else {
         pb_backupbuddy::status('error', 'Error #4343434. Unknown backup trigger `' . $this->_backup['trigger'] . '`.');
     }
     pb_backupbuddy::status('message', __('Finished cleaning up.', 'it-l10n-backupbuddy'));
     if (true === $cancel_backup) {
         pb_backupbuddy::status('details', 'Backup cancellation complete.');
         return false;
     } else {
         if (true === $fail_mode) {
             pb_backupbuddy::status('details', __('As this backup did not pass the integrity check you should verify it manually or re-scan. Integrity checks can fail on good backups due to permissions, large file size exceeding memory limits, etc. You may manually disable integrity check on the Settings page but you will no longer be notified of potentially bad backups.', 'it-l10n-backupbuddy'));
         } else {
             if ($this->_backup['trigger'] != 'deployment' && $this->_backup['trigger'] != 'deployment_pulling') {
                 //$stats = stat( $this->_backup['archive_file'] );
                 //$sizeFormatted = pb_backupbuddy::$format->file_size( $stats['size'] );
                 pb_backupbuddy::status('archiveInfo', json_encode(array('file' => basename($this->_backup['archive_file']), 'url' => pb_backupbuddy::ajax_url('download_archive') . '&backupbuddy_backup=' . basename($this->_backup['archive_file']))));
             }
//.........這裏部分代碼省略.........
開發者ID:jcwproductions,項目名稱:jcwproductions-blog,代碼行數:101,代碼來源:backup.php

示例15: str_pad

            echo '<tr>';
        }
    }
    if (pb_backupbuddy::_GET('text') == 'true') {
        echo str_pad(pb_backupbuddy::$format->file_size($item[0]), 10, ' ', STR_PAD_RIGHT) . "\t" . str_pad($excluded_size, 10, ' ', STR_PAD_RIGHT) . "\t" . $id . "\n";
    } else {
        echo '<td>' . $id . '</td><td>' . pb_backupbuddy::$format->file_size($item[0]) . '</td><td>' . $excluded_size . '</td></tr>';
    }
}
if (pb_backupbuddy::_GET('text') == 'true') {
    echo str_pad(pb_backupbuddy::$format->file_size($total_size), 10, ' ', STR_PAD_RIGHT) . "\t" . str_pad(pb_backupbuddy::$format->file_size($total_size_excluded), 10, ' ', STR_PAD_RIGHT) . "\t" . __('TOTALS', 'it-l10n-backupbuddy') . "\n";
} else {
    echo '<tr><td align="right"><b>' . __('TOTALS', 'it-l10n-backupbuddy') . ':</b></td><td><b>' . pb_backupbuddy::$format->file_size($total_size) . '</b></td><td><b>' . pb_backupbuddy::$format->file_size($total_size_excluded) . '</b></td></tr>';
}
if (pb_backupbuddy::_GET('text') == 'true') {
    echo "\n\nEXCLUSIONS (" . count($exclusions) . "):" . "\n" . implode("\n", $exclusions);
    echo '</textarea>';
    pb_backupbuddy::$ui->ajax_footer();
} else {
    echo '</tbody>';
    echo '</table>';
    echo '<br>';
    echo 'Exclusions (' . count($exclusions) . ')';
    pb_backupbuddy::tip('List of directories that will be excluded in an actual backup. This includes user-defined directories and BackupBuddy directories such as the archive directory and temporary directories.');
    echo '<div id="pb_backupbuddy_serverinfo_exclusions" style="background-color: #EEEEEE; padding: 4px; float: right; white-space: nowrap; height: 90px; width: 70%; min-width: 400px; overflow: auto;"><i>' . implode("<br>", $exclusions) . '</i></div>';
    echo '<br style="clear: both;">';
    echo '<br><br><center>';
    echo '<a href="' . pb_backupbuddy::ajax_url('site_size_listing') . '&text=true&#038;TB_iframe=1&#038;width=640&#038;height=600" class="thickbox button secondary-button">' . __('Display Directory Size Listing in Text Format', 'it-l10n-backupbuddy') . '</a>';
    echo '</center>';
}
die;
開發者ID:Ezyva2015,項目名稱:SMSF-Academy-Wordpress,代碼行數:31,代碼來源:site_size_listing.php


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