<?
/*
* ConPortal - Pomona College ITS scheduling appplication
* Copyright (C) 2005-2006 Pomona College
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of version 2 of the GNU General Public License
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
function show_users_table()
{
?>
<table class='permsTable'>
<tr><th>PID</th><th>Username</th><th>Full Name</th></tr>
<?
$users = getUsers();
if (!count($users)) {
echo " <tr class='d0'><td class='center impt' colspan='3'>None</td></tr>\n";
} else {
$i = 0;
foreach ($users as $user) {
$info = getUserDetails($user);
echo " <tr class='d".($i++ % 2)."'>".
"<td>".$info['pid']."</td>".
"<td><a href='user_edit.php?user=".$info['pid']."'>".
$info['name']."</td>".
"<td>".$info['fullname']."</td>".
"<td class='noBorder'>".
"<a href='user_delete.php?user=".$info['pid']."'>".
"Delete</a></td>".
"</tr>\n";
}
}
?>
</table>
<?
}
?>