<hr style="margin: 0;padding: 0">
<nav class="navbar navbar-expand-lg navbar-light bg-light">
    <a class="navbar-brand" href="<?= base_url('')?>">ZMQ&nbsp;Logo</a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>

    <div class="collapse navbar-collapse" id="navbarSupportedContent">
        <ul class="navbar-nav ml-auto">
            <?php
            $logedInStatus = $this->session->userdata('logedInStatus');
            if ($logedInStatus) {
                $userRight = $this->session->userdata('userRight');
                for ($i = 0; $i < count($userRight); $i++) {
                    switch ($userRight[$i]['functionId']) {
                        case '9c6b76e9-db98-11ea-bddd-fa163e33b27c':
                            ?>
                            <li class="nav-item dropdown">
                                <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                    <?= $userRight[$i]['functionName'] ?>
                                </a>
                                <div class="dropdown-menu" aria-labelledby="navbarDropdown">
                                    <a class="dropdown-item" href="#">Create Package</a>
                                </div>
                                <div class="dropdown-menu" aria-labelledby="navbarDropdown">
                                    <a class="dropdown-item" href="#">Update User</a>
                                </div>
                            </li>
                            <?php
                            break;
                        case '9c6b6d6d-db98-11ea-bddd-fa163e33b27c':
                            ?>
                            <li class="nav-item dropdown">
                                <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                    <?= $userRight[$i]['functionName'] ?>
                                </a>
                                <div class="dropdown-menu" aria-labelledby="navbarDropdown">
                                    <a class="dropdown-item" href="#">User&nbsp;Type</a>
                                </div>
                            </li>
                            <?php
                            break;
                        case '52742bc2-db97-11ea-bddd-fa163e33b27c':
                            ?>
                            <li class="nav-item dropdown" style="margin-right: 20px">
                                <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                    <?= $userRight[$i]['functionName'] ?>
                                </a>
                                <div class="dropdown-menu" aria-labelledby="navbarDropdown">
                                    <a class="dropdown-item" href="#">Update&nbsp;Profile</a>
                                    <a class="dropdown-item" href="#">Update&nbsp;Password</a>
                                </div>
                            </li>
                            <?php
                            break;
                        case '5274323a-db97-11ea-bddd-fa163e33b27c':
                            ?>
                            <li class="nav-item">
                                <a class="nav-link" href="<?= base_url('logout') ?>"><i class="fa fa-sign-out" aria-hidden="true"><?= $userRight[$i]['functionName'] ?></i></a>
                            </li>
                            <?php
                            break;
                    }
                }
            }
            ?>
        </ul>

    </div>
</nav>


<hr style="margin-top:  0;padding-top: 0">

