diff --git a/logfiles_viewer.php b/logfiles_viewer.php index 63207132..a0e8be0c 100644 --- a/logfiles_viewer.php +++ b/logfiles_viewer.php @@ -1,5 +1,5 @@ "; + $error_log_content = implode("\n", $result); } else { $error_log_content = "Error-Log" . (AREA == 'admin' ? " '" . $error_log . "'" : "") . " does not seem to exist"; } @@ -78,7 +79,22 @@ if (function_exists('exec')) { $access_log_content = "Access-Log" . (AREA == 'admin' ? " '" . $access_log . "'" : "") . " does not seem to exist"; } - eval("echo \"" . \Froxlor\UI\Template::getTemplate("logfiles_viewer/index", true) . "\";"); + UI::twigBuffer('user/logfiles.html.twig', [ + 'error_log_content' => $error_log_content, + 'access_log_content' => $access_log_content, + 'actions_links' => [[ + 'class' => 'btn-secondary', + 'href' => $linker->getLink(['section' => 'domains', 'page' => 'domains', 'action' => 'edit', 'id' => $domain_id]), + 'label' => $lng['panel']['edit'], + 'icon' => 'fa fa-pen' + ], [ + 'class' => 'btn-secondary', + 'href' => $linker->getLink(['section' => 'domains', 'page' => 'domains']), + 'label' => $lng['menue']['domains']['domains'], + 'icon' => 'fa fa-globe' + ]] + ]); + UI::twigOutputBuffer(); } else { if (AREA == 'admin') { \Froxlor\UI\Response::dynamic_error('You need to allow the exec() function in the froxlor-vhost php-config'); diff --git a/templates/Froxlor/src/scss/_global.scss b/templates/Froxlor/src/scss/_global.scss index c4215f4a..a83e103c 100644 --- a/templates/Froxlor/src/scss/_global.scss +++ b/templates/Froxlor/src/scss/_global.scss @@ -57,3 +57,7 @@ footer { @extend .text-muted; } + +.logcontent { + width: 100%; +} diff --git a/templates/Froxlor/user/logfiles.html.twig b/templates/Froxlor/user/logfiles.html.twig new file mode 100644 index 00000000..2b411c66 --- /dev/null +++ b/templates/Froxlor/user/logfiles.html.twig @@ -0,0 +1,25 @@ +{% extends "Froxlor/userarea.html.twig" %} + +{% block content %} + +
+
+

Error-Log

+ +

Access-Log

+ +
+
+ {% if actions_links is iterable %} + {% for link in actions_links %} + + + {{ link.label }} + {% endfor %} + {% endif %} +
+
+{% endblock %}