2016-02-03 22:22:18 +00:00
|
|
|
<?php define('__ROOT__', dirname(dirname(__FILE__)) );
|
|
|
|
require_once __ROOT__.'/manager/autoloader.php';
|
|
|
|
?>
|
|
|
|
|
2016-02-02 13:03:22 +00:00
|
|
|
<!-- [1] Gestion du sous-menu de gauche -->
|
|
|
|
|
2016-02-02 22:29:30 +00:00
|
|
|
<nav class='sub-menu-side'>
|
2016-02-05 09:26:10 +00:00
|
|
|
<span data-sublink='view'>
|
2016-02-03 07:45:42 +00:00
|
|
|
<span class='svg'><?php echo file_get_contents( 'http://'.$_SERVER['HTTP_HOST'].'/f/svg/view/st/sub-menu-side' ); ?></span>
|
|
|
|
<span>Tout afficher</span>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span data-sublink='create' >
|
|
|
|
<span class='svg'><?php echo file_get_contents( 'http://'.$_SERVER['HTTP_HOST'].'/f/svg/create/st/sub-menu-side' ); ?></span>
|
|
|
|
<span>Creation</span>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span data-sublink='remove' >
|
|
|
|
<span class='svg'><?php echo file_get_contents( 'http://'.$_SERVER['HTTP_HOST'].'/f/svg/remove/st/sub-menu-side' ); ?></span>
|
|
|
|
<span>Suppression</span>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span data-sublink='edit' >
|
|
|
|
<span class='svg'><?php echo file_get_contents( 'http://'.$_SERVER['HTTP_HOST'].'/f/svg/edit/st/sub-menu-side' ); ?></span>
|
|
|
|
<span>Modification</span>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span data-sublink='filter' >
|
|
|
|
<span class='svg'><?php echo file_get_contents( 'http://'.$_SERVER['HTTP_HOST'].'/f/svg/filter/st/sub-menu-side' ); ?></span>
|
|
|
|
<span>Filtrer</span>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span data-sublink='search' >
|
|
|
|
<span class='svg'><?php echo file_get_contents( 'http://'.$_SERVER['HTTP_HOST'].'/f/svg/search/st/sub-menu-side' ); ?></span>
|
|
|
|
<span>Recherche</span>
|
|
|
|
</span>
|
|
|
|
|
2016-02-02 13:03:22 +00:00
|
|
|
</nav>
|
|
|
|
|
2016-02-03 10:30:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-04 22:45:03 +00:00
|
|
|
<?php
|
2016-02-03 10:30:46 +00:00
|
|
|
|
2016-02-04 22:45:03 +00:00
|
|
|
$post = array();
|
|
|
|
foreach($_POST as $k=>$v)
|
|
|
|
array_push($post, $k);
|
2016-02-03 10:30:46 +00:00
|
|
|
|
2016-02-04 22:45:03 +00:00
|
|
|
$sublink = $post[0];
|
|
|
|
|
|
|
|
|
|
|
|
/* PAGE DES STATISTIQUES
|
|
|
|
*
|
|
|
|
*/
|
2016-02-06 10:41:50 +00:00
|
|
|
// if( $sublink == 'view' ){
|
2016-02-04 22:45:03 +00:00
|
|
|
|
|
|
|
// On recupere tous les utilisateurs
|
|
|
|
debug();
|
2016-02-05 08:18:01 +00:00
|
|
|
|
|
|
|
$request = new \manager\ModuleRequest('userDefaultModule/getAll'); // On utilise la methode 'getAll' du module 'userDefaultModule'
|
|
|
|
$answer = $request->dispatch(); // On recupere la reponse
|
2016-02-04 22:45:03 +00:00
|
|
|
|
2016-02-06 10:41:50 +00:00
|
|
|
echo "<section data-sublink='view'>";
|
2016-02-04 22:45:03 +00:00
|
|
|
echo 'Liste des utilisateurs: <br>';
|
2016-02-05 08:18:01 +00:00
|
|
|
|
|
|
|
// si erreur, on affiche l'explicitation
|
2016-02-05 08:10:37 +00:00
|
|
|
if( $answer->error != \manager\ManagerError::Success )
|
|
|
|
var_dump( \manager\ManagerError::explicit($answer->error) );
|
2016-02-05 08:18:01 +00:00
|
|
|
|
|
|
|
// Si aucune erreur, on affiche les resultats
|
2016-02-05 09:26:10 +00:00
|
|
|
else{
|
|
|
|
foreach( $answer->get('users') as $user){
|
|
|
|
echo "<article class='inline-box'>";
|
2016-02-05 09:51:38 +00:00
|
|
|
// Prenom Nom
|
2016-02-06 10:41:50 +00:00
|
|
|
echo "<span class='title'>".$user['username']." <span>(".$user['firstname']." ".$user['lastname'].")</span></span>";
|
2016-02-05 09:51:38 +00:00
|
|
|
|
|
|
|
// Code RFID
|
|
|
|
echo "<span class='code'>";
|
|
|
|
echo \manager\ResourceDispatcher::getResource('/f/svg/card/st/container');
|
|
|
|
|
|
|
|
echo "<span>";
|
|
|
|
echo $user['code'];
|
|
|
|
echo "</span>";
|
|
|
|
echo"</span>";
|
|
|
|
|
|
|
|
// Adresse email
|
2016-02-06 10:41:50 +00:00
|
|
|
echo "<span class='mail'>";
|
|
|
|
echo \manager\ResourceDispatcher::getResource('/f/svg/mail/st/container');
|
|
|
|
|
|
|
|
echo "<span>";
|
|
|
|
echo $user['mail'];
|
|
|
|
echo "</span>";
|
|
|
|
echo"</span>";
|
2016-02-05 09:51:38 +00:00
|
|
|
|
|
|
|
|
2016-02-05 09:26:10 +00:00
|
|
|
|
|
|
|
echo "</article>";
|
|
|
|
}
|
2016-02-05 08:10:37 +00:00
|
|
|
var_dump( $answer->get('users') );
|
2016-02-05 08:18:01 +00:00
|
|
|
|
2016-02-05 09:26:10 +00:00
|
|
|
}
|
|
|
|
|
2016-02-04 22:45:03 +00:00
|
|
|
echo '</section>';
|
|
|
|
|
2016-02-06 10:41:50 +00:00
|
|
|
// }
|