first commit

This commit is contained in:
小喵 2022-07-11 19:56:44 +08:00
commit 788cf3e917
Signed by: mt
GPG key ID: 2BCF198BD3341FB3
47 changed files with 2007 additions and 0 deletions

23
webroot/logs/view.php Normal file
View file

@ -0,0 +1,23 @@
<?php
use MingTsay\Akanyan\App;
use MingTsay\Akanyan\LogsViewer;
require_once __DIR__ . '/../../vendor/autoload.php';
App::requireAllowed();
$file = $_GET['file'] ?? '';
$content = LogsViewer::read($file);
$list = LogsViewer::list();
if ($content === null)
App::render('configurations/not-found', [
'list' => $list,
]);
App::render('logs/view', [
'list' => $list,
'file' => $file,
'content' => $content,
]);