$v) array_push($post, $k); $sublink = $post[0]; /* [1] VIEW -> Liste des utilisateurs =========================================================*/ $getusers = new ModuleRequest('userDefault/getAll'); // On utilise la methode 'getAll' du module 'userDefault' $nbusers = count( $getusers->dispatch()->get('users') ); // On recupere la reponse $getmachines = new ModuleRequest('machineDefault/getAll'); // On utilise la methode 'getAll' du module 'machineDefault' $nbmachines = count( $getmachines->dispatch()->get('machines') ); // On recupere la reponse echo "
"; // Barre de recherche echo ""; /* (1) On récupère les données ---------------------------------------------------------*/ $mac = Table::get('machine') ->select('*'); $selected = Table::get('history') ->join('id_machine', $mac) ->select('timestamp', Rows::SEL_MAX) ->select('id_history', Rows::SEL_COUNT, Rows::SEL_DISTINCT) ->fetch(); echo "
"; echo "Machine"; echo "Dernière utilisation"; echo "Conducteurs"; echo "Historique détaillé"; echo "
"; foreach($selected as $m=>$mac){ echo "
"; echo "#".$mac['name'].""; echo ""; echo "".date('d/m/Y H:i:s', $mac['last']).""; echo "Il y a xx jours et yy heures"; echo ""; echo ""; echo "".$mac['id_history']." conducteur(s)"; echo "test"; echo ""; echo ""; echo ""; echo ""; echo "
"; } echo '
';