示例#1
0
	<table class="form-table">
		<tr>
			<td><label for="title"><?php 
_e('Destination Name', 'it-l10n-backupbuddy');
pb_backupbuddy::tip(__('Name of the new destination to create. This is for your convenience only.', 'it-l10n-backupbuddy'));
?>
</label></td>
			<td><input type="text" name="#title" id="title" size="45" maxlength="45" value="<?php 
echo $options['title'];
?>
" /></td>
		</tr>
		<tr>
			<td><label for="email"><?php 
_e('Email', 'it-l10n-backupbuddy');
pb_backupbuddy::tip(__('[Example: your@email.com] - Email address for this destination.', 'it-l10n-backupbuddy'));
?>
</label></td>
			<td><input type="text" name="#email" id="email" size="45" maxlength="255" value="<?php 
echo $options['email'];
?>
" /></td>
		</tr>
	</table>
	
	<?php 
if (isset($_GET['edit']) && $_GET['edit'] != '' && $_GET['type'] == 'email') {
    echo '<p class="submit"><input type="submit" name="edit_destination" value="', __('Save Changes', 'it-l10n-backupbuddy'), '" class="button-primary" /></p>';
} else {
    echo '<p class="submit"><input type="submit" name="add_destination" value="+ ', __('Add Destination', 'it-l10n-backupbuddy'), '" class="button-primary" /></p>';
}
示例#2
0
文件: core.php 项目: verbazend/AWFA
 public function backups_list($type = 'default', $subsite_mode = false)
 {
     if (pb_backupbuddy::_POST('bulk_action') == 'delete_backup') {
         $needs_save = false;
         pb_backupbuddy::verify_nonce(pb_backupbuddy::_POST('_wpnonce'));
         // Security check to prevent unauthorized deletions by posting from a remote place.
         $deleted_files = array();
         foreach (pb_backupbuddy::_POST('items') as $item) {
             if (file_exists(pb_backupbuddy::$options['backup_directory'] . $item)) {
                 if (@unlink(pb_backupbuddy::$options['backup_directory'] . $item) === true) {
                     $deleted_files[] = $item;
                     if (count(pb_backupbuddy::$options['backups']) > 3) {
                         // Keep a minimum number of backups in array for stats.
                         $this_serial = $this->get_serial_from_file($item);
                         unset(pb_backupbuddy::$options['backups'][$this_serial]);
                         $needs_save = true;
                     }
                 } else {
                     pb_backupbuddy::alert('Error: Unable to delete backup file `' . $item . '`. Please verify permissions.', true);
                 }
             }
             // End if file exists.
         }
         // End foreach.
         if ($needs_save === true) {
             pb_backupbuddy::save();
         }
         pb_backupbuddy::alert(__('Deleted backup(s):', 'it-l10n-backupbuddy') . ' ' . implode(', ', $deleted_files));
     }
     // End if deleting backup(s).
     $backups = array();
     $backup_sort_dates = array();
     $files = glob(pb_backupbuddy::$options['backup_directory'] . 'backup*.zip');
     if (is_array($files) && !empty($files)) {
         // For robustness. Without open_basedir the glob() function returns an empty array for no match. With open_basedir in effect the glob() function returns a boolean false for no match.
         $backup_prefix = $this->backup_prefix();
         // Backup prefix for this site. Used for MS checking that this user can see this backup.
         foreach ($files as $file_id => $file) {
             if ($subsite_mode === true && is_multisite()) {
                 // If a Network and NOT the superadmin must make sure they can only see the specific subsite backups for security purposes.
                 // Only allow viewing of their own backups.
                 if (!strstr($file, $backup_prefix)) {
                     unset($files[$file_id]);
                     // Remove this backup from the list. This user does not have access to it.
                     continue;
                     // Skip processing to next file.
                     echo 'bob';
                 }
             }
             $serial = pb_backupbuddy::$classes['core']->get_serial_from_file($file);
             // Populate integrity data structure in options.
             pb_backupbuddy::$classes['core']->backup_integrity_check($file);
             $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;
 }
    $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) {
    _e('No backups have been created yet.', 'it-l10n-backupbuddy');
    echo '<br>';
} else {
    $columns = array(__('Backups', 'it-l10n-backupbuddy') . ' <img src="' . pb_backupbuddy::plugin_url() . '/images/sort_down.png" style="vertical-align: 0px;" title="Sorted most recent first">', __('Type', 'it-l10n-backupbuddy') . ' | ' . __('Profile', 'it-l10n-backupbuddy'), __('File Size', 'it-l10n-backupbuddy'), __('Status', 'it-l10n-backupbuddy') . pb_backupbuddy::tip(__('Backups are checked to verify that they are valid BackupBuddy backups and contain all of the key backup components needed to restore. Backups may display as invalid until they are completed. Click the refresh icon to re-verify the archive.', 'it-l10n-backupbuddy'), '', false));
    // Remove some columns for migration mode.
    /*
    if ( $listing_mode != 'default' ) {
    	
    	foreach( $backups as &$backup ) {
    		unset( $backup[1] ); // Remove backup type (only full shows for migration).
    		$backup = array_values( $backup );
    	}
    	$backups = array_values( $backups );
    	
    	unset( $columns[1] );
    	$columns = array_values( $columns );
    	
    	
    }
            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;
示例#5
0
				<input type="hidden" name="advanced_options[ignore_sql_errors]" value="false">
				<input type="checkbox" name="advanced_options[ignore_sql_errors]" value="true" /> Ignore SQL errors & hide them. <br>
				
				<input type="hidden" name="advanced_options[skip_database_import]" value="false">
				<input type="checkbox" name="advanced_options[skip_database_import]" value="true" /> Skip import of database. <br>
				
				<input type="hidden" name="advanced_options[skip_database_migration]" value="false">
				<input type="checkbox" name="advanced_options[skip_database_migration]" value="true" /> Skip migration of database. <br>
				
				<input type="hidden" name="advanced_options[force_compatibility_medium]" value="false">
				<input type="checkbox" name="advanced_options[force_compatibility_medium]" value="true" /> Force medium speed compatibility mode (ZipArchive). <br>
				
				<input type="hidden" name="advanced_options[force_compatibility_slow]" value="false">
				<input type="checkbox" name="advanced_options[force_compatibility_slow]" value="true" /> Force slow speed compatibility mode (PCLZip). <br>
				
				<br>
				PHP Maximum Execution Time: <input type="text" name="advanced_options[max_execution_time]" value="<?php 
echo $this->detected_max_execution_time;
?>
" size="5"> seconds. <?php 
pb_backupbuddy::tip('The maximum allowed PHP runtime. If your database import step is timing out then lowering this value will instruct the script to limit each `chunk` to allow it to finish within this time period.');
?>
			</div>
		</td>
	</tr>
</table>
<?php 
submit_button(__('Next Step') . ' &raquo;', 'primary', 'add-site');
?>
</form>
示例#6
0
							Variables: {site_url} {backupbuddy_version} {current_datetime} {message}
						</div>'));
$settings_form->add_setting(array('type' => 'title', 'name' => 'title_archivestoragelimits', 'title' => __('Local Archive Storage Limits', 'it-l10n-backupbuddy') . ' ' . pb_backupbuddy::video('PmXLw_tS42Q#45', __('Archive Storage Limits Tutorial', 'it-l10n-backupbuddy'), false)));
$settings_form->add_setting(array('type' => 'text', 'name' => 'archive_limit', 'title' => __('Maximum number of local backups to keep', 'it-l10n-backupbuddy'), 'tip' => __('[Example: 10] - Maximum number of local archived backups to store (remote archive limits are configured per destination on their respective settings pages). Any new backups created after this limit is met will result in your oldest backup(s) being deleted to make room for the newer ones. Changes to this setting take place once a new backup is made. Set to zero (0) for no limit.', 'it-l10n-backupbuddy'), 'rules' => 'required|string[1-500]', 'css' => 'width: 50px;', 'after' => ' backups'));
$settings_form->add_setting(array('type' => 'text', 'name' => 'archive_limit_size', 'title' => __('Maximum size of all local backups combined', 'it-l10n-backupbuddy'), 'tip' => __('[Example: 350] - Maximum size (in MB) to allow your total local archives to reach (remote archive limits are configured per destination on their respective settings pages). Any new backups created after this limit is met will result in your oldest backup(s) being deleted to make room for the newer ones. Changes to this setting take place once a new backup is made. Set to zero (0) for no limit.', 'it-l10n-backupbuddy'), 'rules' => 'required|string[1-500]', 'css' => 'width: 50px;', 'after' => ' MB'));
if (is_multisite()) {
    $settings_form->add_setting(array('type' => 'title', 'name' => 'title_multisite', 'title' => __('Multisite', 'it-l10n-backupbuddy')));
    $settings_form->add_setting(array('type' => 'checkbox', 'name' => 'multisite_export', 'title' => __('Allow individual site exports by administrators?', 'it-l10n-backupbuddy') . ' ' . pb_backupbuddy::video('_oKGIzzuVzw', __('Multisite export', 'it-l10n-backupbuddy'), false), 'options' => array('unchecked' => '0', 'checked' => '1'), 'tip' => __('[Default: disabled] - When enabled individual sites may be exported by Administrators of the individual site. Network Administrators always see this menu (notes with the words SuperAdmin in parentheses in the menu when only SuperAdmins have access to the feature).', 'it-l10n-backupbuddy'), 'rules' => 'required', 'after' => '<span class="description"> ' . __('Check to extend Site Exporting functionality to subsite Administrators.', 'it-l10n-backupbuddy') . '</span>'));
}
$settings_form->add_setting(array('type' => 'title', 'name' => 'title_mysqltables', 'title' => __('Database Backup', 'it-l10n-backupbuddy') . ' ' . pb_backupbuddy::video('PmXLw_tS42Q#62', __('Database backup settings', 'it-l10n-backupbuddy'), false)));
global $wpdb;
$settings_form->add_setting(array('type' => 'radio', 'name' => 'backup_nonwp_tables', 'options' => array('0' => 'This WordPress\' tables (' . $wpdb->prefix . ')', '1' => 'All tables'), 'title' => __('<b>Default</b> database tables to backup', 'it-l10n-backupbuddy'), 'tip' => __('[Default: This WordPress\' tables prefix (' . $wpdb->prefix . ')] - Determines the default set of tables to backup.  If this WordPress\' tables is selected then only tables with the same prefix (for example ' . $wpdb->prefix . ' for this installation) will be backed up by default.  If all are selected then all tables will be backed up by default. Additional inclusions & exclusions may be defined below.', 'it-l10n-backupbuddy'), 'css' => '', 'rules' => 'required'));
$settings_form->add_setting(array('type' => 'textarea', 'name' => 'mysqldump_additional_includes', 'title' => __('Additional tables to <b>include</b>', 'it-l10n-backupbuddy') . '<br><span class="description">' . __('One table per line.', 'it-l10n-backupbuddy') . '</span>', 'tip' => __('Additional databases tables to INCLUDE in the backup in addition to the defaults.', 'it-l10n-backupbuddy'), 'rules' => '', 'css' => 'width: 100%;'));
$settings_form->add_setting(array('type' => 'textarea', 'name' => 'mysqldump_additional_excludes', 'title' => __('Additional tables to <b>exclude</b>', 'it-l10n-backupbuddy') . '<br><span class="description">' . __('One table per line.', 'it-l10n-backupbuddy') . '</span>', 'tip' => __('Additional databases tables to EXCLUDE from the backup. Exclusions are exempted after calculating defaults and additional table includes first. These may include non-WordPress and WordPress tables. WARNING: Excluding WordPress tables results in an incomplete backup and could result in failure in the ability to restore or data loss. Use with caution.', 'it-l10n-backupbuddy'), 'rules' => '', 'css' => 'width: 100%;'));
$settings_form->add_setting(array('type' => 'title', 'name' => 'title_exclusions', 'title' => __('File & Directory Exclusions', 'it-l10n-backupbuddy') . ' ' . pb_backupbuddy::video('PmXLw_tS42Q#94', __('Backup Directory Excluding Tutorial', 'it-l10n-backupbuddy'), false)));
$settings_form->add_setting(array('type' => 'textarea', 'name' => 'excludes', 'title' => 'Click directories to navigate or click <img src="' . pb_backupbuddy::plugin_url() . '/images/bullet_delete.png" style="vertical-align: -3px;"> to exclude.' . ' ' . pb_backupbuddy::tip(__('Click on a directory name to navigate directories. Click the red minus sign to the right of a directory to place it in the exclusion list. /wp-content/, /wp-content/uploads/, and BackupBuddy backup & temporary directories cannot be excluded. BackupBuddy directories are automatically excluded.', 'it-l10n-backupbuddy'), '', false) . '<br><div id="exlude_dirs" class="jQueryOuterTree"></div>' . '<span class="description">No command line zip / exclusions not working?<br> Try enabling `Alternative zip system` below.</span>' . pb_backupbuddy::tip(__('If you receive notifications that your server is entering compatibility mode or that native command line zip functionality is unavailable then this feature will not be available unless you enable `Alternative zip system` in the troubleshooting options below. This is due to technical limitations of the compatibility mode.  Ask your host to correct the problems causing compatibility mode, move to another server, or enable this option.', 'it-l10n-backupbuddy'), '', false), 'rules' => 'string[0-9000]', 'css' => 'width: 100%; height: 103px;', 'before' => __('Excluded files & directories (relative to WordPress installation directory)', 'it-l10n-backupbuddy') . pb_backupbuddy::tip(__('List paths relative to the WordPress installation directory to be excluded from backups.  You may use the directory selector to the left to easily exclude directories by ctrl+clicking them.  Paths are relative to root, for example: /wp-content/uploads/junk/', 'it-l10n-backupbuddy'), '', false) . '<br>', 'after' => '<span class="description">' . __('One file or directory exclusion per line. This may be manually edited.', 'it-l10n-backupbuddy') . '</span>'));
$settings_form->add_setting(array('type' => 'title', 'name' => 'title_troubleshooting', 'title' => __('Troubleshooting & Compatibility', 'it-l10n-backupbuddy') . ' ' . pb_backupbuddy::video('PmXLw_tS42Q#108', __('Troubleshooting options', 'it-l10n-backupbuddy'), false)));
$settings_form->add_setting(array('type' => 'checkbox', 'name' => 'lock_archives_directory', 'options' => array('unchecked' => '0', 'checked' => '1'), 'title' => __('Lock archive directory (high security)', 'it-l10n-backupbuddy'), 'tip' => __('[Default: disabled] - When enabled all downloads of archives via the web will be prevented under all circumstances via .htaccess file. If your server permits it, they will only be unlocked temporarily on click to download. If your server does not support this unlocking then you will have to access the archives via the server (such as by FTP).', 'it-l10n-backupbuddy'), 'css' => '', 'after' => '<span class="description"> ' . __('Check for enhanced security to block backup downloading.', 'it-l10n-backupbuddy') . ' This may<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result in an inability to download backups while enabled on some servers.</span>', 'rules' => 'required'));
$settings_form->add_setting(array('type' => 'checkbox', 'name' => 'delete_archives_pre_backup', 'options' => array('unchecked' => '0', 'checked' => '1'), 'title' => __('Delete all backup archives prior to backups', 'it-l10n-backupbuddy'), 'tip' => __('[Default: disabled] - When enabled all local backup archives will be deleted prior to each backup. This is useful if in compatibilty mode to prevent backing up existing files.', 'it-l10n-backupbuddy'), 'css' => '', 'after' => '<span class="description"> ' . __('Check if using compatibilty mode & exclusions are unavailable.', 'it-l10n-backupbuddy') . '</span>', 'rules' => 'required'));
$settings_form->add_setting(array('type' => 'checkbox', 'name' => 'compression', 'options' => array('unchecked' => '0', 'checked' => '1'), 'title' => __('Enable zip compression', 'it-l10n-backupbuddy'), 'tip' => __('[Default: enabled] - ZIP compression decreases file sizes of stored backups. If you are encountering timeouts due to the script running too long, disabling compression may allow the process to complete faster.', 'it-l10n-backupbuddy'), 'css' => '', 'after' => '<span class="description"> ' . __('Uncheck for large sites causing backups to not complete.', 'it-l10n-backupbuddy') . '</span>', 'rules' => 'required'));
$settings_form->add_setting(array('type' => 'checkbox', 'name' => 'integrity_check', 'options' => array('unchecked' => '0', 'checked' => '1'), 'title' => __('Perform integrity check on backup files', 'it-l10n-backupbuddy'), 'tip' => __('[Default: enabled] - By default each backup file is checked for integrity and completion the first time it is viewed on the Backup page.  On some server configurations this may cause memory problems as the integrity checking process is intensive.  If you are experiencing out of memory errors on the Backup file listing, you can uncheck this to disable this feature.', 'it-l10n-backupbuddy'), 'css' => '', 'after' => '<span class="description"> ' . __('Uncheck if having problems viewing your backup listing.', 'it-l10n-backupbuddy') . '</span>', 'rules' => 'required'));
$settings_form->add_setting(array('type' => 'checkbox', 'name' => 'force_compatibility', 'options' => array('unchecked' => '0', 'checked' => '1'), 'title' => __('Force compatibility mode zip', 'it-l10n-backupbuddy'), 'tip' => __('[Default: disabled] - (WARNING: This forces the potentially slower mode of zip creation. Only use if absolutely necessary. Checking this box can cause backup failures if it is not needed.) Under normal circumstances compatibility mode is automatically entered as needed without user intervention. However under some server configurations the native backup system is unavailable but is incorrectly reported as functioning by the server.  Forcing compatibility may fix problems in this situation by bypassing the native backup system check entirely.', 'it-l10n-backupbuddy'), 'css' => '', 'after' => '<span class="description"> ' . __('Check if absolutely necessary or directed by support.', 'it-l10n-backupbuddy') . '</span>', 'rules' => 'required'));
$settings_form->add_setting(array('type' => 'checkbox', 'name' => 'force_mysqldump_compatibility', 'options' => array('unchecked' => '0', 'checked' => '1'), 'title' => __('Force compatibility mode database dump', 'it-l10n-backupbuddy'), 'tip' => __('[Default: disabled] - WARNING: This forces the potentially slower mode of database dumping. Under normal circumstances mysql dump compatibility mode is automatically entered as needed without user intervention.', 'it-l10n-backupbuddy'), 'css' => '', 'after' => '<span class="description"> ' . __('Check if database dumping fails. Pre-v3.x mode.', 'it-l10n-backupbuddy') . '</span>', 'rules' => 'required'));
$settings_form->add_setting(array('type' => 'checkbox', 'name' => 'skip_database_dump', 'options' => array('unchecked' => '0', 'checked' => '1'), 'title' => __('Skip database dump on backup', 'it-l10n-backupbuddy'), 'tip' => __('[Default: disabled] - (WARNING: This prevents BackupBuddy from backing up the database during any kind of backup. This is for troubleshooting / advanced usage only to work around being unable to backup the database.', 'it-l10n-backupbuddy'), 'css' => '', 'after' => '<span class="description"> ' . __('Check if unable to backup database for some reason.', 'it-l10n-backupbuddy') . '</span>', 'rules' => 'required'));
$settings_form->add_setting(array('type' => 'checkbox', 'name' => 'include_importbuddy', 'options' => array('unchecked' => '0', 'checked' => '1'), 'title' => __('Include ImportBuddy in full backup archive', 'it-l10n-backupbuddy'), 'tip' => __('[Default: enabled] - When enabled, the importbuddy.php file will be included within the backup archive ZIP file.  This file can be used to restore your site.  Inclusion in the ZIP file itself insures you always have access to it. importbuddy.php is only included in full backups and only when this option is enabled.', 'it-l10n-backupbuddy'), 'css' => '', 'after' => '<span class="description"> ' . __('Uncheck to skip adding ImportBuddy to backup archive.', 'it-l10n-backupbuddy') . '</span>', 'rules' => 'required'));
$settings_form->add_setting(array('type' => 'checkbox', 'name' => 'alternative_zip', 'options' => array('unchecked' => '0', 'checked' => '1'), 'title' => __('Alternative zip system (BETA)', 'it-l10n-backupbuddy'), 'tip' => __('[Default: Disabled] Use if directed by support. Allows use of directory exclusion when in PCLZip Compatibility Mode.', 'it-l10n-backupbuddy') . '</span>', 'css' => '', 'after' => '<span class="description"> Check if stuck in compatibiilty (PCLZip) mode for directory exclusions,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;having trouble during ZIP creation, or directed by support.</span>', 'rules' => 'required'));
$settings_form->add_setting(array('type' => 'checkbox', 'name' => 'disable_zipmethod_caching', 'options' => array('unchecked' => '0', 'checked' => '1'), 'title' => __('Disable zip method caching', 'it-l10n-backupbuddy'), 'tip' => __('[Default: Disabled] Use if directed by support. Bypasses caching available zip methods so they are always displayed in logs. When unchecked BackupBuddy will cache command line zip testing for a few minutes so it does not run too often. This means that your backup status log may not always show the test results unless you disable caching.', 'it-l10n-backupbuddy') . '</span>', 'css' => '', 'after' => '<span class="description"> Check if you always want available zip methods to be tested and displayed<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;in backup log files. This is useful for support to see if command line zip is failing.</span>', 'rules' => 'required'));
$settings_form->add_setting(array('type' => 'checkbox', 'name' => 'ignore_zip_warnings', 'options' => array('unchecked' => '0', 'checked' => '1'), 'title' => __('Ignore zip archive warnings', 'it-l10n-backupbuddy'), 'tip' => __('[Default: Disabled] When enabled BackupBuddy will ignore non-fatal warnings encountered during the backup process such as inability to read or access a file, symlink problems, etc. These non-fatal warnings will still be logged.', 'it-l10n-backupbuddy') . '</span>', 'css' => '', 'after' => '<span class="description"> Check to ignore non-fatal errors when zipping files.</span>', 'rules' => 'required'));
$settings_form->add_setting(array('type' => 'checkbox', 'name' => 'zip_viewer_enabled', 'options' => array('unchecked' => '0', 'checked' => '1'), 'title' => __('Allow viewing zip contents (BETA)', 'it-l10n-backupbuddy'), 'tip' => __('[Default: Disabled] This feature is currently in beta. If your server supports ZipArchive, when enabled you may select to `View zip contents` from the backup listing on the Backups page. This allows you to view a listing of files within a ZIP archive.', 'it-l10n-backupbuddy'), 'css' => '', 'after' => '<span class="description"> ' . __('Check for Beta feature for viewing a list of files in an archive.', 'it-l10n-backupbuddy') . '</span>', 'rules' => 'required'));
$settings_form->add_setting(array('type' => 'checkbox', 'name' => 'breakout_tables', 'options' => array('unchecked' => '0', 'checked' => '1'), 'title' => __('Break out big table dumps into steps (beta)', 'it-l10n-backupbuddy'), 'tip' => __('[Default: Disabled] Currently in beta. Breaks up some commonly known database tables to be backed up separately rather than all at once. Helps with larger databases.', 'it-l10n-backupbuddy') . '</span>', 'css' => '', 'after' => '<span class="description"> Check if you want some commonly known to be large tables dumped in<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;separate steps. This is useful for large databases if dumps are timing out.</span>', 'rules' => 'required'));
$settings_form->add_setting(array('type' => 'select', 'name' => 'backup_mode', 'title' => __('Manual backup mode', 'it-l10n-backupbuddy'), 'options' => array('1' => __('Classic (v1.x)', 'it-l10n-backupbuddy'), '2' => __('Modern (v2.x)', 'it-l10n-backupbuddy')), 'tip' => __('[Default: Modern] - If you are encountering difficulty backing up due to WordPress cron, HTTP Loopbacks, or other features specific to version 2.x you can try classic mode which runs like BackupBuddy v1.x did.', 'it-l10n-backupbuddy'), 'rules' => 'required'));
示例#7
0
文件: ajax.php 项目: serker72/T3S
    public function site_size_listing()
    {
        $profile_id = 0;
        if (is_numeric(pb_backupbuddy::_GET('profile'))) {
            if (isset(pb_backupbuddy::$options['profiles'][pb_backupbuddy::_GET('profile')])) {
                $profile_id = pb_backupbuddy::_GET('profile');
                pb_backupbuddy::$options['profiles'][pb_backupbuddy::_GET('profile')] = array_merge(pb_backupbuddy::settings('profile_defaults'), pb_backupbuddy::$options['profiles'][pb_backupbuddy::_GET('profile')]);
                // Set defaults if not set.
            } else {
                pb_backupbuddy::alert('Error #45849458b: Invalid profile ID number `' . htmlentities(pb_backupbuddy::_GET('profile')) . '`. Displaying with default profile.', true);
            }
        }
        echo '<!-- profile: ' . $profile_id . ' -->';
        $exclusions = backupbuddy_core::get_directory_exclusions(pb_backupbuddy::$options['profiles'][$profile_id]);
        $result = pb_backupbuddy::$filesystem->dir_size_map(ABSPATH, ABSPATH, $exclusions, $dir_array);
        if (0 == $result) {
            pb_backupbuddy::alert('Error #5656653. Unable to access directory map listing for directory `' . ABSPATH . '`.');
            die;
        }
        $total_size = pb_backupbuddy::$options['stats']['site_size'] = $result[0];
        $total_size_excluded = pb_backupbuddy::$options['stats']['site_size_excluded'] = $result[1];
        pb_backupbuddy::$options['stats']['site_size_updated'] = time();
        pb_backupbuddy::save();
        arsort($dir_array);
        if (pb_backupbuddy::_GET('text') == 'true') {
            pb_backupbuddy::$ui->ajax_header();
            echo '<h3>' . __('Site Size Listing & Exclusions', 'it-l10n-backupbuddy') . '</h3>';
            echo '<textarea style="width:100%; height: 300px; font-family: monospace;" wrap="off">';
            echo __('Size + Children', 'it-l10n-backupbuddy') . "\t";
            echo __('- Exclusions', 'it-l10n-backupbuddy') . "\t";
            echo __('Directory', 'it-l10n-backupbuddy') . "\n";
        } else {
            ?>
			<style>
				.backupbuddy_sizemap_table th {
					white-space: nowrap;
				}
				.backupbuddy_sizemap_table td {
					word-break: break-all;
				}
			</style>
			<table class="widefat backupbuddy_sizemap_table">
				<thead>
					<tr class="thead">
						<?php 
            echo '<th>', __('Directory', 'it-l10n-backupbuddy'), '</th>', '<th>', __('Size with Children', 'it-l10n-backupbuddy'), '</th>', '<th>', __('Size with Exclusions', 'it-l10n-backupbuddy'), '<br><span class="description">Global defaults profile</span></th>';
            ?>
					</tr>
				</thead>
				<tfoot>
					<tr class="thead">
						<?php 
            echo '<th>', __('Directory', 'it-l10n-backupbuddy'), '</th>', '<th>', __('Size with Children', 'it-l10n-backupbuddy'), '</th>', '<th>', __('Size with Exclusions', 'it-l10n-backupbuddy'), '<br><span class="description">Global defaults profile</span></th>';
            ?>
					</tr>
				</tfoot>
				<tbody>
			<?php 
        }
        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>';
        }
        $item_count = 0;
        foreach ($dir_array as $id => $item) {
            // Each $item is in format array( TOTAL_SIZE, TOTAL_SIZE_TAKING_EXCLUSIONS_INTO_ACCOUNT );
            $item_count++;
            if ($item_count > 100) {
                flush();
                $item_count = 0;
            }
            if ($item[1] === false) {
                if (pb_backupbuddy::_GET('text') == 'true') {
                    $excluded_size = 'EXCLUDED';
                    echo '**';
                } else {
                    $excluded_size = '<span class="pb_label pb_label-important">Excluded</span>';
                    echo '<tr style="background: #fcc9c9;">';
                }
            } else {
                $excluded_size = pb_backupbuddy::$format->file_size($item[1]);
                if (pb_backupbuddy::_GET('text') != 'true') {
                    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;
    }
示例#8
0
	'name'		=>		'title_exclusions',
	'title'		=>		__( 'Directory Exclusions', 'it-l10n-backupbuddy' ) . ' ' . pb_backupbuddy::video( 'PmXLw_tS42Q#94', __('Backup Directory Excluding Tutorial', 'it-l10n-backupbuddy' ), false ),
) );

$settings_form->add_setting( array(
	'type'		=>		'textarea',
	'name'		=>		'excludes',
	'title'		=>		'Click directories to navigate or click <img src="' . pb_backupbuddy::plugin_url() .'/images/bullet_delete.png" style="vertical-align: -3px;"> to exclude.' . ' ' .
						pb_backupbuddy::tip( __('Click on a directory name to navigate directories. Click the red minus sign to the right of a directory to place it in the exclusion list. /wp-content/, /wp-content/uploads/, and BackupBuddy backup & temporary directories cannot be excluded. BackupBuddy directories are automatically excluded.', 'it-l10n-backupbuddy' ), '', false ) .
						'<br><div id="exlude_dirs" class="jQueryOuterTree"></div>' .
						'<span class="description">' . __( 'Available if server does not require compatibility mode.', 'it-l10n-backupbuddy' ) . '</span>' .
						pb_backupbuddy::tip( __('If you receive notifications that your server is entering compatibility mode or that native zip functionality is unavailable then this feature will not be available due to technical limitations of the compatibility mode.  Ask your host to correct the problems causing compatibility mode or move to a new server.', 'it-l10n-backupbuddy' ), '', false ),
	//'tip'		=>		,
	'rules'		=>		'string[0-9000]',
	'css'		=>		'width: 100%; height: 103px;',
	'before'	=>		__('Excluded directories (relative to WordPress installation directory)' , 'it-l10n-backupbuddy' ) . pb_backupbuddy::tip( __('List paths relative to the WordPress installation directory to be excluded from backups.  You may use the directory selector to the left to easily exclude directories by ctrl+clicking them.  Paths are relative to root, for example: /wp-content/uploads/junk/', 'it-l10n-backupbuddy' ), '', false ) . '<br>',
	'after'		=>		'<span class="description">' . __( 'One directory exclusion per line. This may be manually edited.', 'it-l10n-backupbuddy' ) . '</span>',
) );



$settings_form->add_setting( array(
	'type'		=>		'title',
	'name'		=>		'title_troubleshooting',
	'title'		=>		__( 'Troubleshooting & Compatibility', 'it-l10n-backupbuddy' ) . ' ' . pb_backupbuddy::video( 'PmXLw_tS42Q#108', __('Troubleshooting options', 'it-l10n-backupbuddy' ), false ),
) );
$settings_form->add_setting( array(
	'type'		=>		'checkbox',
	'name'		=>		'lock_archives_directory',
	'options'	=>		array( 'unchecked' => '0', 'checked' => '1' ),
	'title'		=>		__( 'Lock archive directory (high security)', 'it-l10n-backupbuddy' ),
示例#9
0
if ($listing_mode == 'migrate') {
    $hover_actions['migrate'] = 'Migrate this backup';
    $hover_actions[pb_backupbuddy::ajax_url('download_archive') . '&backupbuddy_backup='] = 'Download file';
    $hover_actions['hash'] = 'Get hash';
    $hover_actions['note'] = 'Note';
    foreach ($backups as $backup_id => $backup) {
        if ($backup[1] == 'Database') {
            unset($backups[$backup_id]);
        }
    }
}
if (count($backups) == 0) {
    _e('No backups have been created yet.', 'it-l10n-backupbuddy');
    echo '<br>';
} else {
    $columns = array(__('Backup File', 'it-l10n-backupbuddy') . pb_backupbuddy::tip(__('Files include random characters in their name for increased security. Verify that write permissions are available for this directory. Backup files are stored in ', 'it-l10n-backupbuddy') . str_replace('\\', '/', pb_backupbuddy::$options['backup_directory']), '', false) . '<span class="pb_backupbuddy_backuplist_loading" style="display: none; margin-left: 10px;"><img src="' . pb_backupbuddy::plugin_url() . '/images/loading.gif" alt="' . __('Loading...', 'it-l10n-backupbuddy') . '" title="' . __('Loading...', 'it-l10n-backupbuddy') . '" width="16" height="16" style="vertical-align: -3px;" /></span>', __('Type', 'it-l10n-backupbuddy'), __('File Size', 'it-l10n-backupbuddy'), __('Created', 'it-l10n-backupbuddy') . ' <img src="' . pb_backupbuddy::plugin_url() . '/images/sort_down.png" style="vertical-align: 0px;" title="Sorted most recent first">', __('Statistics', 'it-l10n-backupbuddy') . pb_backupbuddy::tip(__('Various statistics collected during backup such as time taken. Hover over the question mark in the status column for additional detailed information about the backup.', 'it-l10n-backupbuddy'), '', false), __('Status', 'it-l10n-backupbuddy') . pb_backupbuddy::tip(__('Backups are checked to verify that they are valid BackupBuddy backups and contain all of the key backup components needed to restore. Backups may display as invalid until they are completed. Click the refresh icon to re-verify the archive.', 'it-l10n-backupbuddy'), '', false));
    // Remove some columns for migration mode.
    if ($listing_mode != 'default') {
        foreach ($backups as &$backup) {
            unset($backup[1]);
            // Remove backup type (only full shows for migration).
            unset($backup[4]);
            // Remove stats
            $backup = array_values($backup);
        }
        $backups = array_values($backups);
        unset($columns[1]);
        unset($columns[4]);
        $columns = array_values($columns);
    }
    pb_backupbuddy::$ui->list_table($backups, array('action' => pb_backupbuddy::page_url(), 'columns' => $columns, 'hover_actions' => $hover_actions, 'hover_action_column_key' => '0', 'bulk_actions' => array('delete_backup' => 'Delete'), 'css' => 'width: 100%;'));
示例#10
0
文件: _step1.php 项目: verbazend/AWFA
		
		<?php // These advanced options will be available via $this->advanced_options from within the msimport class on each page. Passed along in the submitted form per step. ?>
		<span class="pb_toggle button-secondary" id="advanced">Advanced Configuration Options</span>
			<div id="pb_toggle-advanced" class="pb_toggled" style="margin-top: 12px; width: 600px;">
				<b>WARNING:</b> Improper use of Advanced Options could result in data loss.<br><br>
				<input type="hidden" name="advanced_options[skip_files]" value="false">
				<input type="checkbox" name="advanced_options[skip_files]" value="true"> Skip zip file extraction. <?php pb_backupbuddy::tip( 'Checking this box will prevent extraction/unzipping of the backup ZIP file.  You will need to manually extract it either on your local computer then upload it or use a server-based tool such as cPanel to extract it. This feature is useful if the extraction step is unable to complete for some reason.' ); ?><br>
				
				<input type="hidden" name="advanced_options[ignore_sql_errors]" value="false">
				<input type="checkbox" name="advanced_options[ignore_sql_errors]" value="true" /> Ignore SQL errors & hide them. <br>
				
				<input type="hidden" name="advanced_options[skip_database_import]" value="false">
				<input type="checkbox" name="advanced_options[skip_database_import]" value="true" /> Skip import of database. <br>
				
				<input type="hidden" name="advanced_options[skip_database_migration]" value="false">
				<input type="checkbox" name="advanced_options[skip_database_migration]" value="true" /> Skip migration of database. <br>
				
				<input type="hidden" name="advanced_options[force_compatibility_medium]" value="false">
				<input type="checkbox" name="advanced_options[force_compatibility_medium]" value="true" /> Force medium speed compatibility mode (ZipArchive). <br>
				
				<input type="hidden" name="advanced_options[force_compatibility_slow]" value="false">
				<input type="checkbox" name="advanced_options[force_compatibility_slow]" value="true" /> Force slow speed compatibility mode (PCLZip). <br>
				
				<br>
				PHP Maximum Execution Time: <input type="text" name="advanced_options[max_execution_time]" value="<?php echo $this->detected_max_execution_time; ?>" size="5"> seconds. <?php pb_backupbuddy::tip( 'The maximum allowed PHP runtime. If your database import step is timing out then lowering this value will instruct the script to limit each `chunk` to allow it to finish within this time period.' ); ?>
			</div>
		</td>
	</tr>
</table>
<?php submit_button( __('Next Step') . ' &raquo;', 'primary', 'add-site' ); ?>
</form>
示例#11
0
	function pb_backupbuddy_selectdestination( destination_id, destination_title, callback_data, delete_after, mode ) {
		window.location.href = '<?php 
echo pb_backupbuddy::page_url();
?>
&custom=remoteclient&destination_id=' + destination_id;
	}
</script>
<?php 
/* BEGIN CONFIGURING PLUGIN SETTINGS FORM */
$settings_form = new pb_backupbuddy_settings('settings', '', 'tab=0', 350);
$settings_form->add_setting(array('type' => 'title', 'name' => 'title_general', 'title' => __('General', 'it-l10n-backupbuddy')));
$settings_form->add_setting(array('type' => 'password', 'name' => 'importbuddy_pass_hash', 'title' => __('ImportBuddy password', 'it-l10n-backupbuddy'), 'tip' => __('[Example: myp@ssw0rD] - Required password for running the ImportBuddy import/migration script. This prevents unauthorized access when using this tool. You should not use your WordPress password here.', 'it-l10n-backupbuddy'), 'value' => $importbuddy_pass_dummy_text, 'css' => 'width: 120px;', 'after' => '&nbsp;&nbsp; <span style="white-space: nowrap;">Confirm: <input style="width: 120px;" type="password" name="pb_backupbuddy_importbuddy_pass_hash_confirm" value="' . $importbuddy_pass_dummy_text . '"></span>'));
$settings_form->add_setting(array('type' => 'text', 'name' => 'backup_directory', 'title' => __('Custom local storage directory', 'it-l10n-backupbuddy'), 'tip' => __('Leave blank for default. To customize, enter a full local path where all backup ZIP files will be saved to. This directory must have proper write and read permissions. Upon changing, any backups in the existing directory will be moved to the new directory. Note: This is only where local backups will be, not remotely stored backups. Remote storage is configured on the Remote Destinations page.', 'it-l10n-backupbuddy'), 'rules' => '', 'css' => 'width: 250px;', 'before' => '<span style="white-space: nowrap;">', 'after' => ' <span class="description">' . __('Blank for default', 'it-l10n-backupbuddy') . ':</span>&nbsp; <span class="code" style="background: #EAEAEA; white-space: normal;">' . backupbuddy_core::_getBackupDirectoryDefault() . '</span>'));
$settings_form->add_setting(array('type' => 'select', 'name' => 'role_access', 'title' => __('BackupBuddy access permission', 'it-l10n-backupbuddy'), 'options' => array('administrator' => __('Administrator (default)', 'it-l10n-backupbuddy'), 'moderate_comments' => __('Editor (moderate_comments)', 'it-l10n-backupbuddy'), 'edit_published_posts' => __('Author (edit_published_posts)', 'it-l10n-backupbuddy'), 'edit_posts' => __('Contributor (edit_posts)', 'it-l10n-backupbuddy')), 'tip' => __('[Default: Administrator] - Allow other user levels to access BackupBuddy. Use extreme caution as users granted access will have FULL access to BackupBuddy and your backups, including remote destinations. This is a potential security hole if used improperly. Use caution when selecting any other user roles or giving users in such roles access. Not applicable to Multisite installations.', 'it-l10n-backupbuddy'), 'after' => ' <span class="description">Use caution changing from "administrator".</span>', 'rules' => 'required'));
require_once '_email.php';
$settings_form->add_setting(array('type' => 'title', 'name' => 'title_archivestoragelimits', 'title' => __('Local Archive Storage Limits', 'it-l10n-backupbuddy') . ' ' . pb_backupbuddy::tip('Prevent too many backups from piling up on your local server by setting limits.  Limits are applied in the order listed below.', '', false)));
if ('settings' == pb_backupbuddy::_POST('pb_backupbuddy_')) {
    if (!is_numeric(pb_backupbuddy::_POST('pb_backupbuddy_archive_limit_db'))) {
        pb_backupbuddy::alert(__('Archive limiting by database type must be a numerical value. Reset to zero.', 'it-l10n-backupbuddy'));
        $_POST['pb_backupbuddy_archive_limit_db'] = 0;
    } else {
        pb_backupbuddy::$options['archive_limit_db'] = pb_backupbuddy::_POST('pb_backupbuddy_archive_limit_db');
    }
    if (!is_numeric(pb_backupbuddy::_POST('pb_backupbuddy_archive_limit_files'))) {
        pb_backupbuddy::alert(__('Archive limiting by files only type must be a numerical value. Reset to zero.', 'it-l10n-backupbuddy'));
        $_POST['pb_backupbuddy_archive_limit_files'] = 0;
    } else {
        pb_backupbuddy::$options['archive_limit_files'] = pb_backupbuddy::_POST('pb_backupbuddy_archive_limit_files');
    }
}
$settings_form->add_setting(array('type' => 'text', 'name' => 'archive_limit_age', 'title' => __('Age limit of local backups', 'it-l10n-backupbuddy'), 'tip' => __('[Example: 90] - Maximum age (in days) to allow your local archives to reach (remote archive limits are configured per destination on their respective settings pages). Any backups exceeding this age will be deleted as new backups are created. Changes to this setting take place once a new backup is made. Set to zero (0) for no limit.', 'it-l10n-backupbuddy'), 'rules' => 'required|int|int', 'css' => 'width: 50px;', 'after' => ' days. <span class="description">0 for no limit.</span>'));
			<td><span style="font-size: 1.17em; font-weight: bold; white-space: nowrap;"><?php 
_e('Status Log', 'it-l10n-backupbuddy');
?>
</span></td>
			<td width="16"><span id="pb_backupbuddy_loading" style="display: none; margin-left: 10px;"><img src="<?php 
echo pb_backupbuddy::plugin_url();
?>
/images/loading.gif" <?php 
echo 'alt="', __('Loading...', 'it-l10n-backupbuddy'), '" title="', __('Loading...', 'it-l10n-backupbuddy'), '"';
?>
 width="16" height="16" style="vertical-align: -3px;" /></span></td>
			<td width="100%" align="right"><?php 
_e('Archive size', 'it-l10n-backupbuddy');
?>
: <span class="backupbuddy_archive_size">0 MB</span> <?php 
pb_backupbuddy::tip(__('This is the current size of the backup archive as it is being generated. This size will grow until the backup is complete.', 'it-l10n-backupbuddy'));
?>
</td>
		</tr></table>
		
		<!-- &middot;&middot;&middot; Starting backup procedure... &middot;&middot;&middot; -->
		
		<textarea wrap="off" id="backupbuddy_messages" style="width: 793px; white-space: nowrap;">Time	Elapsed	Memory		Message</textarea>
		
		
		<div id="backupbuddy_errors_notice"><span id="backupbuddy_errors_notice_count"></span> or more errors encountered in the status log above.<br><span id="backupbuddy_errors_notice_subtext"><b>Not all errors are fatal.</b> Look up error codes & troubleshooting details in the <a href="http://ithemes.com/codex/page/BackupBuddy#Troubleshooting" target="_new"><b>Knowledge Base</b></a>.<br>Provide a copy of the status log above if seeking support.</span></div>
		
		
		<br><br><br>
		<div style="text-align: center;" id="pb_backupbuddy_stop">
			<a class="button secondary-button">Cancel Backup</a>
示例#13
0
文件: html_3.php 项目: verbazend/AWFA
	<input type="checkbox" name="skip_database_migration" <?php if ( pb_backupbuddy::$options['skip_database_migration'] == '1' ) echo 'checked'; ?>> Skip migration of database. <br>
	<br>
	<b>After importing, skip data migration on these tables:</b><?php pb_backupbuddy::tip( 'Database tables to exclude from migration. These tables will still be imported into the database but URLs and paths will not be modified. This is useful if the migration is timing out.' ); ?><br><textarea name="exclude_tables" style="width: 300px; height: 75px;"></textarea>
</div>
*/
?>
			<div style="clear: both; display: none; background-color: #F1EDED; -moz-border-radius:4px 4px 4px 4px; border:1px solid #DFDFDF; margin-right:10px; padding:3px;" id="ithemes_loading">
				<img src="importbuddy/images/loading.gif">Loading ...</div>
			</div>
		
		<?php 
if (pb_backupbuddy::$options['force_high_security'] != false || isset(pb_backupbuddy::$options['dat_file']['high_security']) && pb_backupbuddy::$options['dat_file']['high_security'] === true) {
    ?>
			<label>&nbsp;</label><br>
			<h3>Create Administrator Account <?php 
    pb_backupbuddy::tip('Your backup was created either with High Security Mode enabled or from a WordPress Multisite installation. For security your must provide a WordPress username and password to grant administrator privileges to.', '', true);
    ?>
</h3>
			<label>
				New admin username
			</label>
			<input type="text" name="admin_user" id="admin_user" value="" style="width: 175px;" />
			<span class="light">(if user exists, it will be overwritten)</span>
			<br>
			<label>
				Password
			</label>
			<input type="text" name="admin_pass" id="admin_pass" value="" style="width: 175px;" />
			<br>
		<?php 
}
示例#14
0
	});
