<?php
function isPengujiLoggedIn() {
    return isset($_SESSION['penguji_id']) && 
           isset($_SESSION['ujian_id']) && 
           isset($_SESSION['station_id']);
}

function redirectPenguji($url) {
    header("Location: $url");
    exit;
}

function requirePengujiLogin() {
    if (!isPengujiLoggedIn()) {
        redirectPenguji('login_penguji.php');
    }
}
?>