File size: 1.45Kb
<?php
$this->pageTitle = Yii::t('Admin', 'Check');
?>
<?php
// php
echo '<h4>'.Yii::t('Admin', 'PHP version').'</h4>';
if (version_compare(PHP_VERSION, $requirements['php'], '>='))
echo TbHtml::alert(TbHtml::ALERT_COLOR_SUCCESS, Yii::t('Admin', 'PHP version: {version}', array('{version}' => PHP_VERSION)), array('closeText' => false));
else
echo TbHtml::alert(TbHtml::ALERT_COLOR_SUCCESS, Yii::t('Admin', 'Minimal PHP version is {version}', array('{version}' => $requirements['php'])), array('closeText' => false));
// extensions
echo '<h4>'.Yii::t('Admin', 'Extensions').'</h4>';
$extensions = get_loaded_extensions();
foreach ($requirements['extensions'] as $extension) {
if (in_array($extension, $extensions))
echo TbHtml::labelTb(Yii::t('Admin', '{extension} is installed', array('{extension}' => $extension)), array('color' => TbHtml::LABEL_COLOR_SUCCESS)).'<br/>';
else
echo TbHtml::labelTb(Yii::t('Admin', '{extension} is NOT installed', array('{extension}' => $extension)), array('color' => TbHtml::LABEL_COLOR_IMPORTANT)).'<br/>';
}
echo '<h4>'.Yii::t('Admin', 'Writable dirs').'</h4>';
foreach ($requirements['writableDirs'] as $dir) {
if (is_writable($dir))
echo TbHtml::labelTb(Yii::t('Admin', '{dir} is writable', array('{dir}' => $dir)), array('color' => TbHtml::LABEL_COLOR_SUCCESS)).'<br/>';
else
echo TbHtml::labelTb(Yii::t('Admin', '{dir} is NOT writable', array('{dir}' => $dir)), array('color' => TbHtml::LABEL_COLOR_IMPORTANT)).'<br/>';
}
?>