Esempio n. 1
0
<script type="text/javascript" src="importbuddy/js/jquery.leanModal.min.js"></script>
<script type="text/javascript">
	jQuery(document).ready(function() {
		
		jQuery('.expander').simpleexpand();
		
		jQuery('.leanModal').leanModal(
			{ top : 20, overlay : 0.4, closeButton: ".modal_close" }
		);
	});
</script>


<?php 
echo '<div class="wrap">';
rename_htaccess_temp_back();
// Rename .htaccess.bb_temp back to .htaccess.
echo pb_backupbuddy::$classes['import']->status_box('Migrating database content with ImportBuddy v' . pb_backupbuddy::$options['bb_version'] . '... Powered by BackupBuddy.');
echo '<div id="pb_importbuddy_working"><img src="' . pb_backupbuddy::plugin_url() . '/images/loading_large.gif" title="Working... Please wait as this may take a moment..."></div>';
pb_backupbuddy::flush();
$result = migrate_database();
verify_database();
// Remove any temporary .maintenance file created by ImportBuddy.
scrub_maintenance_file();
// Remove any temporary index.htm file created by ImportBuddy.
scrub_index_file();
echo '<script type="text/javascript">jQuery("#pb_importbuddy_working").hide();</script>';
if (true === $result) {
    $wpconfig_result = migrate_wp_config();
    if ($wpconfig_result !== true) {
        pb_backupbuddy::alert('Error: Unable to update wp-config.php file. Verify write permissions for the wp-config.php file then refresh this page. You may manually update your wp-config.php file by changing it to the following:<textarea readonly="readonly" style="width: 80%;">' . $wpconfig_result . '</textarea>');
Esempio n. 2
0
<?php
$page_title = 'Database Migration (Updating URLs, paths, etc)';
require_once( '_header.php' );
echo '<div class="wrap">';


rename_htaccess_temp_back(); // Rename .htaccess.bb_temp back to .htaccess.


echo pb_backupbuddy::$classes['import']->status_box( 'Migrating database content with ImportBuddy ' . pb_backupbuddy::settings( 'version' ) . ' from BackupBuddy v' . pb_backupbuddy::$options['bb_version'] . '...' );
echo '<div id="pb_importbuddy_working"><img src="' . pb_backupbuddy::plugin_url() . '/images/loading_large.gif" title="Working... Please wait as this may take a moment..."></div>';

$result = migrate_database();
verify_database();

echo '<script type="text/javascript">jQuery("#pb_importbuddy_working").hide();</script>';

if ( true === $result ) {
	$wpconfig_result = migrate_wp_config();
	if ( $wpconfig_result !== true ) {
		pb_backupbuddy::alert( 'Error: Unable to update wp-config.php file. Verify write permissions for the wp-config.php file then refresh this page. You may manually update your wp-config.php file by changing it to the following:<textarea readonly="readonly" style="width: 80%;">' . $wpconfig_result . '</textarea>' );
	}
	
	pb_backupbuddy::status( 'message', 'Import complete!' );
	echo '<h3>Import complete for site: <a href="' . pb_backupbuddy::$options['home'] . '" target="_new">' . pb_backupbuddy::$options['home'] . '</a></h3>';
	echo '<img src="' . pb_backupbuddy::plugin_url() . '/images/bullet_error.png" style="float: left;"><div style="margin-left: 20px;">Verify site functionality then delete the backup ZIP file and importbuddy.php from your site root (the next step will attempt to do this for you). Leaving these files is a security risk. Leaving the zip file and then subsequently running a BackupBuddy backup will result in excessively large backups as this zip file will be included.</div>';
	
	echo '<form action="?step=6" method=post>';
	echo '<input type="hidden" name="options" value="' . htmlspecialchars( serialize( pb_backupbuddy::$options ) ) . '" />';
	?>