Public web-only release: SvxPortal front-end + auth backend, install templates and INSTALL.md
Stripped from the internal repo: per-box deploy trees, Go services (nodelist/astmeta/proxy/svxdr), deploy/sync scripts and all secrets. Config templates for nginx, PHP-FPM, Redis and tmpfiles live in install/ with CHANGEME placeholders. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
require __DIR__ . '/lib.php';
|
||||
start_session();
|
||||
$uuid = $_SESSION['uid'] ?? null;
|
||||
if (!is_string($uuid) || $uuid === '') { header('Location: /'); exit; }
|
||||
$me = acct_get($uuid);
|
||||
$lvl = acct_admin_level($uuid);
|
||||
if ($lvl < 2) { header('Location: /'); exit; }
|
||||
|
||||
$page_title = 'Admin · Config — SvxPortal';
|
||||
require __DIR__ . '/header.php';
|
||||
?>
|
||||
<div class="container py-4" style="max-width:800px;">
|
||||
<div class="panel">
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<h5 class="mb-0">Configuration</h5>
|
||||
<div class="d-flex gap-2">
|
||||
<button type="button" class="btn btn-outline-secondary btn-sm" id="btnView">View</button>
|
||||
<button type="button" class="btn btn-warning btn-sm" id="btnEdit">Edit</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="viewMode">
|
||||
<pre id="cfgView" class="mono" style="font-size:.8rem; white-space:pre-wrap; margin:0; color:var(--fg);"></pre>
|
||||
</div>
|
||||
<div id="editMode" style="display:none;">
|
||||
<textarea class="form-control mono" id="cfgEditor" rows="25" style="font-size:.8rem; resize:vertical;"></textarea>
|
||||
<div class="d-flex gap-2 mt-3">
|
||||
<button type="button" class="btn btn-primary btn-sm" id="btnSave">Save</button>
|
||||
<button type="button" class="btn btn-warning btn-sm" id="btnSaveReload">Save & Reload</button>
|
||||
<button type="button" class="btn btn-outline-secondary btn-sm" id="btnDiscard">Discard</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="cfgMsg" class="small mt-2" style="display:none;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$extra_scripts = '<script>var ADMIN_LEVEL = ' . $lvl . ';</script><script src="/auth/admin_config.js"></script>';
|
||||
require __DIR__ . '/footer.php';
|
||||
?>
|
||||
Reference in New Issue
Block a user