<?php
include_once 'config.php';

if (session_status() === PHP_SESSION_NONE) {
    session_start();
}

if (!isset($_SESSION['user_rn_dm'])) {
    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();
    }
}
?>