<?php
// Initialize the session
session_start();
 
// Check if the user is logged in, if not then redirect him to login page
if(!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !== true){
    header("location: /login");
    exit;
}
?>

<html lang="en">
    <?php include 'global.php';?>
	
 
<head>
</head>
<body>
<main class="pt-5">
<div class="wrapper w-50 m-auto">
<div class="position-absolute start-50 translate-middle-x container-sm text-white" style="top:15%;">
<div style="display:flex;justify-content:space-between;align-content:center;" class="mb-2">
<h1>Games</h1>
<a class="btn btn btn-Secondary h-25 my-auto" href="/addgame">Create game</a>
</div>
<div class="row row-cols-1 row-cols-md-auto g-4">
<div class="col">
<div class="card bg-dark text-white" style="width: 10rem;display: inline-block;text-overflow: ellipsis;overflow:hidden;height:11.5rem">
<img src="/places/1" class="card-img-top" alt="...">
<div class="card-body">
<p class="card-title mb-0" style="text-overflow: ellipsis;overflow:hidden;white-space: nowrap;">Court</p>
<p class="card-subtitle text-muted">Row
</p><p class="card-text" style="font-size:12px">0 players</p>
<a href="/place/1" class="stretched-link"></a>
     </div>
   </div>
  </div>
 </body>
</html>

<?php include 'footer.php';?>