// В блоке if ($section==='dashboard') { $total_users = getCount($conn, 'users'); $total_connections = getCount($conn, 'connections'); $total_logs = getCount($conn, 'logs'); $total_support = getCount($conn, 'support_messages'); // Дополнительно: сколько кошельков подключено? $res = $conn->query("SELECT COUNT(*) as c FROM users WHERE wallet_connected=1"); $row = $res->fetch_assoc(); $wallet_connected_count = $row['c']; // Сколько у нас реферальных связей? $res = $conn->query("SELECT COUNT(*) as c FROM users WHERE referred_by IS NOT NULL"); $ref_count = $res->fetch_assoc()['c']; echo "

Dashboard

Total Users

$total_users

Wallets Connected

$wallet_connected_count

Total Referrals

$ref_count

Total Connections

$total_connections

Total Logs

$total_logs

Support Messages

$total_support

Welcome to the Admin Panel. Use the sidebar to navigate.

";