- Added PleskDomainService for managing domain operations (create, update, remove, get info). - Introduced PleskHostingService for provisioning hosting accounts and notifying customers. - Created PleskService for handling API requests to Plesk. - Added migration to include 'type' column in dns_manager_servers table. - Created migration for module_hosting_accounts table to track hosting subscriptions. - Created migration for module_hosting_plesk_clients table to manage Plesk client credentials. - Added email templates for notifying customers and admins about hosting account creation.
131 lines
6.2 KiB
PHP
131 lines
6.2 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="vi">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Thông báo hosting mới</title>
|
|
<style>
|
|
* { box-sizing: border-box; }
|
|
body { font-family: 'Segoe UI', Arial, sans-serif; background: #f0f4f8; margin: 0; padding: 0; }
|
|
.wrapper { max-width: 620px; margin: 30px auto; }
|
|
.card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
|
|
.header { background: linear-gradient(135deg, #f06824 0%, #d9531a 100%); padding: 36px 40px; text-align: center; }
|
|
.header .icon { font-size: 48px; margin-bottom: 12px; }
|
|
.header h1 { color: #fff; margin: 0 0 6px; font-size: 22px; font-weight: 700; }
|
|
.header p { color: #fde3d3; margin: 0; font-size: 14px; }
|
|
.body { padding: 36px 40px; }
|
|
.section-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #9ca3af; margin: 24px 0 10px; }
|
|
.section-label:first-child { margin-top: 0; }
|
|
.info-table { width: 100%; border-collapse: collapse; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
|
|
.info-table td { padding: 10px 16px; font-size: 14px; border-bottom: 1px solid #f3f4f6; }
|
|
.info-table tr:last-child td { border-bottom: none; }
|
|
.info-table td:first-child { color: #6b7280; width: 45%; }
|
|
.info-table td:last-child { font-weight: 600; color: #111827; }
|
|
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
|
|
.badge-green { background: #dcfce7; color: #15803d; }
|
|
.cred-box { background: #fff7ed; border: 1.5px solid #fdba74; border-radius: 10px; padding: 20px 24px; margin-top: 10px; }
|
|
.cred-row { display: flex; align-items: center; padding: 8px 0; border-bottom: 1px solid #fed7aa; }
|
|
.cred-row:last-child { border-bottom: none; }
|
|
.cred-label { color: #c2410c; font-size: 13px; width: 150px; flex-shrink: 0; }
|
|
.cred-value { font-family: 'Courier New', monospace; font-size: 14px; font-weight: 700; color: #111827; word-break: break-all; }
|
|
.note { margin-top: 16px; font-size: 12px; color: #9ca3af; }
|
|
.footer { text-align: center; padding: 20px 40px; border-top: 1px solid #f3f4f6; font-size: 12px; color: #9ca3af; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="wrapper">
|
|
<div class="card">
|
|
<div class="header">
|
|
<div class="icon">🖥️</div>
|
|
<h1>Hosting account mới được khởi tạo</h1>
|
|
<p>{{ $domain_name ?? 'N/A' }} — {{ $created_at ?? now()->format('d/m/Y H:i:s') }}</p>
|
|
</div>
|
|
|
|
<div class="body">
|
|
<div class="section-label">Thông tin khách hàng</div>
|
|
<table class="info-table">
|
|
<tr>
|
|
<td>Tên khách hàng</td>
|
|
<td>{{ $customer_name ?? 'N/A' }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Email</td>
|
|
<td>{{ $customer_email ?? 'N/A' }}</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<div class="section-label">Thông tin dịch vụ Hosting</div>
|
|
<table class="info-table">
|
|
<tr>
|
|
<td>Tên miền</td>
|
|
<td>{{ $domain_name ?? 'N/A' }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Gói hosting</td>
|
|
<td>{{ $hosting_plan ?? 'N/A' }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Server</td>
|
|
<td>{{ $server_name ?? 'N/A' }} ({{ $server_ip ?? 'N/A' }})</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Plesk Client ID</td>
|
|
<td>{{ $plesk_client_id ?? 'N/A' }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Plesk Subscription ID</td>
|
|
<td>{{ $plesk_subscription_id ?? 'N/A' }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Trạng thái</td>
|
|
<td><span class="badge badge-green">✅ Active</span></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<div class="section-label">Tài khoản FTP / System User (đã gửi cho khách)</div>
|
|
<div class="cred-box">
|
|
<div class="cred-row">
|
|
<span class="cred-label">👤 FTP Username</span>
|
|
<span class="cred-value">{{ $ftp_username ?? 'N/A' }}</span>
|
|
</div>
|
|
@if(!empty($ftp_password))
|
|
<div class="cred-row">
|
|
<span class="cred-label">🔑 FTP Password</span>
|
|
<span class="cred-value">{{ $ftp_password }}</span>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
|
|
<div class="section-label">Tài khoản đăng nhập Plesk Panel của khách hàng</div>
|
|
<div class="cred-box">
|
|
<div class="cred-row">
|
|
<span class="cred-label">🌐 Panel URL</span>
|
|
<span class="cred-value">{{ $plesk_panel_url ?? 'N/A' }}</span>
|
|
</div>
|
|
<div class="cred-row">
|
|
<span class="cred-label">👤 Login</span>
|
|
<span class="cred-value">{{ $plesk_login ?? 'N/A' }}</span>
|
|
</div>
|
|
@if(!empty($plesk_password))
|
|
<div class="cred-row">
|
|
<span class="cred-label">🔑 Password</span>
|
|
<span class="cred-value">{{ $plesk_password }}</span>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
<div class="note">
|
|
Đây là tài khoản Plesk riêng của khách hàng (đã gửi kèm cho khách), khác với tài khoản quản trị
|
|
của server dùng chung — tài khoản quản trị server không được đính kèm trong email này vì lý do
|
|
bảo mật.
|
|
</div>
|
|
</div>
|
|
|
|
<div class="footer">
|
|
© {{ date('Y') }} {{ $company_name ?? 'Portal Admin' }} — Hệ thống quản lý dịch vụ<br>
|
|
Email này được gửi tự động. Vui lòng không trả lời.
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|