<?php

// Start Session
if (session_status() === PHP_SESSION_NONE) {
    session_start();
}

// Manual Autoloader
spl_autoload_register(function ($class_name) {
    $file = __DIR__ . '/../classes/' . $class_name . '.php';
    if (file_exists($file)) {
        require_once $file;
    }
});

// Initialize Database Connection
$db = new Database();
$pdo = $db->connect();

// Global Session/Term options used across admin pages
$__currentYear = (int)date('Y');
$sessions = [
    ($__currentYear - 1) . '/' . $__currentYear,
    $__currentYear . '/' . ($__currentYear + 1),
    ($__currentYear + 1) . '/' . ($__currentYear + 2),
];
$terms = ['1st Term','2nd Term','3rd Term'];
