mirror of
https://git.steelants.cz/SH/PHP_SMART_HOME_V3.git
synced 2026-10-11 09:45:33 +00:00
35 lines
562 B
PHP
35 lines
562 B
PHP
<?php
|
|
|
|
|
|
class Log extends Template
|
|
{
|
|
function __construct()
|
|
{
|
|
global $userManager;
|
|
global $langMng;
|
|
|
|
if (!$userManager->isLogin()){
|
|
header('Location: ./login');
|
|
}
|
|
|
|
$template = new Template('log');
|
|
$template->prepare('title', 'Log');
|
|
|
|
$result = array();
|
|
$cdir = scandir('./app/logs/');
|
|
foreach ($cdir as $key => $value)
|
|
{
|
|
if (!in_array($value,array(".","..", ".gitkeep")))
|
|
{
|
|
$result[$value] = $value;
|
|
}
|
|
}
|
|
|
|
$template->prepare('logsFiles', $result);
|
|
$template->prepare('langMng', $langMng);
|
|
|
|
$template->render();
|
|
|
|
}
|
|
}
|