<?php
session_start();
require 'config/db.php';

if(!isset($_SESSION['manager_id'])){
    die('Unauthorized');
}

$id = $_POST['id'] ?? 0;

$stmt = $pdo->prepare("
    UPDATE design_employee_leave_requests
    SET status='Rejected'
    WHERE id=?
");
$stmt->execute([$id]);

header("Location: leave_requests.php");
exit;
