Proyecto en colaboración con OPASO

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <nav class="navbar navbar-expand-xlg">
  2. <div class="navbar-header">
  3. <a class="navbar-title" href="/menu">OPASO</a><br>
  4. <!-- logo -->
  5. <!-- <img class="navbar-logo" src="https://cdn.shopify.com/s/files/1/0533/2089/files/placeholder-images-image_large.png?v=1530129081"> -->
  6. </div>
  7. <!-- links -->
  8. <div class="link-wrapper">
  9. <ul class="navbar-nav">
  10. <li class="nav-item"><a class="nav-link" href="/menu">Menu</a></li>
  11. <?php
  12. /* generate link for current page */
  13. if(basename($_SERVER["PHP_SELF"]) !== "menu.php"){
  14. $current = basename($_SERVER["PHP_SELF"]);
  15. $base = explode(".",$current)[0];
  16. $title = ucwords(implode(" ",explode("-",$base)));
  17. if($base !== "laboratory" and $base !== "inventory"){
  18. echo '<li class="nav-item menu-link"><a class="nav-link" href="/' . $base . '">' . $title . '</a></li>';
  19. }
  20. /* lab or inventory */
  21. else{
  22. if($base === "inventory"){
  23. echo '<li class="nav-item menu-link"><a class="nav-link arg-link" href="/laboratory">Laboratory</a></li>';
  24. }
  25. echo '<li class="nav-item menu-link arg-link-wrapper"><a class="nav-link arg-link" href="/' . $base . '">' . $title . '</a></li>';
  26. }
  27. }
  28. ?>
  29. </ul>
  30. <!-- user menu -->
  31. <div class="um-wrapper" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  32. <div class="user-menu">
  33. <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>
  34. <div class="dropdown-menu dropdown-menu-right">
  35. <span class="dropdown-item logout">Log Out <i class="um-icons fas fa-sign-out-alt"></i></span>
  36. </div>
  37. </div>
  38. </div>
  39. </div>
  40. </nav>