Skip to content
Snippets Groups Projects
users.php 302 B
Newer Older
<?php
// Generate the list of who's logged in
$users = $DB->GetAll("SELECT DISTINCT username, min(date_trunc('second', now()-time)) AS idle FROM session WHERE username IS NOT NULL group by username order by idle LIMIT 5;");

$smarty->assign('users', $users);

$result = $smarty->fetch('users.tpl');
?>