123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <nav class="navbar navbar-expand-xlg">
- <div class="navbar-header">
- <a class="navbar-title" href="/menu">OPASO</a><br>
- <!-- logo -->
- <!-- <img class="navbar-logo" src="https://cdn.shopify.com/s/files/1/0533/2089/files/placeholder-images-image_large.png?v=1530129081"> -->
- </div>
-
- <!-- links -->
- <div class="link-wrapper">
- <ul class="navbar-nav">
- <li class="nav-item"><a class="nav-link" href="/menu">Menu</a></li>
-
- <?php
- /* generate link for current page */
- if(basename($_SERVER["PHP_SELF"]) !== "menu.php"){
- $current = basename($_SERVER["PHP_SELF"]);
- $base = explode(".",$current)[0];
- $title = ucwords(implode(" ",explode("-",$base)));
-
- if($base !== "laboratory" and $base !== "inventory"){
- echo '<li class="nav-item menu-link"><a class="nav-link" href="/' . $base . '">' . $title . '</a></li>';
-
- }
-
- /* lab or inventory */
- else{
- if($base === "inventory"){
- echo '<li class="nav-item menu-link"><a class="nav-link arg-link" href="/laboratory">Laboratory</a></li>';
- }
-
- echo '<li class="nav-item menu-link arg-link-wrapper"><a class="nav-link arg-link" href="/' . $base . '">' . $title . '</a></li>';
- }
- }
- ?>
-
- </ul>
-
- <!-- user menu -->
- <div class="um-wrapper" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
- <div class="user-menu">
- <a class="user nav-link" href="#"><span class="user-name"><?php echo $_SESSION["person_name"]; ?></span><i class="um-icons dropdown-icon fas fa-caret-down"></i></a>
- <div class="dropdown-menu dropdown-menu-right">
- <span class="dropdown-item logout">Log Out <i class="um-icons fas fa-sign-out-alt"></i></span>
- </div>
- </div>
- </div>
- </div>
- </nav>
|