<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

	function yesOrNo($val)
	{
		if ($val)
		{
			return '<span class="text-success">&#10004;</span>';
			return '<label class="label label-success">Yes</label>';
		}
		else
		{
			return '<span class="text-danger">&#10006;</span>';
			return '<label class="label label-danger">No</label>';
		}
	}
?>
<div class="row nm" id="step_requirement">
	<h3>PreRequirements</h3>
	<h4 class="nm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Thank you for choosing OutputBooks. This installer will guide you the installation Process.</h4>
	<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Prerequisites: Before start, checking your server configuration to make sure the necessary components are enabled.</p>
	<div class="requirement_table" style="">
		<table class="ui table nb">
			<tr>
				<td><?php echo $php_version['label']; ?></td>
				<td class="text-right"><?php echo yesOrNo($php_version['value']); ?></td>
			</tr>
			<tr>
				<th colspan="2" style="font-weight:normal;text-align:center;background:#EEE;">
					<span>Required: The following extensions need to be enabled in <span class="label label-primary">php.ini</span></span>
				</th>
			</tr>
			<?php foreach ($extensions as $key=>$val){?>
			<tr>
				<td><?php echo $val['label'];
					if ($val['name'] == 'otime' && !$val['value']) {
						echo ' (You can download it from here <a class="" target="_blank" href="' . $val['url'] . '">' . $val['dislay_file_name'] . '</a>.)';
					}
				?></td>
				<td class="text-right"><?php echo yesOrNo($val['value']); ?></td>
			</tr>
			<?php } ?>
			<tr>
				<th colspan="2" style="font-weight:normal;text-align:center;background:#EEE;">
					<span>Installer requires write permission for <strong>env.php</strong></span>
				</th>
			</tr>
			<tr>
				<td><?php echo $config['label']; ?></td>
				<td class="text-right"><?php echo yesOrNo($config['value']); ?></td>
			</tr>
<?php /*
			<tr>
				<td><?php echo $config_php['label']; ?></td>
				<td><?php echo yesOrNo($config_php['value']); ?></td>
			</tr>
			<tr>
				<td><?php echo $database_php['label']; ?></td>
				<td><?php echo yesOrNo($database_php['value']); ?></td>
			</tr>
			<tr>
				<td><?php echo $email_php['label']; ?></td>
				<td><?php echo yesOrNo($email_php['value']); ?></td>
			</tr>
*/ ?>
		</table>
	</div>
</div>
