<?php
if (!isset($conn)) return;

// Hitung pending setoran
$qNotifSetoran = mysqli_query($conn, "SELECT COUNT(*) as total FROM transactions WHERE status='pending'");
$notif_setoran = mysqli_fetch_assoc($qNotifSetoran)['total'] ?? 0;

// Hitung pending penarikan
$qNotifPenarikan = mysqli_query($conn, "SELECT COUNT(*) as total FROM withdrawals WHERE status='pending'");
$notif_penarikan = mysqli_fetch_assoc($qNotifPenarikan)['total'] ?? 0;

// Total semua notif
$total_notif_admin = $notif_setoran + $notif_penarikan;
?>