37 lines
656 B
PHP
Raw Normal View History

2019-09-01 15:55:33 +02:00
<?php
class Log extends Template
{
function __construct()
{
global $userManager;
2019-10-11 14:12:05 +02:00
global $langMng;
2019-09-01 15:55:33 +02:00
if (!$userManager->isLogin()){
2019-10-11 16:32:05 +02:00
header('Location: ' . BASEDIR . 'login');
2019-09-01 15:55:33 +02:00
}
$template = new Template('log');
$template->prepare('title', 'Log');
$result = array();
2019-09-19 14:48:31 +02:00
$cdir = scandir('./app/logs/');
2019-09-01 15:55:33 +02:00
foreach ($cdir as $key => $value)
{
if (!in_array($value,array(".","..", ".gitkeep")))
2019-09-01 15:55:33 +02:00
{
$result[$value] = $value;
}
}
2019-10-11 16:38:20 +02:00
$template->prepare('baseDir', BASEDIR);
$template->prepare('title', 'Logy');
2019-09-01 15:55:33 +02:00
$template->prepare('logsFiles', $result);
2019-10-11 14:12:05 +02:00
$template->prepare('langMng', $langMng);
2019-09-01 15:55:33 +02:00
$template->render();
}
}