SMMP/public_html/view/history.php

90 lines
2.0 KiB
PHP
Raw Permalink Normal View History

2016-10-18 14:03:03 +00:00
<?php define('__ROOT__', dirname(dirname(dirname(__FILE__))) );
require_once __ROOT__.'/vendor/autoload.php';
2017-01-30 17:39:21 +00:00
use \api\core\Request;
use \database\core\DatabaseDriver;
2016-10-18 14:03:03 +00:00
use \database\core\Repo;
use \viewer\core\Viewer;
2016-10-18 14:03:03 +00:00
use \orm\core\Table; use \orm\core\Rows;
?>
<!-- [1] Gestion du sous-menu de gauche -->
<nav class='sub-menu-side'>
2016-02-18 14:49:06 +00:00
<span data-sublink='view'>
2016-10-18 14:03:03 +00:00
<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' >
2016-10-18 14:03:03 +00:00
<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' >
2016-10-18 14:03:03 +00:00
<span class='svg'><?php echo file_get_contents( __PUBLIC__.'/src/static/sub-menu-side/archive.svg' ); ?></span>
<span>Archiver</span>
</span>
</nav>
2016-02-18 14:49:06 +00:00
<?php
2016-07-04 13:45:29 +00:00
$post = [];
2016-02-18 14:49:06 +00:00
foreach($_POST as $k=>$v)
array_push($post, $k);
$sublink = $post[0];
/* [1] VIEW -> Liste des acces
2016-02-18 14:49:06 +00:00
=========================================================*/
echo "<section data-sublink='view' class='list fstart'>";
2016-02-18 14:49:06 +00:00
$view = new Viewer('history.view', []);
$view->view();
2016-02-18 14:49:06 +00:00
echo '</section>';
/* [2] DETAILS -> Détails d'un log
=========================================================*/
if( isset($post[1]) && is_numeric($post[1]) ){
echo "<section data-sublink='details' class='list fstart'>";
echo "details";
$view = new Viewer('history.details', []);
$view->view();
echo '</section>';
}
/* [3] Archive -> Archivage des logs
=========================================================*/
echo "<section data-sublink='archive' class='list fstart'>";
echo "<form class='search'>";
echo "Le téléchargement de l'archive supprimera toutes les entrées de l'historique.";
echo "<br>";
echo "<center>Etes-vous sur de vouloir procéder ?</center>";
echo "<br>";
echo "<button id='archive_clean'>Archiver l'historique</button>";
echo "</form>";
echo '</section>';