38471-vm/patch_receipt.php
2026-02-26 05:15:35 +00:00

16 lines
811 B
PHP

<?php
$content = file_get_contents('index.php');
$search = <<<'HTML'
<h3 class="mb-1 fw-bold"><?= htmlspecialchars($data['settings']['company_name'] ?? 'Accounting System') ?></h3>
<p class="text-muted small mb-0"><?= nl2br(htmlspecialchars($data['settings']['company_address'] ?? '')) ?></p>
HTML;
$replace = <<<'HTML'
<h3 class="mb-1 fw-bold" id="receiptCompanyName"><?= htmlspecialchars($data['settings']['company_name'] ?? 'Accounting System') ?></h3>
<p class="text-muted small mb-0" id="receiptCompanyAddress"><?= nl2br(htmlspecialchars($data['settings']['company_address'] ?? '')) ?></p>
HTML;
$content = str_replace($search, $replace, $content);
file_put_contents('index.php', $content);