NxTIC/view/settings.php

61 lines
1.6 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;
use \manager\Database;
/* [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'>".Database::frDate($token['creation'])."</span>";
echo "<span data-prefix='Expiration'>".Database::frDate($token['expires'])."</span>";
echo "<span data-prefix='Token'>".$token['token']."</span>";
echo "</div>";
echo "<button>Supprimer</button>";
echo "</li>";
}
?>
</ul>
</section>
</section>
<section data-sublink='users'>
Gestion des utilisateurs
</section>