NxTIC/view/settings.php

60 lines
1.5 KiB
PHP
Executable File

<?php define('__ROOT__', dirname(dirname(__FILE__)) );
require_once __ROOT__.'/manager/autoloader.php';
use \manager\Repo;
use \manager\ModuleRequest;
use \manager\ManagerError;
use \manager\ResourceDispatcher;
/* [1] On recupere les tokens
=========================================================*/
$req_tokens = new Repo('token/getAll');
$tokens = $req_tokens->answer();
?>
<section data-sublink='tokens' class='active'>
<h6>Gestion des TOKENS</h6><br>
<!-- [1] Panel d'ajout/suppression de token -->
<section data-panel-list>
<!-- Header -->
<div data-header>
<span>Gestion des accès distants</span>
<button>Ajouter un accès</button>
</div>
<!-- Description -->
<div data-description>Liste des accès distants actifs. Ils seront automatiquement désactivés a la date d'expiration.</div>
<!-- Conteneur de la liste des elements -->
<ul data-list>
<!-- Elements de la liste -->
<?php
foreach($tokens as $token){
echo "<li data-element data-id='".$token['id']."'>";
echo "<div><span data-prefix='Type'>token</span></div>";
echo "<div>";
echo "<span>".$token['name']."</span>";
echo "<span data-prefix='Creation'>date de création</span>";
echo "<span data-prefix='Expiration'>date d'expiration</span>";
echo "<span data-prefix='Token'>90:31:ec:16:02:99:90:df:72:5f:02:f1:ad:d5:76:c7</span>";
echo "</div>";
echo "<button>Supprimer</button>";
echo "</li>";
}
?>
</ul>
</section>
</section>
<section data-sublink='users'>
Gestion des utilisateurs
</section>