Файл: modules/index.php
Строк: 59
<?php
/**
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) 2013-2014, Taras Chornyi, Sergiy Mazurenko, Ivan Kotliar
* @link http://perf-engine.net
* @package PerfEngine
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
$page = 'index';
$locate = 'in_index';
$title = _t('home');
include_header($title);
Stat::last_news();
echo htmlspecialchars_decode($system['mainpage']);
$tpl->div('title', _t('menu'));
$modules = scandir(ROOT.'/modules');
foreach($modules as $module)
{
if($module != '.' && $module != '..' && $module != 'user' && $module != 'padmin' && $module != 'pages' && $module !='.htaccess' && $module != 'index.php')
{
$_module = parse_ini_file(ROOT.'/modules/'.$module.'/module.ini');
if($_module['open'] == 1 && $_module['location'] == 0)
{
if(file_exists(ROOT.'/modules/'.strtolower($module).'/images/icon.png'))
$img = '<img src="/'.strtolower($module).'/images/icon.png" alt="'.strtolower($module).'" />';
else
$img = img(strtolower($module).'.png');
echo '<div class="menu">'.$img.' <a href="/'.$module.'">'.ucfirst(_t(strtolower($_module['name']))).'</a> '.(isset($_module['counter']) && $_module['counter'] == 'true' ? include_once(ROOT.'/modules/'.$module.'/_counter.php') : null).'</div>';
(isset($_module['widget']) && $_module['widget'] == 'true' ? include_once(ROOT.'/modules/'.$module.'/_widget.php') : null);
}
}
}
$tpl->div('menu', img('info.png') .' <a href="/pages/faq">'. _t('faq') .'</a><br/>');
include_footer();
?>