<?php
if (session_status() === PHP_SESSION_NONE) {
    session_start();
}

require_once __DIR__ . '/../../config/app.php';

if (!isset($_SESSION['user_rn_siamarch39'])) {
    header("location: " . APP_URL . "login.php");
    exit;
} else {
    $now = time(); 
    if ($now > $_SESSION['expire']) {
        session_destroy();
        header("location:" . APP_URL . "login.php?l=e");
        exit;
    }
}
?>
