<?php
$array = (new CoreSystem())->UserAccess();
?>
<section>
    <!-- Left Sidebar -->
    <aside id="leftsidebar" class="sidebar">
        <!-- User Info -->
        <div class="user-info">
            <div class="image">
                <div class="" style="width=48px; height=48px;"></div>
            </div>
            <div class="info-container">
                <div class="name" data-toggle="dropdown" aria-haspopup="true"
                     aria-expanded="false"><?php (new CoreSystem())->UserName(); ?></div>
                <div class="btn-group user-helper-dropdown">
                    <i class="material-icons" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">keyboard_arrow_down</i>
                    <ul class="dropdown-menu pull-right">
                        <li>
                            <a href="javascript:void(0);" class="sign-out fBTitrBold">
                                خروج از سیستم
                                <i class="material-icons">input</i>
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <!-- #User Info -->
        <!-- Menu -->
        <div class="menu">
            <ul id="system" class="list">
                <li class="header text-center">منو ها</li>
                <?php
                if (count($array) > 0) {
                    foreach ($array as $item)
                        echo $item;
                } else { ?>
                    <li class="active item-menu">
                        <a href="javascript:void(0);" target-mod="page-404">
                            <span>شما حق دسترسی ندا رید</span>
                        </a>
                    </li>
                <?php } ?>
            </ul>
        </div>
        <!-- #Menu -->
        <!-- Footer -->
        <div class="legal">
            <div class="copyright">
                &copy; 2016 - <?php echo date("Y"); ?> <a href="javascript:void(0);">Digigelp.net</a>
            </div>
            <div class="version">
                <b>Version: </b> 1.0.0
            </div>
        </div>
        <!-- #Footer -->
    </aside>
</section>