</script>




<?php 
pb_backupbuddy::$ui->title(__('Scheduled Backups', 'it-l10n-backupbuddy'));
pb_backupbuddy::$ui->start_metabox($mode_title . ' ' . pb_backupbuddy::video('MGiUdYb68ps', __('Scheduling', 'it-l10n-backupbuddy'), false), true, 'width: 100%;');
$schedule_form->display_settings('+ ' . $mode_title);
echo '<br><br>';
pb_backupbuddy::$ui->end_metabox();
if (count($schedules) == 0) {
    //echo '<h4>' . __( 'No schedules have been created yet.', 'it-l10n-backupbuddy' ) . '</h4>';
} else {
    pb_backupbuddy::$ui->list_table($schedules, array('action' => pb_backupbuddy::page_url(), 'columns' => array(__('Title', 'it-l10n-backupbuddy'), __('Type', 'it-l10n-backupbuddy'), __('Interval', 'it-l10n-backupbuddy'), __('Destinations', 'it-l10n-backupbuddy'), __('First Run', 'it-l10n-backupbuddy'), __('Last Run', 'it-l10n-backupbuddy') . pb_backupbuddy::tip(__('Last run time is the last time that this scheduled backup started. This does not imply that the backup completed, only that it began at this time. The last run time is reset if the schedule is edited.', 'it-l10n-backupbuddy'), '', false)), 'hover_actions' => array('edit' => 'Edit Schedule'), 'bulk_actions' => array('delete_schedule' => 'Delete'), 'css' => 'width: 100%;'));
}
echo '<br>';
?>




