PHP Classes

File: app/components/navbar.php

Recommend this page to a friend!
  Classes of Faris AL-Otabi   PHP Chat Application with API   app/components/navbar.php   Download  
File: app/components/navbar.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP Chat Application with API
Exchange user messages on a page or using an API
Author: By
Last change:
Date: 6 months ago
Size: 1,553 bytes
 

Contents

Class file image Download
<nav class="navbar navbar-light bg-light navbar-expand-lg">
      <div class="container-fluid">
          <a class="navbar-brand" href="index.php">Ghostly</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 justify-content-between" id="navbarSupportedContent">
              <ul class="navbar-nav ms-auto">
                  <?php if (!isset($_SESSION['loggedin'])) : ?>
<li class="nav-item">
                          <a class="nav-link" href="register.php">Register</a>
                      </li>
                      <li class="nav-item">
                          <a class="nav-link" href="login.php">Login</a>
                      </li>
                  <?php endif; ?>

                  <?php if (isset($_SESSION['loggedin'])) : ?>
<?php if ($_SESSION['is_admin']) : ?>
<li class="nav-item">
                              <a class="nav-link" href="rooms.php">Manage Rooms</a>
                          </li>
                      <?php endif; ?>
<li class="nav-item">
                          <a class="nav-link" href="logout.php">Logout</a>
                      </li>
                  <?php endif; ?>
</ul>
          </div>
      </div>
  </nav>