82 lines
1.6 KiB
PHP
Executable File
82 lines
1.6 KiB
PHP
Executable File
<?php define('__ROOT__', dirname(dirname(dirname(__FILE__))) );
|
|
require_once __ROOT__.'/vendor/autoload.php';
|
|
use \api\core\Request;
|
|
use \generic\core\View;
|
|
?>
|
|
|
|
<!-- [1] Gestion du sous-menu de gauche -->
|
|
|
|
<nav class='sub-menu-side'>
|
|
<span data-sublink='view'>
|
|
<span class='svg'><?php echo file_get_contents( __PUBLIC__.'/src/static/sub-menu-side/view.svg' ); ?></span>
|
|
<span>Tout afficher</span>
|
|
</span>
|
|
|
|
<span data-sublink='details' >
|
|
<span class='svg'><?php echo file_get_contents( __PUBLIC__.'/src/static/sub-menu-side/filter.svg' ); ?></span>
|
|
<span>Détails</span>
|
|
</span>
|
|
|
|
<span data-sublink='archive' >
|
|
<span class='svg'><?php echo file_get_contents( __PUBLIC__.'/src/static/sub-menu-side/archive.svg' ); ?></span>
|
|
<span>Archiver</span>
|
|
</span>
|
|
</nav>
|
|
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
$post = [];
|
|
foreach($_POST as $k=>$v)
|
|
array_push($post, $k);
|
|
|
|
$sublink = $post[0];
|
|
|
|
|
|
|
|
/* [1] VIEW -> Liste des acces
|
|
=========================================================*/
|
|
echo "<section data-sublink='view' class='list fstart'>";
|
|
|
|
$view = View::load('history.view');
|
|
echo $view->render();
|
|
|
|
echo '</section>';
|
|
|
|
|
|
|
|
|
|
|
|
/* [2] DETAILS -> Détails d'un log
|
|
=========================================================*/
|
|
if( isset($post[1]) && is_numeric($post[1]) ){
|
|
|
|
echo "<section data-sublink='details'>";
|
|
|
|
$view = View::load('history.details');
|
|
echo $view->render([
|
|
$post[1] // id_history
|
|
]);
|
|
|
|
echo '</section>';
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* [3] Archive -> Archivage des logs
|
|
=========================================================*/
|
|
|
|
echo "<section data-sublink='archive'>";
|
|
|
|
$view = View::load('history.archive');
|
|
echo $view->render();
|
|
|
|
echo '</section>';
|
|
|