<?php include'includes/session.php';?>
<?php include'includes/header.php';?>
<?php include'includes/sidebar.php';?>
<?php include'includes/navbar.php';?>
<?php include'includes/functions.php';?>
<style>.sideNav{height:118vh;}
.insider{
    padding-left: 260px;
}
@media(max-width: 992px){
    .sideNav{
        height: 128vh;
    }
}
</style>
<?php
if (isset($_SESSION['username'])) {
    $username = $_SESSION['username']; // username = email
    $staffRole = $_SESSION['role'];

    if ($staffRole == 'principal') {
        header('Location:principal/index.php');
    }
    elseif ($staffRole == 'vice_principal') {
        header('Location:principal/index.php');
    }
    elseif ($staffRole == 'subject_teacher') {
        header('Location:staff/index.php');
    }else if ($staffRole == 'class_teacher') {
        header('Location:staff/index.php');
    }else if ($staffRole == 'admin') {
        header('Location:admin/index.php');
    }else{
        header('Location:login.php');
    }

}else{
    header('Location:login.php');
}

?>




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