<br /><br />
<div class="description" style="width: 793px; text-align: center;">
	<?php 
_e('Due to the way schedules are triggered in WordPress someone must visit your site<br /> for scheduled backups to occur. If there are no visits, some schedules may not be triggered.', 'it-l10n-backupbuddy');
?>
<br>
	WordPress cron events may be viewed or run manually from the <a href="?page=pb_backupbuddy_server_info">Server Information page</a>.<br>
	Additional cron control is available via the free plugin <a target="_new" href="http://wordpress.org/extend/plugins/wp-cron-control/">WP-Cron Control</a> by Automaticc.
示例#15
0
?>
&database_replace=1&parent_config=<?php 
echo htmlentities(pb_backupbuddy::_GET('parent_config'));
?>
" method="post">
		<input type="hidden" name="action" value="replace">
		
		<h4>Replace <?php 
pb_backupbuddy::tip('Text you want to be searched for and replaced. Everything in the box is considered one match and may span multiple lines.');
?>
</h4>
		<textarea name="needle" style="width: 100%;"></textarea>
		<br>
		
		<h4>With <?php 
pb_backupbuddy::tip('Text you want to replace with. Any text found matching the box above will be replaced with this text. Everything in the box is considered one match and may span multiple lines.');
?>
</h4>
		<textarea name="replacement" style="width: 100%;"></textarea>
		
		<h4>In table(s)</h4>
		<label style="float: none;" for="table_selection_all"><input id="table_selection_all"  checked='checked' type="radio" name="table_selection" value="all"> all tables</label>
		<label style="float: none;" for="table_selection_prefix"><input id="table_selection_prefix" type="radio" name="table_selection" value="prefix"> with prefix:</label>
		<select name="table_prefix" id="table_selection_prefix" onclick="jQuery('#table_selection_prefix').click();">
			<?php 
