<?php
session_start();
if (!isset($_SESSION['admin_id'])) { header('Location: login.php'); exit; }
include '../db.php';

$id = intval($_GET['id']);
if ($id != $_SESSION['admin_id']) {
    $pdo->prepare("DELETE FROM admins WHERE id=?")->execute([$id]);
}
header('Location: manage_admins.php');
exit;
?>
