dolibarr/htdocs/user/index.php

71 lines
2.0 KiB
PHP
Raw Normal View History

2002-05-06 21:10:48 +02:00
<?PHP
2003-08-06 13:27:40 +02:00
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
2002-05-06 21:10:48 +02:00
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
2002-12-19 19:59:23 +01:00
* $Id$
* $Source$
*
2002-05-06 21:10:48 +02:00
*/
2003-09-11 17:26:39 +02:00
require("./pre.inc.php");
2002-05-06 21:10:48 +02:00
llxHeader();
2002-12-23 00:40:26 +01:00
2002-07-03 14:46:00 +02:00
print_titre("Liste des utilisateurs");
2002-12-23 00:40:26 +01:00
$sql = "SELECT u.rowid, u.name, u.firstname, u.code, u.login, u.module_comm, u.module_compta";
$sql .= " FROM ".MAIN_DB_PREFIX."user as u";
2002-05-06 21:10:48 +02:00
$sql .= " ORDER BY u.name";
$result = $db->query($sql);
2002-12-23 00:40:26 +01:00
if ($result)
{
2002-05-06 21:10:48 +02:00
$num = $db->num_rows();
$i = 0;
print "<p><TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
print '<TR class="liste_titre">';
print "<TD>Prenom</TD>";
print "<TD>Nom</TD>";
2002-12-23 00:39:15 +01:00
print '<TD>login</TD>';
2002-12-30 14:56:28 +01:00
print "<TD>code</TD>";
2002-05-06 21:10:48 +02:00
print "</TR>\n";
$var=True;
2002-12-23 00:40:26 +01:00
while ($i < $num)
{
$obj = $db->fetch_object( $i);
$var=!$var;
print "<TR $bc[$var]>";
2003-09-11 17:26:39 +02:00
print '<TD><a href="fiche.php?id='.$obj->rowid.'">'.$obj->firstname.'</a></td>';
2002-12-23 00:40:26 +01:00
print '<TD>'.$obj->name.'</TD>';
2003-09-11 17:26:39 +02:00
print '<TD><a href="fiche.php?id='.$obj->rowid.'">'.$obj->login.'</a></TD>';
2002-12-23 00:40:26 +01:00
print '<TD>'.$obj->code.'</TD>';
print "</TR>\n";
$i++;
}
2002-05-06 21:10:48 +02:00
print "</TABLE>";
$db->free();
2002-12-23 00:40:26 +01:00
}
else
{
2002-05-06 21:10:48 +02:00
print $db->error();
}
$db->close();
llxFooter("<em>Derni&egrave;re modification $Date$ r&eacute;vision $Revision$</em>");
?>