diff options
| author | Connor Thomson <blumatrikz@gmail.com> | 2026-09-19 10:51:36 -0700 |
|---|---|---|
| committer | Connor Thomson <blumatrikz@gmail.com> | 2026-09-19 10:51:36 -0700 |
| commit | 56336ee3d5ec32647f6dbf35cf09f94a13795b60 (patch) | |
| tree | 5c519a352700e0241895d64d14b59b0cfd5c27d2 /app.php | |
| parent | 01b6e0d9b7b65b0612c3e0fe9c3f82672931b51f (diff) | |
Random fixes and updates
Diffstat (limited to 'app.php')
| -rwxr-xr-x[-rw-r--r--] | app.php | 19 |
1 files changed, 12 insertions, 7 deletions
@@ -24,17 +24,22 @@ define('ROOT_DIR', __DIR__ . '/'); define('HTML_DIR', __DIR__ . '/html/'); define('PHP_DIR', __DIR__ . '/php/'); -require_once PHP_DIR . 'templates.php'; +require_once PHP_DIR . 'replace.php'; +require_once PHP_DIR . 'execute.php'; +require_once PHP_DIR . 'path-clean.php'; -$file = $_GET['file'] ?? 'index.html'; +$file = path_clean($_GET['file'] ?? 'index.html'); -$components = [ - '{{HEADER}}' => HTML_DIR . 'header.html', - '{{CONTENT}}' => ROOT_DIR . $file, - '{{FOOTER}}' => PHP_DIR . 'footer.php' +$device = 'desktop'; + +$targets = [ + '{{header}}' => file_get_contents(HTML_DIR . 'header.html'), + '{{content}}' => file_get_contents(ROOT_DIR . $file), + '{{footer}}' => execute(PHP_DIR . 'footer.php'), + '{{device}}' => $device ]; -$app_html = template_process(HTML_DIR . 'app.html', $components); +$app_html = replace(HTML_DIR . 'app.html', $targets); echo $app_html; ?> |