foreach ($prefixes as $prefix) {
    echo '<option value="' . $prefix . '">' . $prefix . '</option>';
}
?>
		</select>
		<label style="float: none;" for="table_selection_table"><input id="table_selection_table" type="radio" name="table_selection" value="single_table"> single:</label>
示例#16
0
 if (version_compare($wpdb->db_version(), '5.0.15', '<=')) {
     $parent_class_test['status'] = 'FAIL';
 } elseif (version_compare($wpdb->db_version(), '5.5.0', '<=')) {
     $parent_class_test['status'] = 'WARNING';
 } else {
     $parent_class_test['status'] = 'OK';
 }
 array_push($tests, $parent_class_test);
 // ADDHANDLER HTACCESS CHECK
 $parent_class_test = array('title' => 'AddHandler in .htaccess', 'suggestion' => 'host dependant (none best unless required)', 'tip' => __('If detected then you may have difficulty migrating your site to some hosts without first removing the AddHandler line. Some hosts will malfunction with this line in the .htaccess file.', 'it-l10n-backupbuddy'));
 if (file_exists(ABSPATH . '.htaccess')) {
     $addhandler_note = '';
     $htaccess_lines = file(ABSPATH . '.htaccess');
     foreach ($htaccess_lines as $htaccess_line) {
         if (preg_match('/^(\\s*)AddHandler(.*)/i', $htaccess_line, $matches) > 0) {
             $addhandler_note = pb_backupbuddy::tip(htmlentities($matches[0]), __('AddHandler Value', 'it-l10n-backupbuddy'), false);
         }
     }
     unset($htaccess_lines);
     if ($addhandler_note == '') {
         $parent_class_test['status'] = 'OK';
         $parent_class_test['value'] = __('none, n/a', 'it-l10n-backupbuddy');
     } else {
         $parent_class_test['status'] = 'WARNING';
         $parent_class_test['value'] = __('exists', 'it-l10n-backupbuddy') . $addhandler_note;
     }
     unset($htaccess_contents);
 } else {
     $parent_class_test['status'] = 'OK';
     $parent_class_test['value'] = __('n/a', 'it-l10n-backupbuddy');
 }
