39 lines
1.6 KiB
PHP
39 lines
1.6 KiB
PHP
@php
|
|
$fieldMap = [
|
|
'service_host' => 'Địa chỉ IP',
|
|
'service_username' => 'Username',
|
|
'service_port' => 'Port',
|
|
'service_password' => 'Mật khẩu',
|
|
'os_name' => 'Hệ điều hành',
|
|
];
|
|
$iconMap = [
|
|
'service_host' => 'internet.png',
|
|
'service_username' => 'admin.png',
|
|
'service_password' => 'password.png',
|
|
];
|
|
$rows = collect($fields ?? array_keys($fieldMap))->filter(fn($key) => isset($fieldMap[$key]))->values();
|
|
@endphp
|
|
<p style="color: #f16723;"><strong>THÔNG TIN TRUY CẬP VPS</strong></p>
|
|
|
|
<table cellpadding="0" cellspacing="0" border="0" style="width: 100%; table-layout: fixed; border: 1px solid #e8e8e8; border-right: 0;">
|
|
<tbody>
|
|
@foreach($rows as $i => $key)
|
|
<tr @if($i % 2 === 1) bgcolor="#FFF1E6" @endif>
|
|
<td style="padding: 7px 11px; border-right: 1px solid #e8e8e8; width: 200px;">
|
|
@if(isset($iconMap[$key]))
|
|
<img src="{{ asset('images/emails/' . $iconMap[$key]) }}" alt="" width="16" height="17" style="vertical-align: text-bottom; margin-right: 4px;">
|
|
@endif
|
|
{{ $fieldMap[$key] }}:
|
|
</td>
|
|
<td style="padding: 7px 11px; border-right: 1px solid #e8e8e8;">
|
|
@if($key === 'service_password')
|
|
<code style="background: #f5f5f5; padding: 2px 6px; border-radius: 4px; font-size: 13px;">{{ $data[$key] ?? '—' }}</code>
|
|
@else
|
|
<strong>{{ $data[$key] ?? '—' }}</strong>
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|