<!-- Navbar -->
<nav class="main-header navbar navbar-expand navbar-primary ">
    <!-- Left navbar links -->
    <ul class="navbar-nav ">
        <li class="nav-item">
            <a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-angle-double-left text-light"></i></a>
        </li>
        <li class="nav-item d-none d-sm-inline-block">
            <a href="#" class="nav-link text-light"><?php echo $tahun . " - " .  $clasSekolah->dataSekolah('sekolah');;
                                                    ?></a>
        </li>

    </ul>
    <ul class="navbar-nav ml-auto">

        <!-- Notifications Dropdown Menu -->
        <li class="nav-item dropdown">
            <a class="nav-link text-light" data-toggle="dropdown" href="#">
                <i class="far fa-user text-light"></i>
                <?php echo $user_name; ?>
            </a>
            <div class="dropdown-menu dropdown-menu-lg dropdown-menu-right ">
                <p class="float-left d-inline pl-3 py-2"> <span class="float-right text-muted text-sm"> <?php echo $user_name; ?></span> </p>
                <div class="dropdown-divider"></div>
                <a <?php echo $link->pageID($user_id, 'seting/userAdmin/user_profil'); ?> class="dropdown-item small">
                    <i class="fas fa-cog mr-2"></i> Seting Profil
                    <span class="float-right text-muted text-sm"></span>
                </a>
                <div class="dropdown-divider"></div>
                <a <?php echo $link->page('logout'); ?> class="dropdown-item small">
                    <i class="fas fa-arrow-circle-right mr-2"></i> Logout
                    <span class="float-right text-muted text-sm"></span>
                </a>

            </div>
        </li>



        <li class="nav-item">
            <a class="nav-link" data-widget="fullscreen" href="#" role="button">
                <i class="fas fa-expand-arrows-alt text-light"></i>
            </a>
        </li>
        <li class="nav-item">
            <a class="nav-link" <?php echo $link->page('logout'); ?> role="button" title="LOGOUT">
                <i class="fas fa-arrow-circle-right text-light"></i>
            </a>
        </li>
    </ul>
</nav>
<!-- /.navbar -->

<!-- Main Sidebar Container -->
<aside class="main-sidebar sidebar-light-primary elevation-4">
    <!-- Brand Logo -->
    <a href="#" class="brand-link bg-primary">
        <img src="<?php
                    $logo = new dirImage;
                    echo $logo->dirImg('../../asset/dokumen/foto/', 'logo');
                    ?>" alt="Logo" class="brand-image img-circle elevation-3" style="opacity: .8">

        <span class="brand-text  font-weight-light" style="font-size: medium;font-family:'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif"><strong>AKS-SIMAKOM</strong></span>
    </a>

    <div class="sidebar">
        <div class="user-panel mt-3 pb-3 mb-3 d-flex">
            <div class="image">
                <?php echo $user_foto; ?>

            </div>
            <div class="info">
                <a <?php echo $link->pageID($user_id, 'seting/userAdmin/user_profil'); ?> class="d-block"><?php echo $user_name; ?></a>
                <div class="text-success d-inline-block">Online</div>
            </div>

        </div>

        <div class="user-panel mt-1 pb-2 mb-1">
            <label class="label"><i class="bi-calendar-plus text-light"></i><b class="text-dark"> SET TAHUN</b></label>

            <form action="" method="post">
                <select class="form-control-sm bg-light my-0" style="width: 100%;" name="settahun" onchange="this.form.submit()" required>
                    <option class="col-xs-10 "><?php echo $tahun; ?></option>
                    <?php
                    $opt = new form();
                    $opval = $opt->optSelect('tb_tp', ' order by tp asc');
                    while ($datatp = $opval->fetch(PDO::FETCH_OBJ)) {
                        echo "<option>$datatp->tp</option>";
                    };
                    ?>
                </select>

            </form>

        </div>

        <?php if ($level == "admin") {
            include('menu.php');
        } else {
            include('menu_teller.php');
        }; ?>
    </div>
</aside>