示例#17
0
			<input type="checkbox" name="show_php_warnings" /> Show detailed PHP warnings. <br>
			<br>
			PHP Maximum Execution Time: <input type="text" name="max_execution_time" value="<?php 
    echo $detected_max_execution_time;
    ?>
" size="5"> seconds. <?php 
    pb_backupbuddy::tip('The maximum allowed PHP runtime. If your database import step is timing out then lowering this value will instruct the script to limit each `chunk` to allow it to finish within this time period.');
    ?>
			<br>
			Error Logging to importbuddy.txt: <select name="log_level">
				<option value="0">None</option>
				<option value="1" selected>Errors Only (default)</option>
				<option value="2">Errors & Warnings</option>
				<option value="3">Everything (debug mode)</option>
			</select> <?php 
    pb_backupbuddy::tip('Errors and other debugging information will be written to importbuddy.txt in the same directory as importbuddy.php.  This is useful for debugging any problems encountered during import.  Support may request this file to aid in tracking down any problems or bugs.');
    ?>
		</div>
		<?php 
    echo '<div id="toggle-serverinfo" class="toggled" style="margin-top: 12px;">';
    $server_info_file = ABSPATH . 'importbuddy/controllers/pages/server_info.php';
    if (file_exists($server_info_file)) {
        require_once $server_info_file;
    } else {
        echo '{Error: Missing server tools file `' . $server_info_file . '`.}';
    }
    echo '</div>';
    ?>
	</div>
	<br>
	<?php 
        // Viewer disabled.
        $hover_actions = array(pb_backupbuddy::ajax_url('download_archive') . '&backup=' => 'Download file', 'send' => 'Send file offsite');
    }
}
if ($listing_mode == 'migrate') {
    $hover_actions = array('migrate' => 'Migrate this backup', pb_backupbuddy::ajax_url('download_archive') . '&backup=' => 'Download file');
    foreach ($backups as $backup_id => $backup) {
        if ($backup[4] == 'Database') {
            unset($backups[$backup_id]);
        }
    }
}
if (count($backups) == 0) {
    _e('No backups have been created yet.', 'it-l10n-backupbuddy');
    echo '<br>';
} else {
    $columns = array(__('Backup File', 'it-l10n-backupbuddy') . pb_backupbuddy::tip(__('Files include random characters in their name for increased security. Verify that write permissions are available for this directory. Backup files are stored in ', 'it-l10n-backupbuddy') . str_replace('\\', '/', pb_backupbuddy::$options['backup_directory']), '', false), __('Last Modified', 'it-l10n-backupbuddy') . ' <img src="' . pb_backupbuddy::plugin_url() . '/images/sort_down.png" style="vertical-align: 0px;" title="Sorted most recent first">', __('File Size', 'it-l10n-backupbuddy'), __('Status', 'it-l10n-backupbuddy') . pb_backupbuddy::tip(__('Backups are checked to verify that they are valid BackupBuddy backups and contain all of the key backup components needed to restore. Backups may display as invalid until they are completed. Click the refresh icon to re-verify the archive.', 'it-l10n-backupbuddy'), '', false));
    if ($listing_mode == 'default') {
        $columns[] = __('Type', 'it-l10n-backupbuddy');
        $columns[] = __('Statistics', 'it-l10n-backupbuddy') . pb_backupbuddy::tip(__('Various statistics collected during backup such as time taken. Hover over the question mark in the status column for additional detailed information about the backup.', 'it-l10n-backupbuddy'), '', false);
    } else {
        // Remove some columns for migration version.
        foreach ($backups as &$backup) {
            unset($backup[4]);
            // Remove backup type (only full shows for migration).
            unset($backup[5]);
            // Remove stats.
        }
    }
    pb_backupbuddy::$ui->list_table($backups, array('action' => pb_backupbuddy::page_url(), 'columns' => $columns, 'hover_actions' => $hover_actions, 'hover_action_column_key' => '0', 'bulk_actions' => array('delete_backup' => 'Delete'), 'css' => 'width: 100%;'));
}
示例#19
0
?>
		</tr>
	</thead>
	<tfoot>
		<tr class="thead">
			<th style="width: 15px;">&nbsp;</th>
			<?php 
