diff --git a/manager/view/group/membersChoice.php b/manager/view/group/membersChoice.php index f559118..07826e9 100644 --- a/manager/view/group/membersChoice.php +++ b/manager/view/group/membersChoice.php @@ -12,6 +12,20 @@ public static function template($type=null){ switch($type){ + + case 'userheader': return " + Identifiant + Nom + Code RFID + "; + break; + + case 'machineheader': return " + Nom + "; + break; + + case 'userlist': return "
@username @@ -49,8 +63,8 @@
- @name - @clustertype + @header + Membre de @name
@members @@ -70,6 +84,7 @@ /* (2) On initialise les vues */ $view = ''; $members_view = ''; + $header = ''; @@ -136,6 +151,8 @@ $USERLIST[$u]['already_in'] = in_array($user['id_user'], $members_id) ? 'checked' : ''; /* (2) On génère la vue */ + $header = self::template('userheader'); + $members_view = View::replaceMultiple( self::template('userlist'), $USERLIST @@ -167,6 +184,8 @@ $MACHINELIST[$m]['already_in'] = in_array($machine['id_machine'], $members_id) ? 'checked' : ''; /* (2) On génère la vue */ + $header = self::template('machineheader'); + $members_view = View::replaceMultiple( self::template('machinelist'), $MACHINELIST @@ -182,7 +201,8 @@ 'class' => $params['class'], 'name' => $currentCluster['name'], 'clustertype' => ($params['class']==0) ? 'utilisateurs' : 'machines', - 'members' => $members_view + 'members' => $members_view, + 'header' => $header ] ); } diff --git a/view/history.php b/view/history.php index e7c80e4..b41f947 100755 --- a/view/history.php +++ b/view/history.php @@ -2,6 +2,7 @@ require_once __ROOT__.'/manager/autoloader.php'; use \manager\ModuleRequest; use \manager\ManagerError; + use \manager\Database; use \manager\Repo; ?> @@ -52,4 +53,18 @@ echo ""; + /* (1) On récupère les données + ---------------------------------------------------------*/ + $selReq = Database::getPDO()->query("select count(distinct id_user) as users, max(timestamp) as last from history group by id_machine"); + $selected = Database::delNumeric( $selReq->fetchAll() ); + + + + foreach($selected as $m=>$mac){ + + echo "
" + + } + + echo '';