Files
reflector-dashboard/auth/admin_control.php
T
bjorneandClaude Fable 5.1 25b481e2ae 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>
2026-09-26 23:07:05 +02:00

30 lines
1.1 KiB
PHP

<?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 · Control — SvxPortal';
require __DIR__ . '/header.php';
?>
<div class="container py-4" style="max-width:800px;">
<div class="panel">
<h5 class="mb-3">Service Control</h5>
<div id="svcStatus" class="small mb-3 text-secondary">Checking...</div>
<div class="d-flex gap-2 flex-wrap">
<button type="button" class="btn btn-primary btn-sm" id="btnReload">Reload Config</button>
<button type="button" class="btn btn-warning btn-sm" id="btnRestart">Restart Service</button>
<button type="button" class="btn btn-danger btn-sm" id="btnStop">Shutdown</button>
</div>
<div id="svcMsg" class="small mt-2" style="display:none;"></div>
</div>
</div>
<?php
$extra_scripts = '<script>var ADMIN_LEVEL = ' . $lvl . ';</script><script src="/auth/admin_control.js"></script>';
require __DIR__ . '/footer.php';
?>