40 lines
1.6 KiB
PHP
40 lines
1.6 KiB
PHP
<?php
|
|
/*
|
|
* Reflector Dashboard — web front-end for SvxReflector
|
|
* Copyright (C) 2026 SA7AUX (Björn)
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify it under
|
|
* the terms of the GNU Affero General Public License as published by the Free
|
|
* Software Foundation, either version 3 of the License, or (at your option) any
|
|
* later version. See the LICENSE file for details.
|
|
*/
|
|
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 — Reflector Dashboard';
|
|
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';
|
|
?>
|