prepare("INSERT INTO notifications (icon, title, message, detail, is_danger) VALUES (?, ?, ?, ?, ?)"); $dangerVal = $is_danger ? 1 : 0; $result = $stmt->execute([$icon, $title, $message, $detail, $dangerVal]); if ($result) { // Send push notification to all admins PushHelper::broadcastToAdmins($pdo, $title, $message); } return $result; } catch(PDOException $e) { error_log("Notification Error: " . $e->getMessage()); return false; } } ?>