// lets zap the nav cache if we are moving pages.
if ($type_name == 'minisite_page') {
    $job = new MoveEntitiesNavCacheJob();
    $job->config('site_ids', $site_ids);
    $job_stack->add_job($job);
}
$result = $job_stack->run();
echo '<!DOCTYPE html>';
echo '<html><head>';
echo '<title>Reason: Move Entities Among Sites: Done</title>';
echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
if (defined('UNIVERSAL_CSS_PATH') && UNIVERSAL_CSS_PATH != '') {
    echo '<link rel="stylesheet" type="text/css" href="' . UNIVERSAL_CSS_PATH . '" />' . "\n";
}
echo '<link rel="stylesheet" type="text/css" href="' . REASON_HTTP_BASE_PATH . 'css/reason_admin/move_entities.css" />' . "\n";
echo '</head><body>';
echo '<h1>Move Entities Among Sites</h1>';
if ($result) {
    echo '<p>Successfully moved entities! Now, you may ' . '<a href="' . securest_available_protocol() . '://' . REASON_HOST . REASON_HTTP_BASE_PATH . 'scripts/move/move_entities_among_sites.php">' . 'move other entities among sites</a> ' . 'or <a href="' . securest_available_protocol() . '://' . REASON_WEB_ADMIN_PATH . '">return to Reason admin</a>.</p>';
    echo '<p><strong>Please note:</strong> This script has done the particulars outlined in the report. There may be more you have to do yourself. For instance,
	        if you moved page(s), you\'ll need to attach them to the new page tree before they will show up.</p>';
} else {
    echo '<p>Your move entities job was not completed successfully. Please look carefully at the report to see what you may need to change.</p>';
}
if (isset($_SESSION['move_entities_among_sites__http_referer'])) {
    unset($_SESSION['move_entities_among_sites__http_referer']);
}
echo '<h3>Full Report</h3>';
$report = $job_stack->get_report();
echo $report;
echo '</body></html>';