<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
if (!isset($_SESSION['user_id'])) {
header('Location: index.php?page=login');
exit;
}
if (empty($_SESSION['is_admin']) || $_SESSION['is_admin'] != 1) {
header('Location: index.php?page=home');
exit;
}
// Handle AJAX requests
if (isset($_POST['ajax_assign']) && $_POST['ajax_assign'] == '1') {
require_once 'actions/assign_supervisor.php';
exit;
}
// Get data for the page
require_once 'includes/planresponse_data.php';
// Render the view
require_once 'pages/planresponse_view.php';
?>