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>
63 lines
2.4 KiB
PHP
63 lines
2.4 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 · Certificates — SvxPortal';
|
|
require __DIR__ . '/header.php';
|
|
?>
|
|
<div class="container py-4" style="max-width:900px;">
|
|
<div class="panel">
|
|
<div class="d-flex justify-content-between align-items-center flex-wrap gap-2 mb-3">
|
|
<h5 class="mb-0">Certificate Admin</h5>
|
|
<select id="certView" class="form-select form-select-sm" style="width:auto;">
|
|
<option value="certs">Issued certificates</option>
|
|
<option value="pending">Pending CSRs</option>
|
|
</select>
|
|
</div>
|
|
<div id="certMsg" class="small mb-2" style="display:none;"></div>
|
|
|
|
<!-- Issued certs -->
|
|
<div id="viewCerts">
|
|
<div class="table-responsive">
|
|
<table class="data-table">
|
|
<thead><tr><th>Callsign</th><th>Issued</th><th style="text-align:right;">Actions</th></tr></thead>
|
|
<tbody id="certsBody"><tr><td colspan="3" class="text-secondary">Loading…</td></tr></tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Pending CSRs -->
|
|
<div id="viewPending" style="display:none;">
|
|
<div class="table-responsive">
|
|
<table class="data-table">
|
|
<thead><tr><th>Callsign</th><th>Received</th><th>Subject</th><th style="text-align:right;">Actions</th></tr></thead>
|
|
<tbody id="pendingBody"><tr><td colspan="4" class="text-secondary">Loading…</td></tr></tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Cert info modal -->
|
|
<div class="modal fade" id="certInfoModal" tabindex="-1" aria-hidden="true">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content" style="background:#111; border:1px solid var(--line);">
|
|
<div class="modal-header" style="border-color:var(--line);">
|
|
<h5 class="modal-title" id="certInfoTitle">Certificate</h5>
|
|
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
</div>
|
|
<div class="modal-body mono small" id="certInfoBody" style="word-break:break-all;"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
$extra_scripts = '<script>var ADMIN_LEVEL = ' . $lvl . ';</script><script src="/auth/admin_certs.js"></script>';
|
|
require __DIR__ . '/footer.php';
|
|
?>
|