<div class="panel panel-default">
    <div class="panel-body" style="color:#666;">
    	<div class="alert alert-warning" role="alert">请确保通过所有检测项，否则可能导致安装失败！</div>
    	<h3>环境检查</h3>
		<table class="table table-bordered">
			<tr>
				<th>项目</th>
				<th>检测结果</th>
				<th>所需配置</th>
			</tr>
			<?php
				foreach ($system_info['requirements'] as $key => $value) {
			?>
			<tr class="<?php echo $value['condition'] ? 'success' : ($value['mandatory'] ? 'danger' : 'warning') ?>">
				<td><?= $value['name']; ?></td>
				<td><?php echo $value['condition'] ? 'Passed' : ($value['mandatory'] ? 'Failed' : 'Warning') ?></td>
				<td><?php echo $value['memo'] ?></td>
			</tr>
			<?php }?>
		</table>
		<h3>目录权限检测</h3>
		<table class="table table-bordered">
			<tr>
				<th>目录文件</th>
				<th>读取权限</th>
				<th>写入权限</th>
			</tr>
			<?php
				foreach ($dir_check as $key => $value) {
			?>
			<tr>
				<td><kbd><?= $value['dir']; ?></kbd></td>
				<td class="<?= $value['read_status']; ?>"><?= $value['read']; ?></td>
				<td class="<?= $value['write_status']; ?>"><?= $value['write']; ?></td>
			</tr>
			<?php }?>
		</table>
    </div>
</div>
<div class="row button-wrap">
  <div class="col-md-5"></div>
  <div class="col-md-4">
    <input type="button" class="btn btn-danger" value="上一步" onclick="javascript:location.href='<?php echo Yii::$app->urlManager->createUrl(['site/index']);?>'">
    <input type="button" class="btn btn-primary" value="下一步" onclick="javascript:location.href='<?php echo Yii::$app->urlManager->createUrl(['site/step2']);?>'">
  </div>
  <div class="col-md-3"></div>
</div>
