diff --git a/panel/lib/AccountManager.php b/panel/lib/AccountManager.php index 28acbde..da3fc87 100644 --- a/panel/lib/AccountManager.php +++ b/panel/lib/AccountManager.php @@ -33,8 +33,18 @@ class AccountManager { self::shell("sudo chmod 750 {$homeDir}"); self::shell("sudo chmod 775 {$docRoot}"); - // Default index page (write as root via sudo tee) - $html = "
Hosted by NovaCPX
"; + // Default index page — use custom template from settings if set, else built-in + $customTpl = null; + try { + $db2 = DB::getInstance(); + $tplRow = $db2->fetchOne("SELECT value FROM settings WHERE key='default_index_template'"); + $customTpl = $tplRow ? trim($tplRow['value']) : null; + } catch (Throwable $e) {} + + $html = $customTpl + ? str_replace(['{domain}', '{username}'], [$domain, $username], $customTpl) + : "\n\n\n\nYour website is ready. Upload your files to get started.
\nHosted by NovaCPX\n
+ HTML shown when a new hosting account is created. Use {domain} and {username} as placeholders. Leave blank to use the built-in styled template.
+