<?php

include '../config/koneksi.php';
include '../session.php';

if($_SESSION['role'] != 'admin'){
    die("Akses ditolak");
}

if(isset($_GET['id'])){

    $id = (int)$_GET['id'];

    mysqli_query(
        $conn,
        "DELETE FROM checklist_master
         WHERE id_checklist='$id'"
    );
}

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