index.php 2.74 KB
Newer Older
1 2 3 4 5
<?php
/* @var $this YiiRequirementChecker */
/* @var $summary array */
/* @var $requirements array[] */
?>
6 7
<!DOCTYPE html>
<html lang="en">
8
<head>
9 10
	<meta charset="utf-8"/>
	<title>Yii Application Requirement Checker</title>
11
	<?php $this->renderViewFile(dirname(__FILE__) . '/css.php'); ?>
12 13
</head>
<body>
14 15 16 17 18
<div class="container">
	<div class="header">
		<h1>Yii Application Requirement Checker</h1>
	</div>
	<hr>
19

20 21 22 23 24 25 26 27
	<div class="content">
		<h3>Description</h3>
		<p>
		This script checks if your server configuration meets the requirements
		for running Yii application.
		It checks if the server is running the right version of PHP,
		if appropriate PHP extensions have been loaded, and if php.ini file settings are correct.
		</p>
28 29 30 31 32 33
		<p>
		There are two kinds of requirements being checked. Mandatory requirements are those that have to be met
		to allow Yii to work as expected. There are also some optional requirements beeing checked which will
		show you a warning when they do not meet. You can use Yii framework without them but some specific
		functionality may be not available in this case.
		</p>
34

35
		<h3>Conclusion</h3>
36 37 38 39 40 41 42 43
		<?php if ($summary['errors'] > 0): ?>
			<div class="alert alert-error">
				<strong>Unfortunately your server configuration does not satisfy the requirements by this application.<br>Please refer to the table below for detailed explanation.</strong>
			</div>
		<?php elseif ($summary['warnings'] > 0): ?>
			<div class="alert alert-info">
				<strong>Your server configuration satisfies the minimum requirements by this application.<br>Please pay attention to the warnings listed below and check if your application will use the corresponding features.</strong>
			</div>
44
		<?php else: ?>
45 46 47
			<div class="alert alert-success">
				<strong>Congratulations! Your server configuration satisfies all requirements.</strong>
			</div>
48
		<?php endif; ?>
49

50
		<h3>Details</h3>
51

52 53 54 55 56 57 58
		<table class="table table-bordered">
			<tr><th>Name</th><th>Result</th><th>Required By</th><th>Memo</th></tr>
			<?php foreach($requirements as $requirement): ?>
			<tr class="<?php echo $requirement['condition'] ? 'success' : ($requirement['mandatory'] ? 'error' : 'warning'); ?>">
				<td>
				<?php echo $requirement['name']; ?>
				</td>
59 60
				<td>
				<span class="result"><?php echo $requirement['condition'] ? 'Passed' : ($requirement['mandatory'] ? 'Failed' : 'Warning'); ?></span>
61 62 63 64 65 66 67 68 69 70
				</td>
				<td>
				<?php echo $requirement['by']; ?>
				</td>
				<td>
				<?php echo $requirement['memo']; ?>
				</td>
			</tr>
			<?php endforeach; ?>
		</table>
71

72
	</div>
73

74
	<hr>
75

76
	<div class="footer">
77
		<p>Server: <?php echo $this->getServerInfo() . ' ' . $this->getNowDate(); ?></p>
78 79 80
		<p>Powered by <a href="http://www.yiiframework.com/" rel="external">Yii Framework</a></p>
	</div>
</div>
81
</body>
82
</html>