<form action="?step=1" method="post">
<table align="center" cellpadding="0" cellspacing="0" width="471">
<tr>
<td style="border:1px solid black">


<table align="center" cellpadding="7" cellspacing="0" width="470" style="background-color:#ebebeb;border-none;border-left:1px solid white;border-right:1px solid gray;border-bottom:1px solid gray">
<tr>
	<td colspan="3" style="font-weight:bold;padding-bottom:5px;padding-top:5px;background-color:gold;color:black;text-align:right;border-bottom:1px solid gray;border-top:1px solid yellow"><?$lang->display("STEP 1/2: DATABASE SETUP");?></td>
</tr>
<tr>
	<td height="150" valign="top" style="padding:15px;">
<?if ($msg){?><div style="color:red;background-color:white;border:1px solid gray;border-right:1px solid white;border-bottom:1px solid white;padding:4px;margin-bottom:4px;"><?echo $msg;?></div><?}?>
<table>
<tr>
	<td><?$lang->display("MySQL Server");?></td>
	<td><input type="text" name="host" value="<?if ($_POST['host']){echo $str->fromHTML($_POST['host']);}else{echo $settings->config['server'];}?>"></td>
	<td><?$lang->display("Example: localhost");?></td>
</tr>
<tr>
	<td><?$lang->display("MySQL Database name");?></td>
	<td><input type="text" name="dbname" value="<?if ($_POST['dbname']){echo $str->fromHTML($_POST['dbname']);}else{echo $settings->config['dbname'];}?>"></td>
	<td><?$lang->display("Example: database");?></td>
</tr>
<tr>
	<td><?$lang->display("MySQL Username");?></td>
	<td><input type="text" name="user" value="<?if ($_POST['user']){echo $str->fromHTML($_POST['user']);}else{echo $settings->config['dbuser'];}?>"></td>
	<td><?$lang->display("Example: root");?></td>
</tr>
<tr>
	<td><?$lang->display("MySQL Password");?></td>
	<td><input type="password" name="pass" value="<?if ($_POST['pass']){echo $str->fromHTML($_POST['pass']);}else{echo $settings->config['dbpass'];}?>"></td>
	<td>&nbsp;</td>
</tr>
</table>
<br>
<div style="border:1px solid silver;padding:5px;background-color:whitesmoke;">
<strong><?$lang->display("Notes");?></strong>:
<br><br>
<li><?$lang->display("The database will be automatically created if it doesn't exist.");?></li>
<li><?$lang->display("The tables will be prefixed with \"dm_\".");?> <span class="comment"><?$lang->display("(Useful to know if your applications share the same database.)");?></span></li>
<?/*?>
<input type="radio" name="db_creation_method" value="auto" id="auto" checked> <label for="auto"><?$lang->display("Build the database tables automatically.");?></label>
<br><br>
<input type="radio" name="db_creation_method" value="manual" id="import"> <label for="import"><?$lang->display("Import the SQL file manualy");?></label>: <a href="?download_sql">DatabaseSetup.sql</a>
<br>
<span class="comment"><?$lang->display("(Check this option if you already built the tables.)");?></span>
<?*/?>
<input type="hidden" name="db_creation_method" value="auto">
</div>
<br>
	</td>
</tr>
</table>

</td>
</tr>
</table>

<br>
<table align="center" cellpadding="0" cellspacing="0" width="470">
<tr>
	<td style="height:40px;text-align:left">
		<input type="button" value="&laquo; <?$lang->display("Back");?>" onclick="document.location.href='?step=requirement_review'" style="cursor:hand;cursor:pointer;">
	</td>
	<td style="height:40px;text-align:right">
	<input type="submit" value="<?$lang->display("Next");?> &raquo;" name="submit" style="cursor:hand;cursor:pointer;">
	</td>
</tr>
</table>
</form>
