<?php  if (!defined('DASHBOARD_ROOT')) { http_response_code(403); exit; } $devices = Database::fetchAll("SELECT id, user_id, device_token, ip_address, user_agent, last_seen, created_at FROM device_bindings ORDER BY last_seen DESC LIMIT 100"); echo "<div class=\"device-wall\"><h3>Device Wall</h3>"; $headers = ["User", "Device Token", "IP", "UA", "First Seen", "Last Seen"]; $rows = []; foreach ($devices as $d) { $rows[] = [ $d["user_id"], substr(UI::e($d["device_token"] ?? ""), 0, 12) . "...", UI::e($d["ip_address"] ?? ""), UI::e(substr($d["user_agent"] ?? "", 0, 40)), UI::e($d["created_at"] ?? ""), $d["last_seen"] ]; } echo UI::table($headers, $rows, "tbl-devices") . "</div>"; 