Пример #1
0
            $module->cleanup();
        }
        // Once we finish with posts we always recount and update lastpost info, etc.
        if ($import_session['module'] == "import_posts") {
            $debug->log->trace2("Running import_posts counters cleanup.");
            $module->counters_cleanup();
        }
        // Check to see if our module is in the 'resume modules' array still and remove it if so.
        $key = array_search($import_session['module'], $import_session['resume_module']);
        if (isset($key)) {
            unset($import_session['resume_module'][$key]);
        }
        // Add our module to the completed list and clear it from the current running module field.
        $import_session['completed'][] = $import_session['module'];
        $import_session['module'] = '';
        update_import_session();
        // Now that all of that is taken care of, refresh the page to continue on to whatever needs to be done next.
        if (!headers_sent()) {
            header("Location: index.php");
        } else {
            echo "<meta http-equiv=\"refresh\" content=\"0; url=index.php\">";
        }
        exit;
    }
} else {
    $debug->log->event("Show the module selection list page.");
    // Set the start date for the end report.
    if (!$import_session['start_date']) {
        $import_session['start_date'] = time();
    }
    // Get the converter up.
Пример #2
0
    /**
     * Print the footer of the page
     *
     * @param string The next 'action'
     * @param string The name of the next action
     * @param int Do session update? 1/0
     */
    function print_footer($next_action = "", $name = "", $do_session = 1, $override_form = false, $next = "Next", $button_extra = "", $extra_class = "")
    {
        global $import_session, $conf_global_not_found, $mybb;
        if ($this->opened_form && $override_form != true) {
            if ($mybb->input['autorefresh'] == "yes" || $mybb->input['autorefresh'] == "no") {
                $import_session['autorefresh'] = $mybb->input['autorefresh'];
            }
            if (IN_MODULE == 1) {
                echo "\n\t</form>\n";
                echo "\n\t<form method=\"post\" action=\"" . $this->script . "\">\n";
            }
            if ($import_session['autorefresh'] == "yes" && !$conf_global_not_found) {
                echo "\n\t\t<meta http-equiv=\"Refresh\" content=\"2; url=" . $this->script . "\" />";
                echo "\n\t\t<div id=\"next_button\"><input type=\"submit\" class=\"submit_button {$extra_class}\" value=\"Redirecting... &raquo;\" alt=\"Click to continue, if you do not wish to wait.\" {$button_extra} /></div>";
            } else {
                echo "\n\t\t<div id=\"next_button\"><input type=\"submit\" class=\"submit_button {$extra_class}\" value=\"{$next} &raquo;\" {$button_extra} /></div>";
            }
            echo "\n\t</form>\n";
            // Only if we're in a module
            if ($import_session['module'] && (!defined('BACK_BUTTON') || BACK_BUTTON != false)) {
                echo "\n\t<form method=\"post\" action=\"" . $this->script . "\">\n";
                if ($import_session['module'] == 'db_configuration') {
                    echo "\n\t\t<input type=\"hidden\" name=\"action\" value=\"module_list\" />\n";
                    echo "\n\t\t<div id=\"exit_config_button\"><input type=\"submit\" class=\"submit_button {$extra_class}\" value=\"&laquo; Exit Configuration\" {$button_extra} /></div><br style=\"clear: both;\" />\n";
                } else {
                    echo "\n\t\t<input type=\"hidden\" name=\"action\" value=\"module_list\" />\n";
                    echo "\n\t\t<div id=\"back_button\"><input type=\"submit\" class=\"submit_button\" value=\"&laquo; Back\" {$button_extra} /></div><br style=\"clear: both;\" />\n";
                }
                echo "\n\t</form>\n";
            } else {
                echo "\n <br style=\"clear: both;\" />";
            }
        } else {
            $formend = "";
        }
        echo <<<END
\t\t</div>
\t\t<div id="footer">
END;
        $copyyear = date('Y');
        echo <<<END
\t\t\t<div id="copyright">
\t\t\t\t<a href="http://mybb.com/" target="_blank">MyBB</a> &copy; 2002-{$copyyear} <a href="http://mybb.com/" target="_blank">MyBB Group</a>
\t\t\t</div>
\t\t</div>
\t\t</div>
\t\t</div>
</body>
</html>
END;
        if ($do_session == 1) {
            update_import_session();
        }
        exit;
    }