mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-07 03:29:19 +02:00
All admin pages refactored to thin controllers + pure view templates, mirroring the public-page pattern: Controllers (public/admin/*.php): auth, data loading, include template Views (templates/admin/*.php): pure HTML/PHP output Fragment partials (templates/admin/partials/): toast, system-log-panel, system-nginx-config-panel Pages migrated: login, tags, contenus, contenus-edit, account, acces-etudiante, thanks, add, edit, parametres, system, index Fragment endpoints refactored: system-fragment.php, toast-fragment.php Skipped (pure redirects): logout, logs, status, import
41 lines
1.8 KiB
PHP
41 lines
1.8 KiB
PHP
<?php if ($nginxConfigMeta): ?>
|
|
<div class="log-meta">
|
|
<span data-label="Fichier"><?= htmlspecialchars($nginxConfigMeta['path']) ?></span>
|
|
<span data-label="Taille"><?= $nginxConfigMeta['size'] ?></span>
|
|
<span data-label="Modifié"><?= $nginxConfigMeta['mtime'] ?></span>
|
|
<?php if ($nginxConfigSource === 'live'): ?>
|
|
<span class="nginx-source-badge nginx-source-badge--live">● Config déployée</span>
|
|
<?php else: ?>
|
|
<span class="nginx-source-badge nginx-source-badge--local">⚠ Référence locale (config live inaccessible)</span>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($nginxConfigError !== null): ?>
|
|
<div class="log-unavailable">
|
|
<strong>Configuration nginx non disponible</strong>
|
|
<div class="log-unavail-path"><?= htmlspecialchars($nginxConfigError) ?></div>
|
|
<?php if (php_sapi_name() === 'cli-server'): ?>
|
|
<div class="log-unavail-dev">
|
|
En développement, <code>/etc/nginx/sites-available/posterg</code> n'existe pas.
|
|
La config de référence se trouve dans <code>nginx/posterg.conf</code>.
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
<?php elseif (empty($nginxConfigLines)): ?>
|
|
<div class="log-empty">Le fichier de configuration est vide.</div>
|
|
|
|
<?php else: ?>
|
|
<div class="log-output" id="log-output" role="region" aria-label="Configuration nginx">
|
|
<button class="log-copy-btn" id="log-copy-btn" type="button" title="Copier la configuration"
|
|
onclick="copyLogContent(this);return false">
|
|
Copier
|
|
</button>
|
|
<?php foreach ($nginxConfigLines as $i => $line): ?>
|
|
<span class="log-line <?= SystemController::nginxLineClass($line) ?>"
|
|
data-n="<?= $i + 1 ?>"><?= htmlspecialchars($line, ENT_QUOTES | ENT_SUBSTITUTE) ?></span>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
<?php endif; ?>
|