echo '<th>', __('Server Configuration', 'it-l10n-backupbuddy'), '</th>', '<th>', __('Suggestion', 'it-l10n-backupbuddy'), '</th>', '<th>', __('Value', 'it-l10n-backupbuddy'), '</th>', '<th style="width: 15px;">', __('Status', 'it-l10n-backupbuddy'), '</th>';
?>
		</tr>
	</tfoot>
	<tbody>
		<?php 
foreach ($tests as $parent_class_test) {
    echo '<tr class="entry-row alternate">';
    echo '	<td>' . pb_backupbuddy::tip($parent_class_test['tip'], '', false) . '</td>';
    echo '	<td>' . $parent_class_test['title'] . '</td>';
    echo '	<td>' . $parent_class_test['suggestion'] . '</td>';
    echo '	<td>' . $parent_class_test['value'] . '</td>';
    //echo '	<td>' . $parent_class_test['status'] . '</td>';
    echo '	<td>';
    if ($parent_class_test['status'] == __('OK', 'it-l10n-backupbuddy')) {
        echo '<span class="pb_label pb_label-success">Pass</span>';
        //echo '<div style="background-color: #22EE5B; border: 1px solid #E2E2E2;">&nbsp;&nbsp;&nbsp;</div>';
    } elseif ($parent_class_test['status'] == __('FAIL', 'it-l10n-backupbuddy')) {
        echo '<span class="pb_label pb_label-important">Fail</span>';
        //echo '<div style="background-color: #CF3333; border: 1px solid #E2E2E2;">&nbsp;&nbsp;&nbsp;</div>';
    } elseif ($parent_class_test['status'] == __('WARNING', 'it-l10n-backupbuddy')) {
        echo '<span class="pb_label pb_label-warning">Warning</span>';
        //echo '<div style="background-color: #FEFF7F; border: 1px solid #E2E2E2;">&nbsp;&nbsp;&nbsp;</div>';
    }
示例#20
0
	pb_backupbuddy::load_script( 'admin.js' );
	
	
	
	pb_backupbuddy::$ui->title( __( 'Server Information', 'it-l10n-backupbuddy' ) . ' ' . pb_backupbuddy::video( '7NI7oePvxZg', __( 'Server information', 'it-l10n-backupbuddy' ), false ) );
	pb_backupbuddy::$classes['core']->versions_confirm();
	
	
	
	pb_backupbuddy::$ui->start_metabox( __( 'Server Configuration', 'it-l10n-backupbuddy' ) . ' ' .pb_backupbuddy::video( 'XfZy-7DdbS0#t=0m14s', __( 'Server Configuration', 'it-l10n-backupbuddy' ), false ), true, 'width: 100%;' );
	require_once( 'server_info/server.php' );
	pb_backupbuddy::$ui->end_metabox();
	
	
	
	pb_backupbuddy::$ui->start_metabox( __( 'Recent Remote File Transfers', 'it-l10n-backupbuddy' ) . ' ' . pb_backupbuddy::tip( 'Below is a list of recent file transfers to remote destinations. This is useful for verifying file sending and troubleshooting.', '', false ) . ' ' . pb_backupbuddy::video( '7NI7oePvxZg#36', __('Recent remote file transfers', 'it-l10n-backupbuddy' ), false ), true, 'width: 100%;' );
	require_once( 'server_info/remote_sends.php' );
	pb_backupbuddy::$ui->end_metabox();
	
	
	
	// This page can take a bit to run.
	// Runs AFTER server information is displayed so we can view the default limits for the server.
	pb_backupbuddy::set_greedy_script_limits();
	
	
	
	pb_backupbuddy::$ui->start_metabox( __( 'File Permissions', 'it-l10n-backupbuddy' ) . ' ' .pb_backupbuddy::video( '7NI7oePvxZg#55', __( 'File Permissions', 'it-l10n-backupbuddy' ), false ), true, 'width: 100%;' );
	require_once( 'server_info/permissions.php' );
	pb_backupbuddy::$ui->end_metabox();
	
示例#21
0
文件: sample.php 项目: verbazend/AWFA
    /**
     *	\WP_Widget::form() Override
     *
     *	Displays the widget form on the widget selection page for setting widget settings.
     *	Widget defaults are pre-merged into $instance right before this function is called.
     *	Use $widget->get_field_id() and $widget->get_field_name() to get field IDs and names for form elements.
     *	Anything to display should be echo'd out.
     *	@see WP_Widget class
     *
     *	@param		$instance	array		Associative array containing the options set previously in this form and/or the widget defaults (merged already).
     *	@return		null
     */
    function form($instance)
    {
        $instance = array_merge((array) pb_backupbuddy::settings('widget_defaults'), (array) $instance);
        ?>
		<label for="<?php 
        echo $this->get_field_id('title');
        ?>
">Title:
			<input class="widefat" id="<?php 
        echo $this->get_field_id('title');
        ?>
" name="<?php 
        echo $this->get_field_name('title');
        ?>
" type="text" value="<?php 
        echo $instance['title'];
        ?>
" />
		</label>
		<label for="<?php 
        echo $this->get_field_id('posts');
        ?>
">Number of posts to display in list:
			<input class="widefat" id="<?php 
        echo $this->get_field_id('posts');
        ?>
" name="<?php 
        echo $this->get_field_name('posts');
        ?>
" type="text" value="<?php 
        echo $instance['posts'];
        ?>
" />
		</label>
		<label for="<?php 
        echo $this->get_field_id('width');
        ?>
">Max width of widget (in percent) <?php 
        pb_backupbuddy::tip('Maximum width in percent to allow this to use. If you want to limit the width or correct for padding issues, reduce this number to a lower percent. Valid values are 1 to 100.');
        ?>
 :
			<input class="widefat" id="<?php 
        echo $this->get_field_id('width');
        ?>
" name="<?php 
        echo $this->get_field_name('width');
        ?>
" type="text" value="<?php 
        echo $instance['width'];
        ?>
" />
		</label>
		<label for="<?php 
        echo $this->get_field_id('truncate');
        ?>
">Max characters in post title <?php 
        pb_backupbuddy::tip('Maximum number of characters to display from a post title before truncating and adding an elipses (...). This must be a number. Default: 60');
        ?>
 :
			<input class="widefat" id="<?php 
        echo $this->get_field_id('truncate');
        ?>
" name="<?php 
        echo $this->get_field_name('truncate');
        ?>
" type="text" value="<?php 
        echo $instance['truncate'];
        ?>
" />
		</label>
					
		<input type="hidden" id="<?php 
        echo $this->get_field_id('submit');
        ?>
" name="<?php 
        echo $this->get_field_name('submit');
        ?>
" value="1" />
		<?php 
    }
示例#22
0
		
		jQuery('.pluginbuddy_pop').click(function(e) {
			showpopup('#'+jQuery(this).attr('href'),'',e);
			return false;
		});
	});
