<?php error_reporting(0);
require_once "db.php"; 
?>
<?php require_once "settings.php"; ?>

<!DOCTYPE html>
<html lang="en">
    <head>
   <meta charset="UTF-8">
  <meta name="description" content="a 2015M rowblox private server">
  <meta name="keywords" content="Rowblox, Old Rowblox, Old Rowblox Revival, ORC court12356">
  <meta name="author" content="Rowblox">
</head>
<title>Rowblox</title>
<link rel="icon" type="image/png" href="<?php echo SMALLLOGOPATH;?>" />

<style>
@media screen and (min-width: 500px) 
         {
      html { height:100%; }
      body{
        background-image: url(<?php echo SITEDOMAIN;?>/img/background.png);
        background-repeat: no-repeat;
        background-size: cover;
      }
</style>
      
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/css/bootstrap.min.css" integrity="sha384-zCbKRCUGaJDkqS1kPbPd7TveP5iyJE0EjAuZQTgFLD2ylzuqKfdKlfG/eSrtxUkn" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/js/bootstrap.min.js" integrity="sha384-VHvPCCyXqtD5DqJeNxl2dtTyhF78xXNXdkwX1CZeRusQfRKp+tA7hAShOK/B/fQ2" crossorigin="anonymous"></script>
<link href="<?php echo SITEDOMAIN;?>/fontawesomelib/css/all.css" rel="stylesheet">

<nav class="navbar navbar-expand-lg navbar-dark bg-dark text-light">
  <img src="<?php echo FULLLOGOPATH;?>" width="100"  alt="Rowblox">
  <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="wrapper w-100 m-auto">
  <div class="collapse navbar-collapse" id="navbarSupportedContent">
    <ul class="navbar-nav mr-auto">
      <li class="nav-item">
        <a class="nav-link" href="<?php echo SITEDOMAIN;?>">Home</a>
      </li>
            <li class="nav-item">
        <a class="nav-link" href="Games.php">Games</a>
      </li>
            <li class="nav-item">
        <a class="nav-link" href="404.php">Browse</a>
      </li>
            <li class="nav-item">
        <a class="nav-link" href="404.php">Groups</a>
      </li>
            <li class="nav-item">
        <a class="nav-link" href="404.php">Catalog</a>
      </li>
          <?php
if ($_SESSION['loggedin'] == true) {
?>
<li class="nav-item dropdown">
        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-expanded="false">
          <i class="far align-middle fa-user mr-1"></i> <?php echo htmlspecialchars($_SESSION["username"]); ?>
        </a>
        <div class="dropdown-menu" aria-labelledby="navbarDropdown">
          <a class="dropdown-item" href="404.php">Profile</a>
          <a class="dropdown-item" href="404.php">Friends</a>
                   <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="404.php">Develop</a>
        </div>
<?php
} else {
?>
<?php
}
?>
    </ul>
<?php
if ($_SESSION['loggedin'] == true) {
?>
<a href="<?php echo SITEDOMAIN;?>/logout.php" class="btn btn-light" role="button">Logout</a>
<?php
} else {
?>
    <a href="<?php echo SITEDOMAIN;?>/register" class="btn btn-light" role="button">Register</a>
    |
    <a href="<?php echo SITEDOMAIN;?>/login" class="btn btn-light" role="button">Login</a>
<?php
}
?>
  </div>
</nav>
</body>
</html>