/**
 * Executes all necessary functions to make the exportation happen.
 */
function export_main()
{
    global $bbdb;
    export_init();
    $bbxp = new BBXP_bbPress();
    $bbxp->db = $bbdb;
    $filename = 'bbpress' . date('Y-m-d') . '.xml';
    $bbxp->write_header($filename);
    $bbxp->write_users();
    $bbxp->write_forums();
    $bbxp->write_topics();
    $bbxp->write_footer();
    die;
}
/**
 * Executes all necessary functions to make the exportation happen.
 */
function export_main()
{
    export_init();
    $user = $_POST['user'];
    $password = $_POST['password'];
    $database = $_POST['database'];
    $host = $_POST['host'];
    $prefix = $_POST['prefix'];
    $bbxp = new BBXP_Vanilla();
    $bbxp->db = new BPDB(array('name' => $database, 'user' => $user, 'password' => $password, 'host' => $host));
    $bbxp->initialize_db($prefix);
    $filename = 'phpbb' . date('Y-m-d') . '.xml';
    $bbxp->write_header($filename);
    $bbxp->write_users();
    $bbxp->write_forums();
    $bbxp->write_topics();
    $bbxp->write_footer();
    die;
}