first commit
This commit is contained in:
commit
788cf3e917
47 changed files with 2007 additions and 0 deletions
27
webroot/configurations/view.php
Normal file
27
webroot/configurations/view.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
use MingTsay\Akanyan\App;
|
||||
use MingTsay\Akanyan\ConfigFilesViewer;
|
||||
|
||||
require_once __DIR__ . '/../../vendor/autoload.php';
|
||||
|
||||
App::requireAllowed();
|
||||
|
||||
$file = $_GET['file'] ?? '';
|
||||
$content = ConfigFilesViewer::read($file);
|
||||
$list = ConfigFilesViewer::list();
|
||||
|
||||
if ($content === null)
|
||||
App::render('configurations/not-found', [
|
||||
'list' => $list,
|
||||
]);
|
||||
|
||||
App::render('configurations/view', [
|
||||
'list' => $list,
|
||||
'file' => $file,
|
||||
'content' => $content,
|
||||
'type' => [
|
||||
'json' => 'json',
|
||||
'properties' => '.properties',
|
||||
][pathinfo($file, PATHINFO_EXTENSION)],
|
||||
]);
|
||||
Loading…
Add table
Add a link
Reference in a new issue