<?php
session_start();
if (!isset($_SESSION['admin'])) {
    header("Location: login.php");
    exit;
}
?>
<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<title>Admin Panel</title>
	<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0" name="viewport" />
	<link rel="stylesheet" href="../assets/website/css/bootstrap.min.css">
	<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nunito:200,300,400,600,700,800,900">
	<link rel="stylesheet" href="../assets/website/css/ready.css">
	<link rel="stylesheet" href="../assets/website/css/demo.css">
	
	<link href="https://cdn.jsdelivr.net/npm/quill@2.0.3/dist/quill.snow.css" rel="stylesheet" />
</head>
<body>
<div class="wrapper">
	<div class="main-header">
		<div class="logo-header">
			<!--<h4>Admin Panel</h4>-->
			<a href="https://psntrust.in/mentor" class="logo"><img src="../assets/img/PSNR.png" alt="" style="width:70px;"></a>
			<button class="navbar-toggler sidenav-toggler ml-auto" type="button">
				<span class="navbar-toggler-icon"></span>
			</button>
		</div>
		<nav class="navbar navbar-header navbar-expand-lg">
			<div class="container-fluid">
				<!-- search bar -->
				<div class="navbar-left mr-md-3 text-white font-weight-bold" id="currentTime" style="background-color: #a9a9a966; padding: 10px; border-radius:5px; color:#5b5b5b !important;"></div>
				<!-- top right menu -->
				<ul class="navbar-nav topbar-nav ml-md-auto align-items-center">
					<li class="nav-item dropdown">
						<a class="dropdown-toggle profile-pic" data-toggle="dropdown" href="#">
							<img src="../assets/img/user.jpg" width="36" class="img-circle">
							<span><?php echo $_SESSION['admin']; ?></span>
						</a>
						<ul class="dropdown-menu dropdown-user">
							<li><a class="dropdown-item" href="../logout.php"><i class="fa fa-power-off"></i> Logout</a></li>
						</ul>
					</li>
				</ul>
			</div>
		</nav>
	</div>


    <script>
    function updateTime() {
        let now = new Date();
        let time = now.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit', second: '2-digit' });
        document.getElementById("currentTime").textContent = time;
    }
    setInterval(updateTime, 1000);
    updateTime(); // run once immediately
    </script>