PHP_SMART_HOME_V3/app/views/templates/part/menu.phtml

36 lines
964 B
PHTML

<div class="nav">
<?php
$menuItems = [
'fa-wrench' => [
'slug' => 'setting',
'lngKey' => 'settings',
'path' => 'setting',
],
'fa-calendar-o' => [
'slug' => 'automation',
'lngKey' => 'automatization',
'path' => 'automation',
],
'fa-bug' =>[
'slug' => '',
'lngKey' => 'log',
'path' => '',
],
];
foreach ( $menuItems as $key => $value) {
if ($DEBUGMOD == 0 && $value['path'] == 'log') {
continue;
}
?>
<div class="nav-item <?php echo ($ITEM == $value ? 'is-active' : ''); ?>">
<a href="<?php echo $value['path']?>">
<i class="fa <?php echo $key ?>"></i>
<span>
<?php $LANGMNG->echo('m_'.$value['lngKey']); ?>
</span>
</a>
</div>
<?php }?>
</div>