</script>




<?php 
pb_backupbuddy::$ui->title(__('BackupBuddy Schedules', 'it-l10n-backupbuddy'));
pb_backupbuddy::disalert('schedule_limit_reminder', '<span class="pb_label">Tip</span> ' . __('Keep old backups from piling up by configuring "Local Archive Storage Limits" on the Settings page.', 'it-l10n-backupbuddy'));
if (count($schedules) > 0 && pb_backupbuddy::_GET('edit') == '') {
    pb_backupbuddy::$ui->list_table($schedules, array('action' => pb_backupbuddy::page_url(), 'columns' => array(__('Title', 'it-l10n-backupbuddy'), __('Profile', 'it-l10n-backupbuddy'), __('Interval', 'it-l10n-backupbuddy'), __('Destinations', 'it-l10n-backupbuddy'), __('Run Time', 'it-l10n-backupbuddy') . pb_backupbuddy::tip(__('First run indicates the first time thie schedule ran or will run.  Last run time is the last time that this scheduled backup started. This does not imply that the backup completed, only that it began at this time. The last run time is reset if the schedule is edited. Next run indicates when it is next scheduled to run. If there is no server activity during this time the schedule will be delayed.', 'it-l10n-backupbuddy'), '', false), __('Status', 'it-l10n-backupbuddy')), 'hover_actions' => array('edit' => 'Edit Schedule', 'run' => 'Run Now'), 'bulk_actions' => array('delete_schedule' => 'Delete'), 'css' => 'width: 100%;'));
    echo '<br>';
}
if (pb_backupbuddy::_GET('edit') == '') {
    echo '<h3>' . __('Add New Schedule', 'it-l10n-backupbuddy') . '</h3>';
} else {
    echo '<h3>' . __('Edit Schedule', 'it-l10n-backupbuddy') . '</h3>';
}
$schedule_form->display_settings('+ ' . $mode_title);
if (pb_backupbuddy::_GET('edit') != '') {
    echo '<br><br><a href="' . pb_backupbuddy::page_url() . '&tab=1#database_replace" class="button secondary-button">&larr; ' . __('back', 'it-l10n-backupbuddy') . '</a>';
}
echo '<br><br>';
?>

示例#23
0
文件: ajax.php 项目: brettex/pspark
    public function site_size_listing()
    {
        $exclusions = pb_backupbuddy_core::get_directory_exclusions();
        $result = pb_backupbuddy::$filesystem->dir_size_map(ABSPATH, ABSPATH, $exclusions, $dir_array);
        $total_size = pb_backupbuddy::$options['stats']['site_size'] = $result[0];
        $total_size_excluded = pb_backupbuddy::$options['stats']['site_size_excluded'] = $result[1];
        pb_backupbuddy::$options['stats']['site_size_updated'] = time();
        pb_backupbuddy::save();
        arsort($dir_array);
        ?>
		<table class="widefat">
			<thead>
				<tr class="thead">
					<?php 
        echo '<th>', __('Directory', 'it-l10n-backupbuddy'), '</th>', '<th>', __('Size with Children', 'it-l10n-backupbuddy'), '</th>', '<th>', __('Size with Exclusions', 'it-l10n-backupbuddy'), '</th>';
        ?>
				</tr>
			</thead>
			<tfoot>
				<tr class="thead">
					<?php 
        echo '<th>', __('Directory', 'it-l10n-backupbuddy'), '</th>', '<th>', __('Size with Children', 'it-l10n-backupbuddy'), '</th>', '<th>', __('Size with Exclusions', 'it-l10n-backupbuddy'), '</th>';
        ?>
				</tr>
			</tfoot>
			<tbody>
		<?php 
        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>';
        $item_count = 0;
        foreach ($dir_array as $id => $item) {
            // Each $item is in format array( TOTAL_SIZE, TOTAL_SIZE_TAKING_EXCLUSIONS_INTO_ACCOUNT );
            $item_count++;
            if ($item_count > 100) {
                flush();
                $item_count = 0;
            }
            if ($item[1] === false) {
                $excluded_size = '<i>Excluded</i>';
                echo '<tr style="background: #F9B6B6;">';
            } else {
                $excluded_size = pb_backupbuddy::$format->file_size($item[1]);
                echo '<tr>';
            }
            echo '<td>' . $id . '</td><td>' . pb_backupbuddy::$format->file_size($item[0]) . '</td><td>' . $excluded_size . '</td></tr>';
        }
        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>';
        echo '</tbody>';
        echo '</table>';
        echo '<br>';
        echo '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;">';
        die;
    }
示例#24
0
		<tr>
			<td><label for="archive_limit"><?php 
_e('Archive Limit', 'it-l10n-backupbuddy');
pb_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'));
echo ' ';
?>
</label></td>
			<td><input type="text" name="#archive_limit" id="archive_limit" size="45" maxlength="6" value="<?php 
echo $options['archive_limit'];
?>
" /></td>
		</tr>
		<tr>
			<td valign="top"><label><?php 
_e('Use FTPs Encryption', 'it-l10n-backupbuddy');
pb_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'));
?>
</label></td>
			<td>
				<input type="hidden" name="#ftps" value="0" />
				<input type="checkbox" name="#ftps" id="ftps" value="1" <?php 
