80 lines
4.2 KiB
PHP
80 lines
4.2 KiB
PHP
<?php
|
|
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Education Ecosystem Platform for South African Schools';
|
|
$projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
|
|
$current_role = $current_role ?? 'Teacher';
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title><?= $pageTitle ?? 'Township Schools Platform' ?></title>
|
|
<?php if ($projectDescription): ?>
|
|
<meta name="description" content="<?= htmlspecialchars($projectDescription) ?>" />
|
|
<meta property="og:description" content="<?= htmlspecialchars($projectDescription) ?>" />
|
|
<?php endif; ?>
|
|
<?php if ($projectImageUrl): ?>
|
|
<meta property="og:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
|
|
<?php endif; ?>
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css">
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap" rel="stylesheet">
|
|
<link rel="stylesheet" href="assets/css/custom.css?v=<?= time() ?>">
|
|
</head>
|
|
<body>
|
|
|
|
<nav class="navbar navbar-expand-lg navbar-dark mb-4">
|
|
<div class="container">
|
|
<a class="navbar-brand" href="index.php">
|
|
<i class="bi bi-book-half me-2"></i>
|
|
Township Schools
|
|
</a>
|
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
<div class="collapse navbar-collapse" id="navbarNav">
|
|
<ul class="navbar-nav me-auto">
|
|
<?php if ($current_role === 'Super Admin'): ?>
|
|
<li class="nav-item">
|
|
<a class="nav-link <?= basename($_SERVER['PHP_SELF']) == 'super-admin.php' ? 'active' : '' ?>" href="super-admin.php">Platform Stats</a>
|
|
</li>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($current_role === 'Teacher'): ?>
|
|
<li class="nav-item">
|
|
<a class="nav-link <?= basename($_SERVER['PHP_SELF']) == 'index.php' ? 'active' : '' ?>" href="index.php">Attendance</a>
|
|
</li>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($current_role === 'Admin'): ?>
|
|
<li class="nav-item">
|
|
<a class="nav-link <?= basename($_SERVER['PHP_SELF']) == 'admin.php' ? 'active' : '' ?>" href="admin.php">Dashboard</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link <?= basename($_SERVER['PHP_SELF']) == 'learners.php' ? 'active' : '' ?>" href="learners.php">Learners</a>
|
|
</li>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($current_role === 'Parent'): ?>
|
|
<li class="nav-item">
|
|
<a class="nav-link <?= basename($_SERVER['PHP_SELF']) == 'parent.php' ? 'active' : '' ?>" href="parent.php">My Child</a>
|
|
</li>
|
|
<?php endif; ?>
|
|
</ul>
|
|
<div class="d-flex align-items-center">
|
|
<span class="text-white me-3 d-none d-md-inline small">Role: <strong><?= $current_role ?></strong></span>
|
|
<div class="dropdown">
|
|
<button class="btn btn-outline-light btn-sm dropdown-toggle" type="button" data-bs-toggle="dropdown">
|
|
Switch Role
|
|
</button>
|
|
<ul class="dropdown-menu dropdown-menu-end">
|
|
<li><a class="dropdown-item <?= $current_role == 'Super Admin' ? 'active' : '' ?>" href="super-admin.php">Super Admin</a></li>
|
|
<li><a class="dropdown-item <?= $current_role == 'Admin' ? 'active' : '' ?>" href="admin.php">School Admin</a></li>
|
|
<li><a class="dropdown-item <?= $current_role == 'Teacher' ? 'active' : '' ?>" href="index.php">Teacher</a></li>
|
|
<li><a class="dropdown-item <?= $current_role == 'Parent' ? 'active' : '' ?>" href="parent.php">Parent</a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|