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-10 07:54:23 +00:00
|
|
|
<span data-sublink='view'>
|
2016-02-09 14:04:22 +00:00
|
|
|
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/view/st/sub-menu-side' ); ?></span>
|
2016-02-02 22:56:48 +00:00
|
|
|
<span>Tout afficher</span>
|
|
|
|
</span>
|
|
|
|
|
2016-02-03 08:00:06 +00:00
|
|
|
<span data-sublink='create'>
|
2016-02-09 14:04:22 +00:00
|
|
|
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/create/st/sub-menu-side' ); ?></span>
|
2016-02-02 22:56:48 +00:00
|
|
|
<span>Creation</span>
|
|
|
|
</span>
|
|
|
|
|
2016-02-03 08:00:06 +00:00
|
|
|
<span data-sublink='remove'>
|
2016-02-09 14:04:22 +00:00
|
|
|
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/remove/st/sub-menu-side' ); ?></span>
|
2016-02-02 22:56:48 +00:00
|
|
|
<span>Suppression</span>
|
|
|
|
</span>
|
|
|
|
|
2016-02-03 08:00:06 +00:00
|
|
|
<span data-sublink='edit'>
|
2016-02-09 14:04:22 +00:00
|
|
|
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/edit/st/sub-menu-side' ); ?></span>
|
2016-02-02 22:56:48 +00:00
|
|
|
<span>Modification</span>
|
|
|
|
</span>
|
|
|
|
|
2016-02-03 08:00:06 +00:00
|
|
|
<span data-sublink='filter'>
|
2016-02-09 14:04:22 +00:00
|
|
|
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/filter/st/sub-menu-side' ); ?></span>
|
2016-02-02 22:56:48 +00:00
|
|
|
<span>Filtrer</span>
|
|
|
|
</span>
|
|
|
|
|
2016-02-03 08:00:06 +00:00
|
|
|
<span data-sublink='search'>
|
2016-02-09 14:04:22 +00:00
|
|
|
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/search/st/sub-menu-side' ); ?></span>
|
2016-02-02 22:56:48 +00:00
|
|
|
<span>Recherche</span>
|
|
|
|
</span>
|
|
|
|
|
2016-02-02 13:03:22 +00:00
|
|
|
</nav>
|
|
|
|
|
2016-02-03 10:30:46 +00:00
|
|
|
|
|
|
|
|
2016-02-10 07:54:23 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
$post = array();
|
|
|
|
foreach($_POST as $k=>$v)
|
|
|
|
array_push($post, $k);
|
|
|
|
|
|
|
|
$sublink = $post[0];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// On recupere toutes les machines
|
|
|
|
debug();
|
|
|
|
|
|
|
|
$request = new \manager\ModuleRequest('machineDefaultModule/getAll'); // On utilise la methode 'getAll' du module 'machineDefaultModule'
|
|
|
|
$answer = $request->dispatch(); // On recupere la reponse
|
|
|
|
|
|
|
|
echo "<section data-sublink='view' class='list'>";
|
|
|
|
// echo 'Liste des utilisateurs: <br>';
|
|
|
|
|
|
|
|
// si erreur, on affiche l'explicitation
|
|
|
|
if( $answer->error != \manager\ManagerError::Success )
|
|
|
|
var_dump( \manager\ManagerError::explicit($answer->error) );
|
|
|
|
|
|
|
|
// Si aucune erreur, on affiche les resultats
|
|
|
|
else{
|
|
|
|
foreach( $answer->get('machines') as $machine){
|
|
|
|
echo "<article class='inline-box'>";
|
|
|
|
// Prenom Nom
|
|
|
|
echo "<span class='title'>".$machine['name']."</span>";
|
|
|
|
|
|
|
|
// Code RFID
|
|
|
|
echo "<span class='code'>";
|
|
|
|
echo \manager\ResourceDispatcher::getResource('f/svg/card/st/container');
|
|
|
|
|
|
|
|
echo "<span>";
|
|
|
|
echo $machine['code'];
|
|
|
|
echo "</span>";
|
|
|
|
echo"</span>";
|
|
|
|
|
|
|
|
echo "</article>";
|
|
|
|
}
|
|
|
|
var_dump( $answer->get('machines') );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
echo '</section>';
|