DNSBlock
This commit is contained in:
118
resources/views/client/dashboard.php
Normal file
118
resources/views/client/dashboard.php
Normal file
@@ -0,0 +1,118 @@
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
|
||||
<!-- Card 1 -->
|
||||
<div class="bg-white rounded-xl shadow-sm p-6 border border-gray-100 hover:shadow-md transition-shadow">
|
||||
<div class="flex items-center">
|
||||
<div class="p-3 rounded-full bg-blue-50 text-blue-600">
|
||||
<svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01">
|
||||
</path>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="ml-4">
|
||||
<p class="text-sm font-medium text-gray-500">Meus Servidores</p>
|
||||
<p class="text-2xl font-bold text-gray-900"><?= $stats['my_servers'] ?? 0 ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Card 2 -->
|
||||
<div class="bg-white rounded-xl shadow-sm p-6 border border-gray-100 hover:shadow-md transition-shadow">
|
||||
<div class="flex items-center">
|
||||
<div class="p-3 rounded-full bg-green-50 text-green-600">
|
||||
<svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="ml-4">
|
||||
<p class="text-sm font-medium text-gray-500">Servidores Ativos</p>
|
||||
<p class="text-2xl font-bold text-gray-900"><?= $stats['active_servers'] ?? 0 ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Card 3 -->
|
||||
<div class="bg-white rounded-xl shadow-sm p-6 border border-gray-100 hover:shadow-md transition-shadow">
|
||||
<div class="flex items-center">
|
||||
<div class="p-3 rounded-full bg-red-50 text-red-600">
|
||||
<svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z">
|
||||
</path>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="ml-4">
|
||||
<p class="text-sm font-medium text-gray-500">Domínios Bloqueados</p>
|
||||
<p class="text-2xl font-bold text-gray-900"><?= $stats['total_blocked'] ?? 0 ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Card 4 -->
|
||||
<div class="bg-white rounded-xl shadow-sm p-6 border border-gray-100 hover:shadow-md transition-shadow">
|
||||
<div class="flex items-center">
|
||||
<div class="p-3 rounded-full bg-purple-50 text-purple-600">
|
||||
<svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z">
|
||||
</path>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="ml-4">
|
||||
<p class="text-sm font-medium text-gray-500">Ordens Recentes</p>
|
||||
<p class="text-2xl font-bold text-gray-900"><?= $stats['recent_orders'] ?? 0 ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-100 overflow-hidden">
|
||||
<div class="px-6 py-4 border-b border-gray-100 flex justify-between items-center">
|
||||
<h3 class="text-lg font-semibold text-gray-800">Últimas ordens de bloqueio</h3>
|
||||
<a href="/client/orders" class="text-primary-600 hover:text-primary-700 text-sm font-medium">Ver todas</a>
|
||||
</div>
|
||||
<div class="overflow-x-auto">
|
||||
<table class="w-full">
|
||||
<thead class="bg-gray-50">
|
||||
<tr>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">ID</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Título
|
||||
</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Tipo</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Início do
|
||||
Bloqueio</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Ações
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-100">
|
||||
<?php if (!empty($recent_orders)): ?>
|
||||
<?php foreach ($recent_orders as $order): ?>
|
||||
<tr class="hover:bg-gray-50 transition-colors">
|
||||
<td class="px-6 py-4 text-sm text-gray-500"><?= $order['id'] ?></td>
|
||||
<td class="px-6 py-4 text-sm font-medium text-gray-900"><?= htmlspecialchars($order['title']) ?>
|
||||
</td>
|
||||
<td class="px-6 py-4 text-sm">
|
||||
<span
|
||||
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full <?= $order['type'] == 'block' ? 'bg-red-100 text-red-800' : 'bg-green-100 text-green-800' ?>">
|
||||
<?= $order['type'] == 'block' ? 'Bloqueio' : 'Desbloqueio' ?>
|
||||
</span>
|
||||
</td>
|
||||
<td class="px-6 py-4 text-sm text-gray-500"><?= date('d/m/Y', strtotime($order['received_at'])) ?>
|
||||
</td>
|
||||
<td class="px-6 py-4 text-sm font-medium">
|
||||
<a href="/client/orders/view/<?= $order['id'] ?>"
|
||||
class="text-primary-600 hover:text-primary-900 hover:underline">Ver Detalhes</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<tr>
|
||||
<td colspan="5" class="px-6 py-4 text-center text-gray-500">Nenhuma ordem registrada.</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
79
resources/views/client/orders.php
Normal file
79
resources/views/client/orders.php
Normal file
@@ -0,0 +1,79 @@
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-100 overflow-hidden">
|
||||
<div class="px-6 py-4 border-b border-gray-100 bg-gray-50 flex justify-between items-center">
|
||||
<h3 class="text-lg font-semibold text-gray-800">Ordens Judiciais</h3>
|
||||
<form action="/client/orders" method="GET" class="relative">
|
||||
<input type="text" name="q" placeholder="Buscar ordem ou domínio..." value="<?= $_GET['q'] ?? '' ?>"
|
||||
class="pl-4 pr-10 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-500">
|
||||
<button type="submit" class="absolute right-0 top-0 mt-2 mr-3 text-gray-400 hover:text-primary-600">
|
||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
|
||||
</svg>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="overflow-x-auto">
|
||||
<table class="w-full">
|
||||
<thead class="bg-gray-50">
|
||||
<tr>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">ID</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Título
|
||||
</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Tipo</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Início do
|
||||
Bloqueio</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Ações
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-100">
|
||||
<?php if (!empty($orders)): ?>
|
||||
<?php foreach ($orders as $order): ?>
|
||||
<tr class="hover:bg-gray-50 transition-colors">
|
||||
<td class="px-6 py-4 text-sm text-gray-500"><?= $order['id'] ?></td>
|
||||
<td class="px-6 py-4 text-sm font-medium text-gray-900"><?= htmlspecialchars($order['title']) ?>
|
||||
</td>
|
||||
<td class="px-6 py-4 text-sm">
|
||||
<span
|
||||
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full <?= $order['type'] == 'block' ? 'bg-red-100 text-red-800' : 'bg-green-100 text-green-800' ?>">
|
||||
<?= $order['type'] == 'block' ? 'Bloqueio' : 'Desbloqueio' ?>
|
||||
</span>
|
||||
</td>
|
||||
<td class="px-6 py-4 text-sm text-gray-500"><?= date('d/m/Y', strtotime($order['received_at'])) ?>
|
||||
</td>
|
||||
<td class="px-6 py-4 text-sm font-medium">
|
||||
<a href="/client/orders/view/<?= $order['id'] ?>"
|
||||
class="text-primary-600 hover:text-primary-900 hover:underline">Ver Detalhes</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<tr>
|
||||
<td colspan="5" class="px-6 py-4 text-center text-gray-500">Nenhuma ordem encontrada.</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php if (isset($pagination) && $pagination['total'] > 1): ?>
|
||||
<div class="px-6 py-4 border-t border-gray-100 flex justify-between items-center">
|
||||
<div>
|
||||
<span class="text-sm text-gray-700">
|
||||
Página <span class="font-medium"><?= $pagination['current'] ?></span> de <span
|
||||
class="font-medium"><?= $pagination['total'] ?></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex space-x-2">
|
||||
<?php if ($pagination['prev']): ?>
|
||||
<a href="?page=<?= $pagination['prev'] ?><?= isset($_GET['q']) ? '&q=' . $_GET['q'] : '' ?>"
|
||||
class="px-3 py-1 border border-gray-300 rounded-md text-sm font-medium text-gray-700 hover:bg-gray-50">Anterior</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($pagination['next']): ?>
|
||||
<a href="?page=<?= $pagination['next'] ?><?= isset($_GET['q']) ? '&q=' . $_GET['q'] : '' ?>"
|
||||
class="px-3 py-1 border border-gray-300 rounded-md text-sm font-medium text-gray-700 hover:bg-gray-50">Próxima</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
78
resources/views/client/orders_view.php
Normal file
78
resources/views/client/orders_view.php
Normal file
@@ -0,0 +1,78 @@
|
||||
<div class="space-y-6">
|
||||
<!-- Order Info -->
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-100 p-6">
|
||||
<div class="flex justify-between items-start mb-6">
|
||||
<div>
|
||||
<h3 class="text-xl font-bold text-gray-900"><?= htmlspecialchars($order['title']) ?></h3>
|
||||
<p class="text-sm text-gray-500 mt-1">Recebido em:
|
||||
<?= date('d/m/Y H:i', strtotime($order['received_at'])) ?>
|
||||
</p>
|
||||
</div>
|
||||
<span
|
||||
class="px-3 py-1 rounded-full text-sm font-semibold <?= $order['type'] == 'block' ? 'bg-red-100 text-red-800' : 'bg-green-100 text-green-800' ?>">
|
||||
<?= $order['type'] == 'block' ? 'Bloqueio' : 'Desbloqueio' ?>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="prose max-w-none text-gray-700 bg-gray-50 p-4 rounded-lg border border-gray-200">
|
||||
<h4 class="text-sm font-bold text-gray-500 uppercase tracking-wider mb-2">Conteúdo da Ordem</h4>
|
||||
<style>
|
||||
.prose a {
|
||||
color: #2563eb;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.prose a:hover {
|
||||
color: #1e40af;
|
||||
}
|
||||
</style>
|
||||
<div class="prose max-w-none text-gray-700"><?= $order['content'] ?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Domains List -->
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-100 overflow-hidden">
|
||||
<div class="px-6 py-4 border-b border-gray-100 bg-gray-50 flex justify-between items-center">
|
||||
<h3 class="text-lg font-semibold text-gray-800">Domínios Afetados (<?= count($domains) ?>)</h3>
|
||||
</div>
|
||||
<div class="overflow-x-auto">
|
||||
<table class="w-full text-left border-collapse">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="px-6 py-3 text-xs font-medium text-gray-500 uppercase tracking-wider bg-gray-50">
|
||||
Domínio</th>
|
||||
<th class="px-6 py-3 text-xs font-medium text-gray-500 uppercase tracking-wider bg-gray-50">Ação
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-100">
|
||||
<?php if (!empty($domains)): ?>
|
||||
<?php foreach ($domains as $domain): ?>
|
||||
<tr class="hover:bg-gray-50 transition-colors">
|
||||
<td class="px-6 py-4 text-sm font-medium text-gray-900"><?= htmlspecialchars($domain['name']) ?>
|
||||
</td>
|
||||
<td class="px-6 py-4 text-sm">
|
||||
<span
|
||||
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full <?= $domain['action'] == 'block' ? 'bg-red-100 text-red-800' : 'bg-green-100 text-green-800' ?>">
|
||||
<?= $domain['action'] == 'block' ? 'Bloquear' : 'Desbloquear' ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<tr>
|
||||
<td colspan="2" class="px-6 py-4 text-center text-gray-500">Nenhum domínio listado nesta ordem.
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end">
|
||||
<a href="/client/orders"
|
||||
class="px-4 py-2 bg-gray-100 text-gray-700 rounded-lg hover:bg-gray-200 transition-colors">Voltar para
|
||||
Lista</a>
|
||||
</div>
|
||||
</div>
|
||||
91
resources/views/client/profile.php
Normal file
91
resources/views/client/profile.php
Normal file
@@ -0,0 +1,91 @@
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
<!-- Client Data (Read-only) -->
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-100 p-6">
|
||||
<h3 class="text-lg font-semibold text-gray-800 mb-4">Dados da Empresa</h3>
|
||||
<div class="space-y-4">
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-500">Razão Social / Nome</label>
|
||||
<p class="mt-1 text-gray-900 font-medium"><?= htmlspecialchars($client['name']) ?></p>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-500">ASN</label>
|
||||
<p class="mt-1 text-gray-900 font-medium"><?= htmlspecialchars($client['asn']) ?></p>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-500">Email de Contato</label>
|
||||
<p class="mt-1 text-gray-900 font-medium"><?= htmlspecialchars($client['email']) ?></p>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-500">Email Financeiro</label>
|
||||
<p class="mt-1 text-gray-900 font-medium"><?= htmlspecialchars($client['financial_email']) ?></p>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-500">Telegram ID</label>
|
||||
<p class="mt-1 text-gray-900 font-medium"><?= htmlspecialchars($client['telegram_id'] ?? '-') ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-6 p-4 bg-yellow-50 rounded-lg text-sm text-yellow-700">
|
||||
Para alterar estes dados, entre em contato com o administrador.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Change Password -->
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-100 p-6">
|
||||
<h3 class="text-lg font-semibold text-gray-800 mb-4">Alterar Senha</h3>
|
||||
|
||||
<?php if (isset($_SESSION['flash_error'])): ?>
|
||||
<div class="bg-red-50 text-red-700 p-3 rounded-lg mb-4 text-sm">
|
||||
<?= $_SESSION['flash_error'];
|
||||
unset($_SESSION['flash_error']); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (isset($_SESSION['flash_success'])): ?>
|
||||
<div class="bg-green-50 text-green-700 p-3 rounded-lg mb-4 text-sm">
|
||||
<?= $_SESSION['flash_success'];
|
||||
unset($_SESSION['flash_success']); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<form action="/client/profile/password" method="POST">
|
||||
<div class="space-y-4">
|
||||
<div class="bg-blue-50 border-l-4 border-blue-400 p-4 mb-4">
|
||||
<div class="flex">
|
||||
<div class="flex-shrink-0">
|
||||
<svg class="h-5 w-5 text-blue-400" viewBox="0 0 20 20" fill="currentColor">
|
||||
<path fill-rule="evenodd"
|
||||
d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z"
|
||||
clip-rule="evenodd" />
|
||||
</svg>
|
||||
</div>
|
||||
<div class="ml-3">
|
||||
<p class="text-sm text-blue-700">
|
||||
A senha deve ter no mínimo <strong>8 caracteres</strong>, contendo pelo menos
|
||||
<strong>uma letra maiúscula</strong> e <strong>um caractere especial</strong>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700 mb-1">Nova Senha</label>
|
||||
<input type="password" name="password"
|
||||
class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-transparent"
|
||||
required>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700 mb-1">Confirmar Nova Senha</label>
|
||||
<input type="password" name="confirm_password"
|
||||
class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-transparent"
|
||||
required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-6 flex justify-end">
|
||||
<button type="submit"
|
||||
class="px-4 py-2 bg-primary-600 text-white rounded-lg hover:bg-primary-700 transition-colors">
|
||||
Atualizar Senha
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
68
resources/views/client/servers.php
Normal file
68
resources/views/client/servers.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-100 overflow-hidden">
|
||||
<div class="px-6 py-4 border-b border-gray-100 bg-gray-50">
|
||||
<h3 class="text-lg font-semibold text-gray-800">Meus Servidores</h3>
|
||||
</div>
|
||||
<div class="overflow-x-auto">
|
||||
<table class="w-full text-left border-collapse">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="px-6 py-3 text-xs font-medium text-gray-500 uppercase tracking-wider bg-gray-50">Nome
|
||||
</th>
|
||||
<th class="px-6 py-3 text-xs font-medium text-gray-500 uppercase tracking-wider bg-gray-50">IP (v4)
|
||||
</th>
|
||||
<th class="px-6 py-3 text-xs font-medium text-gray-500 uppercase tracking-wider bg-gray-50">Serial
|
||||
Key</th>
|
||||
<th class="px-6 py-3 text-xs font-medium text-gray-500 uppercase tracking-wider bg-gray-50">Status
|
||||
</th>
|
||||
<th class="px-6 py-3 text-xs font-medium text-gray-500 uppercase tracking-wider bg-gray-50">Agente
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-100">
|
||||
<?php if (!empty($servers)): ?>
|
||||
<?php foreach ($servers as $server): ?>
|
||||
<?php
|
||||
$lastSeen = !empty($server['last_seen']) ? strtotime($server['last_seen']) : 0;
|
||||
$isOnline = $lastSeen && (time() - $lastSeen < 300); // 5 minutes
|
||||
$lastSeenText = $lastSeen ? date('d/m/Y H:i', $lastSeen) : 'Nunca';
|
||||
?>
|
||||
<tr class="hover:bg-gray-50 transition-colors">
|
||||
<td class="px-6 py-4 text-sm font-medium text-gray-900"><?= htmlspecialchars($server['name']) ?>
|
||||
</td>
|
||||
<td class="px-6 py-4 text-sm text-gray-500"><?= htmlspecialchars($server['ip_v4']) ?></td>
|
||||
<td class="px-6 py-4 text-sm text-gray-400 font-mono text-xs">
|
||||
<div class="flex items-center space-x-2">
|
||||
<span><?= substr($server['serial_key'], 0, 8) ?>...</span>
|
||||
<button onclick="navigator.clipboard.writeText('<?= $server['serial_key'] ?>')"
|
||||
class="text-primary-600 hover:text-primary-800" title="Copiar Serial Completo">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z">
|
||||
</path>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-6 py-4 text-sm">
|
||||
<span
|
||||
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full <?= $server['status'] == 'active' ? 'bg-green-100 text-green-800' : 'bg-gray-100 text-gray-800' ?>">
|
||||
<?= $server['status'] == 'active' ? 'Ativo' : 'Inativo' ?>
|
||||
</span>
|
||||
</td>
|
||||
<td class="px-6 py-4 text-sm">
|
||||
<span title="Visto por último: <?= $lastSeenText ?>"
|
||||
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full <?= $isOnline ? 'bg-green-100 text-green-800' : 'bg-red-100 text-red-800' ?>">
|
||||
<?= $isOnline ? 'Online' : 'Offline' ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<tr>
|
||||
<td colspan="4" class="px-6 py-4 text-center text-gray-500">Nenhum servidor cadastrado.</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user