<?php require_once 'inicio.php'; ?>
<nav id="menuPrincipal">
    <dl id="menu">
        <a href="<?= $baseUrl; ?>"><dt class="<?php echo (false !== stripos($i, 'cms-home')) ? 'active' : ''; ?>">Home</dt></a>

        <?php
            $objTela = Tela::listar('exibir_menu = 1', array(), 'ordem ASC, id DESC');
            if (count($objTela) > 0) {
                foreach ($objTela as $obj) {
                    $ac = null;
                    $ac = Acesso::check($obj->slug);
                    if ($ac->consultar()) {
                        $active = (false !== stripos($i, $obj->slug)) ? 'active' : '';
                        echo '<a href="' . $baseUrl . '?i=' . $obj->slug . '"><dt class="' . $active . '">' . $obj->nome . '</dt></a>';
                    }
                }
            }
        ?>
        <a class="editar-conta" href="<?= $baseUrl; ?>cms/?i=cms-user-editar"><dt>Editar conta</dt></a>
        <a class="logout" href="<?= $baseUrl; ?>cms/login/logout.php"><dt>Logout</dt></a>
        <li class="icon">
            <a href="javascript:void(0);" style="font-size:20px;" onclick="responsiveMenu()"><i class="fa fa-bars fa-lg" aria-hidden="true"></i></a>
        </li>
    </dl>
</nav>
