Файл: core/admin/phpinfo.php
Строк: 39
<?php
if (!defined('CMS')) { die('Access Denied!'); }
if (is_admin(array(101, 102))) {
show_header('PHP-info');
echo '<div class="bl">- PHP version: <b>' . phpversion() . '</b><br />';
if (zend_version()) {
echo '- Zend version: <b>'.zend_version().'</b><br />';
}
if (gd_info()) {
$gd_info = preg_replace('/[^0-9.]/', '', gd_info());
echo '- GD Version: <b>'.$gd_info['GD Version'].'</b><br />';
}
$res = $db->selectCell("SELECT VERSION()");
echo '- MySQL Version: <b>' . preg_replace('/[^0-9.]/', '', $res) . '</b><br />';
echo '</div>';
$ini = ini_get_all();
echo '<div class="bl"><table width="100%" border="0" cellspacing="0" cellpadding="2">';
echo '<tr style="background:#bddf42;color:white;"><td width="40%">Directive</td><td width="60%">Local Value</td></tr>';
$i = 0;
foreach($ini as $inikey => $inivalue) {
$i++;
$bgcolor = $i % 2 ? '#ffffff' : '#e0e0e0';
if (strlen($inivalue['local_value']) > 40) {
$inivalue['local_value'] = substr($inivalue['local_value'], 0, 40);
$inivalue['local_value'] .= '...';
}
if ($inivalue['local_value'] == '') {
$inivalue['local_value'] = 'no_value';
}
echo '<tr bgcolor="'.$bgcolor.'"><td width="40%">'.$inikey.'</td><td width="60%">'.check($inivalue['local_value']).'</td></tr>';
}
echo '</table></div>';
echo '<div class="link"><a href="?' . RND . '">В админку</a></div>';
show_footer();
}
else {
redirect('/?' . RND);
}
?>