<% if ( potentialProblems.length > 0 ) { %>
	<div class="main_box_head warning_alert_box">
		<span class="error_warning_title">One or more potential problems may have been found:</span>
		<ul class="backupbuddy_warning_list">
			<% jQuery.each( potentialProblems, function( key, potentialProblem ){ %>
			<li><%=potentialProblem%></li>
			<% }); %>
		</ul>
	</div><br>
<% } %>

<% if ( '1' == blogPublicStatus ) {
	sourceSitePublicStatusText = 'Public - Do not discourage search engines from indexing this site';
} else if ( '0' == blogPublicStatus ) {
	sourceSitePublicStatusText = 'Private - Discourage search engines from indexing this site';
} else {
	sourceSitePublicStatusText = 'Current status not detected';
}
%>




<h3>Verify site before proceeding to cleanup:</h3>
<a href="<%=homeurl%>" target="_blank"><%=homeurl%></a>
<br><br>


<script>
jQuery( '.expander' ).click( function(){
	jQuery(this).next('.content').slideToggle();
});
</script>

<h3>Common issues & tips:</h3>
<div class="expander-box">
	<a class="expander" href="javascript:void(0)">Clicking on a post results in a 404 Not Found</a>
	<div class="content">
		Typically caused by a problem with your .htaccess file, there is a simple fix: Log into your wp-admin, navigate to Settings: Permalinks in the WordPress menu and click the "Save" button to update permalink settings to your .htaccess file. This typically resolves this problem.
	</div>
</div>
<div class="expander-box">
	<a class="expander" href="javascript:void(0)">Logging in redirects back to the old site</a>
	<div class="content">
		This is usually caused by entering the source site URL as the destination URL on Step 3.  Re-restoring using the correct URL should fix this problem.
	</div>
</div>
<div class="expander-box">
	<a class="expander" href="javascript:void(0)">Source site has changed to the destination URL</a>
	<div class="content">
		This is caused if you restored over your source site database by entering the source site database settings on Step 3. This means that your new site AND your old site are now using the same database but the database has been migrated to work with the new URL. You may re-restore both the source and destination using correct settings or use the mass database replacement tool.  You may correct the modified URL on the source site by using the Server Tools page's Mass Text Replace tool within the Database tab.
	</div>
</div>
<div class="expander-box">
	<a class="expander" href="javascript:void(0)">File permissions have changed</a>
	<div class="content">
		Custom file permissions may be server-specific and may not stay the same as the source site. If you made any custom file permission changes (either manually or via a plugin such as a Security plugin) you may need to manually re-apply them.  Not all servers will function properly with the same permissions.
	</div>
</div>
<br><br>



<form onSubmit="jQuery('#cleanupSettings-restoreData').val( window.btoa( encodeURIComponent( JSON.stringify( window.restoreData ) ) ) );" action="?ajax=6" target="miniFrame" method="post"><!-- this form is only submitted after running through javascript. submitting actual form instead of using jQuery post so we can target iframe. -->
	<input type="hidden" name="restoreData" id="cleanupSettings-restoreData" value="">
	
	
	
	<div class="main_box_foot">
		
		<h3>Site Search Engine Visibility</h3>
		<div style="display: inline-block; text-align: left;">
			<label for="set_blog_public-keep" style="font-size: 12px;"><input type="radio" name="set_blog_public" id="set_blog_public-keep" value="" checked="checked">No change (default): <%=sourceSitePublicStatusText%></label><br>
			<label for="set_blog_public-public" style="font-size: 12px;"><input type="radio" name="set_blog_public" id="set_blog_public-public" value="1">Public - Do not discourage search engines from indexing this site</label><br>
			<label for="set_blog_public-private" style="font-size: 12px;"><input type="radio" name="set_blog_public" id="set_blog_public-private" value="0">Private - Discourage search engines from indexing this site</label><br>
		</div>
			
		<br><br>
		
		<h3>ImportBuddy Cleanup:</h3>
		<table style="margin-left: auto; margin-right: auto; text-align: left;"><tr><td>
			<label for="delete_backup" style="width: auto; font-size: 12px;"><input type="checkbox" name="delete_backup" id="delete_backup" value="1" checked> Delete backup zip archive</label>
			<br>
			<label for="delete_temp" style="width: auto; font-size: 12px;"><input type="checkbox" name="delete_temp" id="delete_temp" value="1" checked> Delete temporary import files</label>
		</td><td>
			<label for="delete_importbuddy" style="width: auto; font-size: 12px;"><input type="checkbox" name="delete_importbuddy" id="delete_importbuddy" value="1" checked> Delete ImportBuddy tool files</label>
			<br>
			<label for="delete_importbuddy_directory" style="width: auto; font-size: 12px;"><input type="checkbox" name="delete_importbuddy_directory" id="delete_importbuddy_directory" value="1" checked> Delete ImportBuddy directory</label>
			<br>
			<label for="delete_importbuddylog" style="width: auto; font-size: 12px;"><input type="checkbox" name="delete_importbuddylog" id="delete_importbuddylog" value="1" checked> Delete importbuddy.txt log file</label>
		</td></tr></table>
		
		<br>
		<center>
			<input type="submit" name="nextStep" value="Finish Cleanup" class="it-button pb_database_next_test">
		</center>
	
	</div>
</form>