<?php require_once __DIR__ . '/../includes/bootstrap.php'; require_login();
$id = (int)($_GET['id'] ?? 0);
$stmt = db()->prepare("DELETE FROM leaves_requests WHERE id=?");
$stmt->execute([$id]);
audit_log('delete', 'leaves_requests', $id, 'Eliminación permiso');
set_flash('success','Permiso eliminado.');
redirect('leaves/index.php');
