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

if (!isset($_SESSION['village_admin_id'])) {
    header("Location: login.php");
    exit;
}

$admin_id = intval($_SESSION['village_admin_id']);
$admin_name = $_SESSION['village_admin_name'] ?? 'Village Admin';
$admin_mobile = $_SESSION['village_admin_mobile'] ?? '';
$village_id = intval($_SESSION['village_admin_village_id'] ?? 0);
?>