<?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.php");
exit;
}
?>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Dashboard</title>
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/dataTables.bootstrap4.min.css">
<!-- Font Awesome Icons -->
<link rel="stylesheet" href="fontawesome-free/css/all.min.css">
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap" rel="stylesheet"> 
<link href="css/custom.css" rel="stylesheet"> 
</head>
<body>
<div class="container">
<div class="page-header">
<h3>Hi, <b><?php echo htmlspecialchars($_SESSION["username"]); ?></b>. Welcome to IOM RDH Dashboard.</h3>
</div>

<div class="home-nav">

<div class="row">
        <div class="col-md-3">
            <a href="homemap.php" class="btn btn-info btn-lg btn-block btn-huge">
			<i class='fa fa-map-marker'></i> 
			Home Map
			</a>
        </div>
        <div class="col-md-3">
            <a href="mrcs.php" class="btn btn-info btn-lg btn-block btn-huge">
			<i class='fa fa-home'></i> 
			MRCs
			</a>
        </div>
        <div class="col-md-3">
            <a href="ksa.php" class="btn btn-info btn-lg btn-block btn-huge">
			<i class='fa fa-oil-can'></i> 
			KSA
			</a>
        </div>
        <div class="col-md-3">
            <a href="ethiopia.php" class="btn btn-info btn-lg btn-block btn-huge">
			<i class='fa fa-flag'></i> 
			Ethiopia
			</a>
        </div>
	</div>
	
	<br>
	
	<div class="row">
        <div class="col-md-3">
            <a href="ksaduration.php" class="btn btn-info btn-lg btn-block btn-huge">
			<i class='fa fa-clock'></i> 
			Duration in KSA
			</a>
        </div>
      
        <div class="col-md-3">
            <a href="hardships.php" class="btn btn-info btn-lg btn-block btn-huge">
			<i class='fa fa-map'></i> 
			Hardships
			</a>
        </div>
	</div>
	
</div>

<div class="footer">
<a href="logout.php" class="btn btn-danger">Sign Out</a>
</div><!--footer-->
</div><!--container-->
</body>
</html>