if ($options['ftps'] == '1') {
    echo 'checked';
}
?>
 /> <label for="high_security"><?php 
_e('Enable high security mode', 'it-l10n-backupbuddy');
?>
</label>
			</td>
		</tr>
示例#25
0
文件: html_3.php 项目: brettex/pspark
				
				<label>
					New database username
					<?php 
pb_backupbuddy::tip('[Ex: bob] The username you want to add to grant access to this database you want to create. Note: cPanel automatically prefixes database usernames with the cPanel account username and an underscore. ex if your cPanel username is "buddy": buddy_bob', '', true);
?>
				</label>
				<span style="text-align: right; width: 300px; display: inline-block;">
					<span class="cpanel_user_mirror"></span><input type="text" name="cpanel_dbuser" id="cpanel_dbuser" style="width: 175px;" maxlength="7">
				</span>
				<br>
				
				<label>
					New database user password
					<?php 
pb_backupbuddy::tip('The password you would like to assign to the database user created.', '', true);
?>
				</label>
				<span style="text-align: right; width: 300px; display: inline-block;">
					<input type="text" name="cpanel_dbpass" id="cpanel_dbpass" style="width: 175px;" value="<?php 
echo substr(md5(microtime()), rand(0, 13), 16);
?>
">
				</span>
				<br>
				
				<br>
				<center>
					<input type="submit" name="submit" value="Create Database" class="button button-primary cpanel_createdb_create">
					<span style="display: inline-block; width: 20px;">
						<span class="cpanel_createdb_loading" style="display: none; margin-left: 10px;"><img src="<?php 
示例#26
0
			<td><label for="container"><?php 
_e('Container', 'it-l10n-backupbuddy');
pb_backupbuddy::tip(__('[Example: wordpress_backups] - This container will NOT be created for you automatically if it does not already exist. Please create it first.', 'it-l10n-backupbuddy'));
echo ' ';
pb_backupbuddy::video('lfTs_GtAp1I#26', __('Create a container from the Rackspace Cloudfiles panel', 'it-l10n-backupbuddy'));
?>
</label></td>
			<td><input type="text" name="#container" id="container" size="45" maxlength="45" value="<?php 
echo $options['container'];
?>
" /></td>
		</tr>
		<tr>
			<td><label for="archive_limit"><?php 
_e('Archive Limit', 'it-l10n-backupbuddy');
pb_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'));
echo ' ';
?>
</label></td>
			<td><input type="text" name="#archive_limit" id="archive_limit" size="45" maxlength="6" value="<?php 
echo $options['archive_limit'];
?>
" /></td>
		</tr>
		<tr>
			<td><label for="server"><?php 
_e('Cloud Network', 'it-l10n-backupbuddy');
?>
</label></td>
			<td>
				<select name="#server">
示例#27
0
		This will capture everything from the Database Only Backup and also all files in the WordPress directory and subdirectories.
		This includes files such as media, plugins, themes, images, and any other files found.
		
		<br><br>
		<span class="pb_label">Tip</span> Exclude unneeded directories & files from your Full Backup by setting up exclusions on the <a href="?page=pb_backupbuddy_settings">Settings</a> page.
		
		
		<br><br><br><br>
		<?php 
_e('Local backup storage directory', 'it-l10n-backupbuddy');
?>
: <span style="background-color: #EEEEEE; padding: 4px;"><i><?php 
echo str_replace('\\', '/', pb_backupbuddy::$options['backup_directory']);
?>
</i></span> <?php 
pb_backupbuddy::tip(' ' . __('This is the local directory that backups are stored in. Backup files include random characters in their name for increased security. BackupBuddy must be able to create this directory & write to it.', 'it-l10n-backupbuddy'));
?>
		<br>
		
		
		<?php 
pb_backupbuddy::$ui->end_tab();
pb_backupbuddy::$ui->start_tab('restore_migrate');
echo '<br>';
if (is_network_admin()) {
    $migrate_page_url = network_admin_url('admin.php');
} else {
    $migrate_page_url = admin_url('admin.php');
}
$migrate_page_url .= '?page=pb_backupbuddy_migrate_restore';
?>
示例#28
0
		<tr>
			<td><label for="archive_limit"><?php 
_e('Archive Limit', 'it-l10n-backupbuddy');
pb_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'));
echo ' ';
?>
</label></td>
			<td><input type="text" name="#archive_limit" id="archive_limit" size="45" maxlength="6" value="<?php 
echo $options['archive_limit'];
?>
" /></td>
		</tr>
		<tr>
			<td valign="top"><label><?php 
_e('Use SSL Encryption', 'it-l10n-backupbuddy');
pb_backupbuddy::tip(__('[Default: enabled] - When enabled, all transfers will be encrypted with SSL encryption. Please note that encryption introduces overhead and may slow down the transfer. If Amazon S3 sends are failing try disabling this feature to speed up the process.  Note that 32-bit servers cannot encrypt transfers of 2GB or larger with SSL, causing large file transfers to fail.', 'it-l10n-backupbuddy'));
?>
</label></td>
			<td>
				<input type="hidden" name="#ssl" value="0" />
				<input type="checkbox" name="#ssl" id="ssl" value="1" <?php 
if ($options['ssl'] == '1') {
    echo 'checked';
}
?>
 /> <label for="high_security"><?php 
_e('Enable high security mode', 'it-l10n-backupbuddy');
?>
</label>
			</td>
		</tr>
示例#29
0
		jQuery(document).on( 'click', '.pb_backupbuddy_filetree_exclude', function(){
			text = jQuery(this).parent().parent().find( 'a' ).attr( 'rel' );
			if ( ( text == 'wp-config.php' ) || ( text == '/wp-content/' ) || ( text == '/wp-content/uploads/' ) || ( text == '<?php 
echo pb_backupbuddy::$options['backup_directory'];
?>
' ) || ( text == '/wp-content/uploads/backupbuddy_temp/' ) ) {
				alert( '<?php 
_e('You cannot exclude /wp-content/, /wp-content/uploads/, or BackupBuddy directories.  However, you may exclude subdirectories within these. BackupBuddy directories such as backupbuddy_backups are automatically excluded and cannot be added to exclusion list.', 'it-l10n-backupbuddy');
?>
' );
			} else {
				jQuery('#pb_backupbuddy_excludes').val( text + "\n" + jQuery('#pb_backupbuddy_excludes').val() );
			}
			return false;
		});
	});
</script>



<?php 
if ($profile_array['type'] == 'defaults') {
    $before_text = __('Excluded files & directories (relative to WordPress root)', 'it-l10n-backupbuddy');
} else {
    $before_text = __('Excluded files & directories for this profile (Global defaults do not apply; relative to WordPress root)', 'it-l10n-backupbuddy');
}
if ($profile_array['type'] != 'defaults') {
    $settings_form->add_setting(array('type' => 'checkbox', 'name' => 'profiles#' . $profile_id . '#profile_globalexcludes', 'options' => array('unchecked' => '0', 'checked' => '1'), 'title' => 'Use global defaults for files to backup?', 'after' => ' Use global defaults', 'css' => ''));
}
$settings_form->add_setting(array('type' => 'textarea', 'name' => 'profiles#' . $profile_id . '#excludes', 'title' => 'Click directories to navigate or click <img src="' . pb_backupbuddy::plugin_url() . '/images/redminus.png" style="vertical-align: -3px;"> to exclude.' . ' ' . pb_backupbuddy::tip(__('Click on a directory name to navigate directories. Click the red minus sign to the right of a directory to place it in the exclusion list. /wp-content/, /wp-content/uploads/, and BackupBuddy backup & temporary directories cannot be excluded. BackupBuddy directories are automatically excluded.', 'it-l10n-backupbuddy'), '', false) . '<br><div id="exlude_dirs" class="jQueryOuterTree"></div>', 'rules' => 'string[0-9000]', 'css' => 'width: 100%; height: 135px;', 'before' => $before_text . pb_backupbuddy::tip(__('List paths relative to the WordPress installation directory to be excluded from backups.  You may use the directory selector to the left to easily exclude directories by ctrl+clicking them.  Paths are relative to root, for example: /wp-content/uploads/junk/', 'it-l10n-backupbuddy'), '', false) . '<br>', 'after' => '<span class="description">' . __('One file or directory exclusion per line. This may be manually edited.', 'it-l10n-backupbuddy') . '</span>'));
示例#30
0

if ( count( $schedules ) == 0 ) {
	//echo '<h4>' . __( 'No schedules have been created yet.', 'it-l10n-backupbuddy' ) . '</h4>';
} else {
	pb_backupbuddy::$ui->list_table(
		$schedules,
		array(
			'action'		=>		pb_backupbuddy::page_url(),
			'columns'		=>		array(
										__( 'Title', 'it-l10n-backupbuddy' ),
										__( 'Type', 'it-l10n-backupbuddy' ),
										__( 'Interval', 'it-l10n-backupbuddy' ),
										__( 'Destinations', 'it-l10n-backupbuddy' ),
										__( 'First Run', 'it-l10n-backupbuddy' ),
										__( 'Last Run', 'it-l10n-backupbuddy' ) . pb_backupbuddy::tip( __( 'Last run time is the last time that this scheduled backup started. This does not imply that the backup completed, only that it began at this time. The last run time is reset if the schedule is edited.', 'it-l10n-backupbuddy' ), '', false ),
									),
			'hover_actions'	=>		array( 'edit' => 'Edit Schedule' ),
			'bulk_actions'	=>		array( 'delete_schedule' => 'Delete' ),
			'css'			=>		'width: 100%;',
		)
	);
}
echo '<br>';


?>