mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 11:09:18 +02:00
admin: add server log viewer; fix curl_close() PHP 8.5 deprecation in status.php
- public/admin/logs.php: new page tailing nginx error/access + PHP-FPM logs. Selector for log file and line count (50/100/200/500, default 100). Lines reversed (newest first), colour-coded by severity, numbered gutter. Graceful degradation when exec() unavailable or file unreadable (dev msg). - templates/admin/head.php: 'Journaux' nav link added after 'Statut'. - public/admin/status.php: remove curl_close() call deprecated in PHP 8.5 (no-op since PHP 8.0); replace with unset($ch) to silence the warning that was leaking raw text above the page output.
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
<a href="/admin/pages.php" class="admin-nav__link <?= in_array($currentPage, ['pages.php','pages-edit.php']) ? 'active' : '' ?>">Pages statiques</a>
|
||||
<a href="/admin/tags.php" class="admin-nav__link <?= $currentPage === 'tags.php' ? 'active' : '' ?>">Mots-clés</a>
|
||||
<a href="/admin/status.php" class="admin-nav__link <?= $currentPage === 'status.php' ? 'active' : '' ?>">Statut</a>
|
||||
<a href="/admin/logs.php" class="admin-nav__link <?= $currentPage === 'logs.php' ? 'active' : '' ?>">Journaux</a>
|
||||
<?php if ($thesisId && in_array($currentPage, ['edit.php', 'thanks.php'])): ?>
|
||||
<a href="/admin/edit.php?id=<?= intval($thesisId) ?>" class="admin-nav__link <?= $currentPage === 'edit.php' ? 'active' : '' ?>">Modifier</a>
|
||||
<?php endif; ?>
|
||||
|
||||
Reference in New Issue
Block a user