<?php
session_start();
if (!isset($_SESSION['admin_id'])) { header("Location: login.php"); exit(); }
include '../include/config.php';
$subs = $conn->query("SELECT * FROM subscriptions ORDER BY created_at DESC");
?>
<!DOCTYPE html>
<html><head><title>Subscriptions</title><link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"></head>
<body><div class="container mt-4"><h2>Subscriptions</h2><table class="table"><?php while($s=$subs->fetch_assoc()): ?><tr><td><?= $s['patient_id'] ?></td><td><?= $s['plan_name'] ?></td><td><?= $s['status'] ?></td></tr><?php endwhile; ?></table></div></body>
</html>