{$content}
HTML; } if (!$verified) { $pathEncoded = urlencode(virtualize_path($appPath)); $content = <<

Unverified App Installation

This app hasn’t been verified by THOS. Installing untrusted packages may put your system at risk.

Only continue if you trust this app and its source.

Install Anyway HTML; render_layout($content); exit; } if ($_SERVER['REQUEST_METHOD'] === 'POST' && ($_POST['confirm'] ?? '') === '1') { require_once 'pkg.php'; $result = installPackage($appPath, __DIR__ . "/apps/"); $content = $result ? <<

Success!

The app has been installed successfully.

HTML : <<

Installation Failed

Something went wrong. Check your server logs for more details.

HTML; render_layout($content); exit; } // Confirm UI $appName = basename($appPath); $content = <<

Install {$appName}?

This app is ready to be installed into your system. Continue?

Cancel
HTML; render_layout($content);