['Free', '#f3f4f6', '#374151'], 'plus' => ['Plus', '#ddd6fe', '#5b21b6'], 'pro' => ['Pro', '#bfdbfe', '#1e40af'], 'caveau' => ['CaveauAI', '#d1fae5', '#065f46'], ]; $tierLabel = $tierLabels[$tier] ?? $tierLabels['free']; $monthlyAllowance = $detail ? FreeTier::monthlyAllowance($tier) : 0; $creditsUsed = $detail ? max(0, $monthlyAllowance - (int)$detail['balance']) : 0; // Team (Caveau sessions only) $teamMembers = []; if (!$isSso && !empty($authUser['client_id'])) { try { $db = dbnToolsDb(); $stmt = $db->prepare( "SELECT cu.email, cu.role, cu.created_at FROM client_users cu WHERE cu.client_id = ? ORDER BY FIELD(cu.role,'owner','admin','editor','viewer'), cu.created_at ASC" ); $stmt->execute([(int)$authUser['client_id']]); $teamMembers = $stmt->fetchAll(PDO::FETCH_ASSOC); } catch (Throwable $e) { // non-fatal } } // Renewal date label $renewalLabel = ''; if ($detail) { if (!empty($detail['trial_active']) && !empty($detail['trial_expires_at'])) { $renewalLabel = date('d M Y', strtotime((string)$detail['trial_expires_at'])) . ' (' . (int)$detail['trial_days_remaining'] . ' ' . dbnToolsT('trial_days_left', $uiLang) . ')'; } elseif (!empty($detail['subscription_period_end'])) { $renewalLabel = date('d M Y', strtotime((string)$detail['subscription_period_end'])); } } ?>
= htmlspecialchars($email) ?>
= htmlspecialchars(dbnToolsT('account_credits', $uiLang)) ?>
= htmlspecialchars($tierLabel[0]) ?> = htmlspecialchars(dbnToolsT('trial_active_label', $uiLang)) ?>= number_format((int)$detail['balance'] + (int)$detail['bonus_balance'], 0, ',', ' ') ?>
= (int)$detail['balance'] ?> = htmlspecialchars(dbnToolsT('credits_monthly', $uiLang)) ?> · = (int)$detail['bonus_balance'] ?> = htmlspecialchars(dbnToolsT('credits_bonus', $uiLang)) ?>
= htmlspecialchars(dbnToolsT('account_profile', $uiLang)) ?>
= htmlspecialchars(dbnToolsT('account_team', $uiLang)) ?>
= htmlspecialchars(dbnToolsT('team_single_sso', $uiLang)) ?>
—
| Role | Added | |
|---|---|---|
| = htmlspecialchars($member['email']) ?> | = htmlspecialchars($member['role']) ?> | = htmlspecialchars(date('d M Y', strtotime((string)$member['created_at']))) ?> |
MCP access
Connect Claude, Cursor, and other AI tools to all 19 DBN legal preparation tools via MCP.
Set up MCP →= htmlspecialchars(dbnToolsT('account_usage', $uiLang)) ?>
= htmlspecialchars(dbnToolsT('usage_log_coming', $uiLang)) ?>