diff --git a/htdocs/user/addon.php b/htdocs/user/addon.php index 136a27cbe80..b497afeb44e 100644 --- a/htdocs/user/addon.php +++ b/htdocs/user/addon.php @@ -1,5 +1,6 @@ + * Copyright (C) 2004 Laurent Destailleur * * 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 @@ -19,6 +20,12 @@ * $Source$ */ +/*! + \file htdocs/user/addon.php + \brief Onglet addon de la fiche utilisateur + \version $Revision$ +*/ + require("./pre.inc.php"); require_once DOL_DOCUMENT_ROOT."/bookmark4u.class.php"; @@ -78,16 +85,15 @@ if ($_GET["id"]) $head[$h][0] = DOL_URL_ROOT.'/user/addon.php?id='.$fuser->id; $head[$h][1] = $langs->trans("Addons"); $hselected=$h; - $h++; - dolibarr_fiche_head($head, $hselected, $fuser->nom." ".$fuser->prenom); + dolibarr_fiche_head($head, $hselected, $fuser->fullname); /* * Fiche en mode visu */ - print ''; + print '
'; print "".''; print ''; diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index 81ae59fd9f0..8553bbe57bc 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -23,7 +23,7 @@ /*! \file htdocs/user/fiche.php - \brief Page de la fiche utilisateur + \brief Onglet user et permissions de la fiche utilisateur \version $Revision$ */ @@ -425,11 +425,9 @@ else } - /* ************************************************************************** */ - /* */ - /* Edition */ - /* */ - /* ************************************************************************** */ + /* + * Fiche en mode edition + */ if ($_GET["action"] == 'edit' && $user->admin) { print ''; @@ -474,7 +472,7 @@ else print "".''; - print '
'.$langs->trans("LastName").''.$fuser->nom.'
'; + print '
'; print ''; } diff --git a/htdocs/user/index.php b/htdocs/user/index.php index fd84464c4cb..4d596f9d09c 100644 --- a/htdocs/user/index.php +++ b/htdocs/user/index.php @@ -20,6 +20,13 @@ * $Source$ * */ + +/*! + \file htdocs/user/index.php + \brief Page d'accueil de la gestion des utilisateurs + \version $Revision$ +*/ + require("./pre.inc.php"); $langs->load("users"); @@ -28,8 +35,9 @@ $langs->load("users"); llxHeader(); -$sortfield=$_GET["sortfield"]; -$sortorder=$_GET["sortorder"]; +$sortfield = isset($_GET["sortfield"])?$_GET["sortfield"]:$_POST["sortfield"]; +$sortorder = isset($_GET["sortorder"])?$_GET["sortorder"]:$_POST["sortorder"]; +$page=isset($_GET["page"])?$_GET["page"]:$_POST["page"]; print_titre($langs->trans("ListOfUsers")); @@ -43,47 +51,45 @@ else { $sql.="u.name"; } $result = $db->query($sql); if ($result) { - $num = $db->num_rows(); - $i = 0; - - print "
"; - - print ""; - print ''; - print_liste_field_titre($langs->trans("LastName"),"index.php","name"); - print_liste_field_titre($langs->trans("FirstName"),"index.php","firstname"); - print_liste_field_titre($langs->trans("Login"),"index.php","login"); - print_liste_field_titre($langs->trans("Code"),"index.php","code"); - print "\n"; - $var=True; - while ($i < $num) + $num = $db->num_rows(); + $i = 0; + + print "
"; + + print "
"; + print ''; + print_liste_field_titre($langs->trans("LastName"),"index.php","name","","","",$sortfield); + print_liste_field_titre($langs->trans("FirstName"),"index.php","firstname","","","",$sortfield); + print_liste_field_titre($langs->trans("Login"),"index.php","login","","","",$sortfield); + print_liste_field_titre($langs->trans("Code"),"index.php","code","","","",$sortfield); + print "\n"; + $var=True; + while ($i < $num) { - $obj = $db->fetch_object( $i); - $var=!$var; - - print ""; - print ''; - print ''; - if ($obj->login) - { - print ''; - } - else - { - print ''; - } - print ''; - print "\n"; - $i++; + $obj = $db->fetch_object( $i); + $var=!$var; + + print ""; + print ''; + print ''; + if ($obj->login) + { + print ''; + } + else + { + print ''; + } + print ''; + print "\n"; + $i++; } - print "
'; - print img_file(); - print ' '.ucfirst($obj->name).''.ucfirst($obj->firstname).''.$obj->login.'Inactif'.$obj->code.'
'.ucfirst($obj->name).''.ucfirst($obj->firstname).''.img_file().' '.$obj->login.''.img_file().' Inactif'.$obj->code.'
"; - $db->free(); + print ""; + $db->free(); } -else +else { - print $db->error(); + dolibarr_print_error($db); } $db->close();