'https://tgs.com.vn/premium-hosting/',
'Cloud Server' => 'https://tgs.com.vn/cloud-server/',
'Thuê Server' => 'https://tgs.com.vn/may-chu-rieng',
'Thiết kế website' => 'https://tgs.com.vn/thiet-ke-website/',
];
public static function wrap(string $bodyHtml): string
{
return self::header() . $bodyHtml . self::footer();
}
public static function page(string $innerHtml): string
{
return self::wrap(self::body($innerHtml));
}
public static function body(string $innerHtml): string
{
return '
| '
. $innerHtml
. ' |
';
}
public static function title(string $html): string
{
return '' . $html . '
';
}
public static function subtitle(string $html): string
{
return '' . $html . '
';
}
public static function highlight(string $html): string
{
return ''
. '| '
. '' . $html . ''
. ' |
';
}
public static function heading(string $html): string
{
return '' . $html . '
';
}
public static function greeting(string $nameHtml): string
{
return 'Kính chào ' . $nameHtml . ',
';
}
public static function paragraph(string $html): string
{
return '' . $html . '
';
}
public static function button(string $url, string $label): string
{
return '';
}
public static function note(string $html, string $label = 'Lưu ý:'): string
{
return ''
. '| '
. '' . $label . ' ' . $html
. ' |
';
}
public static function autoNotice(): string
{
return self::note('Đây là email được gửi tự động. Vui lòng không trả lời email này.');
}
public static function supportLine(): string
{
return self::paragraph('Mọi thắc mắc xin liên hệ support@tgs.com.vn hoặc (028) 7309. 7379.');
}
/**
* @param array $rows label => value HTML (đã escape)
*/
public static function infoTable(array $rows, string $extraRowsHtml = ''): string
{
$html = '';
foreach ($rows as $label => $value) {
$html .= self::row($label, $value);
}
return ''
. $html . $extraRowsHtml
. '
';
}
public static function row(string $label, string $valueHtml): string
{
return '| ' . $label . ' | '
. '' . $valueHtml . ' |
';
}
public static function header(): string
{
return <<<'HTML'
HTML;
}
public static function footer(): string
{
return ''
. ' |
';
}
private static function serviceBanner(): string
{
$cells = '';
foreach (self::SERVICE_LINKS as $label => $url) {
$cells .= ''
. '' . $label . ' | ';
}
return '| '
. ' |
';
}
private static function companyInfo(): string
{
$line = fn (string $html, string $padding = '6px 30px 0 30px') => '| ' . $html . ' |
';
$text = 'box-sizing: border-box; font-size: 12px; line-height: 18px; color: #ffffff;';
return $line('CÔNG TY CỔ PHẦN GIẢI PHÁP CÔNG NGHỆ THẾ GIỚI SỐ')
. $line('Tel: (028) 7309. 7379 - MST: 0318443116')
. $line('Email: support@tgs.com.vn')
. $line('🥇 Thế Giới Số 🥇 - Premium HOSTING • CLOUD • SERVER & WEBSITE | 15+ năm Phụng Sự🚀', '6px 30px 16px 30px');
}
public static function document(?string $title, string $bodyHtml): string
{
$safeTitle = htmlspecialchars((string) $title, ENT_QUOTES, 'UTF-8');
return <<
{$safeTitle}
{$bodyHtml}
HTML;
}
}