<?php

if (session_status() === PHP_SESSION_NONE) {

    session_start();
}

if (!isset($page_title)) {

    $page_title = 'Super Admin Panel';
}

?>

<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta
        name="viewport"
        content="width=device-width, initial-scale=1.0"
    >

    <title>

        <?= htmlspecialchars($page_title); ?>

    </title>

    <!-- Google Font -->

    <link
        rel="stylesheet"
        href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700"
    >

    <!-- Font Awesome -->

    <link
        rel="stylesheet"
        href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"
    >

    <!-- AdminLTE -->

    <link
        rel="stylesheet"
        href="https://cdnjs.cloudflare.com/ajax/libs/admin-lte/3.2.0/css/adminlte.min.css"
    >

</head>

<body class="hold-transition sidebar-mini layout-fixed">

<div class="wrapper">

    <!-- Navbar -->

    <nav class="main-header navbar navbar-expand navbar-white navbar-light">

        <!-- Left navbar links -->

        <ul class="navbar-nav">

            <li class="nav-item">

                <a
                    class="nav-link"
                    data-widget="pushmenu"
                    href="#"
                    role="button"
                >

                    <i class="fas fa-bars"></i>

                </a>

            </li>

        </ul>

        <!-- Right navbar links -->

        <ul class="navbar-nav ml-auto">
	
		

            <li class="nav-item">

                <span class="nav-link">

                    Welcome,

                    <?= htmlspecialchars($_SESSION['super_admin_name'] ?? 'Admin'); ?>

                </span>

            </li>

            <li class="nav-item">
			<?php require_once __DIR__ . '/top_notifications.php'; ?>

                <a
                    href="<?= WEB_ROOT; ?>super_admin/logout.php"
                    class="nav-link text-danger"
                >

                    <i class="fas fa-sign-out-alt"></i>

                    Logout

                </a>

            </li>

        </ul>

    </nav>

    <!-- /.navbar -->