mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-12 05:48:17 +02:00
Enhanced abuse ticket view
This commit is contained in:
parent
14c3fc2e6a
commit
3d0e90c7fa
2 changed files with 38 additions and 0 deletions
|
@ -151,6 +151,15 @@ class SupportController extends Controller
|
|||
WHERE tr.ticket_id = ?
|
||||
ORDER BY tr.date_created ASC', [$ticketNumber]);
|
||||
$category = $db->selectValue('SELECT name FROM ticket_categories WHERE id = ?', [$ticket['category_id']]);
|
||||
|
||||
$subject = $ticket['subject'];
|
||||
|
||||
// Extract the domain (last word that looks like a domain)
|
||||
if (preg_match('/\b([a-z0-9.-]+\.[a-z]{2,})\b/i', $subject, $matches)) {
|
||||
$domainName = $matches[1];
|
||||
} else {
|
||||
$domainName = null;
|
||||
}
|
||||
|
||||
$_SESSION['current_ticket'] = [$ticket['id']];
|
||||
return view($response,'admin/support/viewTicket.twig', [
|
||||
|
@ -158,6 +167,7 @@ class SupportController extends Controller
|
|||
'replies' => $replies,
|
||||
'category' => $category,
|
||||
'currentUri' => $uri,
|
||||
'domain_name' => $domainName,
|
||||
'user_id' => $_SESSION['auth_user_id']
|
||||
]);
|
||||
} else {
|
||||
|
|
|
@ -26,6 +26,34 @@
|
|||
{{ __('Ticket Overview') }}
|
||||
</h2>
|
||||
</div>
|
||||
{% if ticket.category_id == 8 and domain_name %}
|
||||
<!-- Page title actions -->
|
||||
<div class="col-auto ms-auto d-print-none">
|
||||
<div class="btn-list">
|
||||
<a href="https://dnsrecords.io/{{ domain_name }}" target="_blank" class="btn btn-secondary d-none d-sm-inline-block">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z" /><path d="M3 12m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z" /><path d="M7 8l0 .01" /><path d="M7 16l0 .01" /></svg>
|
||||
{{ __('DNS Records') }}
|
||||
</a>
|
||||
<a href="https://dnsrecords.io/{{ domain_name }}" target="_blank" class="btn btn-secondary d-sm-none btn-icon" aria-label="{{ __('DNS Records') }}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z" /><path d="M3 12m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z" /><path d="M7 8l0 .01" /><path d="M7 16l0 .01" /></svg>
|
||||
</a>
|
||||
<a href="https://whois.domaintools.com/{{ domain_name }}" target="_blank" class="btn btn-secondary d-none d-sm-inline-block">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" /><path d="M21 21l-6 -6" /></svg>
|
||||
{{ __('WHOIS Lookup') }}
|
||||
</a>
|
||||
<a href="https://whois.domaintools.com/{{ domain_name }}" target="_blank" class="btn btn-secondary d-sm-none btn-icon" aria-label="{{ __('WHOIS Lookup') }}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" /><path d="M21 21l-6 -6" /></svg>
|
||||
</a>
|
||||
<a href="https://www.virustotal.com/gui/domain/{{ domain_name }}/detection" target="_blank" class="btn btn-secondary d-none d-sm-inline-block">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 3a12 12 0 0 0 8.5 3a12 12 0 0 1 -8.5 15a12 12 0 0 1 -8.5 -15a12 12 0 0 0 8.5 -3" /></svg>
|
||||
VirusTotal
|
||||
</a>
|
||||
<a href="https://www.virustotal.com/gui/domain/{{ domain_name }}/detection" target="_blank" class="btn btn-secondary d-sm-none btn-icon" aria-label="VirusTotal">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 3a12 12 0 0 0 8.5 3a12 12 0 0 1 -8.5 15a12 12 0 0 1 -8.5 -15a12 12 0 0 0 8.5 -3" /></svg>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue