<?php

  //header.php

  if(!isset($_SESSION["user_id"]))
  {
    header('location: login.html');
  }

?>

<!DOCTYPE html>
<html>
  <head>
    
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <title>Login and Register System</title>

    <!-- Custom CSS -->
    <link rel="stylesheet" type="text/css" href="css/style.css">

    <!-- Bootstrap v4.4.1 -->
    <link rel="stylesheet" type="text/css" href="vendor/bootstrap/bootstrap.min.css">

    <!-- Font Awesome Free 5.12.0 -->
    <link rel="stylesheet" type="text/css" href="vendor/fontawesome/css/all.css">

    <!-- Favicon -->
    <link rel="shortcut icon" type="image/x-icon" href="images/favicon.jpg">

  </head>

    <body class="bg-light">
      
      <!-- Navigation -->
      <nav class="navbar navbar-expand-lg navbar-dark bg-dark static-top">
        <div class="container">
          <a class="navbar-brand" href="index.php">
            <img src="images/logo2.png" alt="50">
          </a>
          <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
          </button>
          <div class="collapse navbar-collapse" id="navbarResponsive">
            <ul class="navbar-nav ml-auto">
              <li class="nav-item">
                  <a class="nav-link" href="index.php" title="Go Home"><span class="fas fa-home" ></span> Home</a>
              </li>
              <li class="nav-item">
                  <a class="nav-link" href="profile.php" title="<?php echo "Logged in by: ".$_SESSION['fullname'];?>"><span class="fas fa-user"></span> Profile</a>
              </li>
              <li class="nav-item">
                  <a class="nav-link" href="logout.php" title="Click to Logout"><span class="fas fa-sign-out-alt"></span> Logout</a>
              </li>
            </ul>
          </div>
        </div>
      </nav>