<?php
require_once __DIR__ . '/../config/db.php';
require_once __DIR__ . '/../auth/protect_admin.php';

$tgl = $_POST['tgl'] ?? '';
$desc = $_POST['desc'] ?? '';
if ($tgl) {
    $pdo->prepare("INSERT INTO holidays (tgl, description) VALUES (:tgl, :d)")->execute([':tgl'=>$tgl, ':d'=>$desc]);
}
header('Location: /presensi_v1/pages/settings.php');
exit;
