/**
 * Displays the admin import page.
 *
 * Gives a simple explanation of how the import process works and gives
 * users a form to choose their options and provide their file.
 */
function import_page()
{
    ?>

	<h2><?php 
    _e('Import');
    ?>
</h2>
	<?php 
    if ('true' == $_POST['importing']) {
        import_main();
    } else {
        ?>
	<p><?php 
        _e('bbPress can import forums data from a BBXF file you provide via the form below.  Such a file can be generated by another bbPress installation or another forum software with a compatible export feature.');
        ?>
</p>
	<p><?php 
        _e('This file should contain data about users, forums, topics, and posts.  You can select which types of data to import below.');
        ?>
</p>
	<form enctype="multipart/form-data" action="" method="post">
		<fieldset>
			<legend>Import File &raquo;</legend>
			<input type="file" name="import_file" />
		</fieldset>
		<fieldset>
			<legend>Options &raquo;</legend>
			<input type="checkbox" name="users" value="true" checked /> Import user data.<br />
			<input type="checkbox" name="content" value="true" checked /> Import forum, topic, and post data.<br />
			<input type="checkbox" name="preserve" value="true" /> Preserve IDs.<br />
			<input type="checkbox" name="current" value="true" checked /> Do not overwrite current user.<br />
			<input type="checkbox" name="admins" value="true" checked /> Do not overwrite keymasters.
		</fieldset>
		<!-- Form options. -->
		<p class="submit">
			<input type="submit" name="submit" value="<?php 
        _e('Import Forums Data');
        ?>
" />
			<input type="hidden" name="importing" value="true" />
		</p>
	</form>

<?php 
    }
}
/**
 * Displays the admin import page.
 *
 * Gives a simple explanation of how the import process works and gives
 * users a form to choose their options and provide their file.
 */
function import_page()
{
    ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 STRICT//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>phpBB3 BBXF Importer</title>
	</head>
	<body>

	<h2>Import</h2>
	<?php 
    if ('true' == $_POST['importing']) {
        import_main();
    } else {
        ?>
	<p>phpBB can import forums data from a BBXF file you provide via the form below.  Such a file can be generated by another phpBB installation or another forum software with a compatible export feature.</p>
	<p>This file should contain data about users, forums, topics, and posts.  You can select which types of data to import below.</p>
	<form enctype="multipart/form-data" action="" method="post">
		<fieldset>
			<legend>Import File &raquo;</legend>
			<input type="file" name="import_file" />
		</fieldset>
		<fieldset>
			<legend>Options &raquo;</legend>
			<input type="checkbox" name="users" value="true" checked /> Import user data.<br />
			<input type="checkbox" name="content" value="true" checked /> Import forum, topic, and post data.<br />
			<input type="checkbox" name="preserve" value="true" /> Preserve IDs.<br />
			<input type="checkbox" name="current" value="true" checked /> Do not overwrite current user.<br />
			<input type="checkbox" name="admins" value="true" checked /> Do not overwrite keymasters.
		</fieldset>
		<fieldset><legend>MySQL Hostname</legend>
			<input type="text" name="host" />
		</fieldset>
		<fieldset><legend>MySQL Database</legend>
			<input type="text" name="database" />
		</fieldset>
		<fieldset><legend>MySQL Username</legend>
			<input type="text" name="user" />
		</fieldset>
		<fieldset><legend>MySQL Password</legend>
			<input type="password" name="password" />
		</fieldset>
		<fieldset><legend>MySQL Table Prefix</legend>
			<input type="text" name="prefix" />
		</fieldset>
		<!-- Form options. -->
		<p class="submit">
			<input type="submit" name="submit" value="Import Forums Data" />
			<input type="hidden" name="importing" value="true" />
		</p>
	</form>

<?php 
    }
    ?>
	</body>
</html>
<?php 
}