<div class="usvn_info">
	<h1><?php echo T_($installSteps[$step]); ?></h1>
	<p><?php echo T_('Check everything is all right to install USVN.'); ?></p>
</div>
<table id="system_check">
	<tr>
	  <?php
	  /* DEBUG */
    // foreach ($errors as &$anError)
    //       $anError = 'ko';
	  ?>
		<?php
			$ok = '<img src="./medias/usvn/images/accepted_16.png" />';
			$ko = '<img src="./medias/usvn/images/cancel_16.png" />';
			$okstr = T_('%s is installed.');
			$kostr = T_('%s has not been detected.');
		?>
		<td><?= ($errors['safe_mode'] == 'ko' ? $ko : $ok) ?></td>
		<td><?= T_($errors['safe_mode'] == 'ko' ? 'PHP safe mode should be disabled.' : 'PHP safe mode is disabled.') ?></td>
	</tr>
	<tr>
		<td><?= ($errors['svn'] == 'ko' ? $ko : $ok) ?></td>
		<td><?= sprintf(($errors['svn'] == 'ko' ? $kostr : $okstr), 'Subversion') ?></td>
	</tr>
	<tr>
		<td><?= ($errors['mod_rewrite'] == 'ko' ? $ko : $ok) ?></td>
		<td><?= sprintf(($errors['mod_rewrite'] == 'ko' ? $kostr : $okstr), 'mod_rewrite') ?></td>
	</tr>
	<tr>
		<td><?= ($errors['mod_dav_svn'] == 'ko' ? $ko : $ok) ?></td>
		<td><?= sprintf(($errors['mod_dav_svn'] == 'ko' ? $kostr : $okstr), 'mod_dav_svn') ?></td>
	</tr>
	<tr>
		<td><?= ($errors['mod_authz_svn'] == 'ko' ? $ko : $ok) ?></td>
		<td><?= sprintf(($errors['mod_authz_svn'] == 'ko' ? $kostr : $okstr), 'mod_authz_svn') ?></td>
	</tr>
	<tr>
		<td><?= ($errors['public'] == 'ko' ? $ko : $ok) ?></td>
		<td>
      <? if ($errors['public'] == 'ko'): ?>
      On "public" folder USVN should have:
      <ul>
        <li>temporary write access for install</li>
        <li>read access</li>
      </ul>
      <? else: ?>
      Good rights on "public".
      <? endif ?>
    </td>
	</tr>
	<tr>
		<td><?= ($errors['config'] == 'ko' ? $ko : $ok) ?></td>
		<td>
      <? if ($errors['config'] == 'ko'): ?>
      On "config" folder USVN should have:
      <ul>
        <li>permanent write access</li>
        <li>permanent read access</li>
      </ul>
      <? else: ?>
      Good rights on "config".
      <? endif ?>
    </td>
	</tr>
</table>
<?php
	if (isset($_GET['force']) or !in_array('ko', $errors))
	{
?>
	<br />
	<hr />
	<form action="?step=2" method="post">
		<div>
			<input type="submit" value="<?= T_('Next step') ?>" />
		</div>
	</form>
<?php
}
else
{
?>
	<br />
	<form action="?step=1" method="post">
		<div>
			<input type="submit" value="<?= T_('Refresh') ?>" />
		</div>
	</form>
	<br />
	<hr />
	<form name="forceForm" action="?step=1&force" method="post">
		<div>
			<p>You can force installation but it's problably not a good idea.</p>
			I'm sure: <input type="checkbox" onclick="document.forceForm.ok.disabled = !document.forceForm.forceCheck.checked;" name="forceCheck">
			<br />
			<br />
			<input type="submit" value="<?= T_("Force installation") ?>" name="ok" />
		</div>
	</form>
	<script>
	document.forceForm.ok.disabled = true;
	</script>
<?php
}
?>
