mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
New: Ajout page accueil de l'espace utilisateurs et groupes
This commit is contained in:
@@ -242,7 +242,10 @@ else
|
||||
$var=!$var;
|
||||
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td>'.ucfirst(stripslashes($obj->name)).'</td>';
|
||||
print '<td>';
|
||||
print '<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowUser"),"user").'</a> ';
|
||||
print '<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">'.ucfirst(stripslashes($obj->name)).'</a>';
|
||||
print '</td>';
|
||||
print '<td>'.ucfirst(stripslashes($obj->firstname)).'</td>';
|
||||
print '<td>'.$obj->code.'</td><td>';
|
||||
|
||||
|
||||
@@ -33,21 +33,14 @@ $langs->load("users");
|
||||
|
||||
$sortfield = isset($_GET["sortfield"])?$_GET["sortfield"]:$_POST["sortfield"];
|
||||
$sortorder = isset($_GET["sortorder"])?$_GET["sortorder"]:$_POST["sortorder"];
|
||||
$page = $_GET["page"];
|
||||
if ($page < 0) {
|
||||
$page = 0 ; }
|
||||
$page=isset($_GET["page"])?$_GET["page"]:$_POST["page"];
|
||||
if ($page < 0) $page = 0;
|
||||
|
||||
$limit = $conf->liste_limit;
|
||||
$offset = $limit * $page ;
|
||||
|
||||
if ($sortfield == "") {
|
||||
$sortfield="g.nom"; }
|
||||
|
||||
if ($sortorder == "")
|
||||
{
|
||||
$sortorder="ASC";
|
||||
}
|
||||
|
||||
if (! $sortfield) $sortfield="g.nom";
|
||||
if (! $sortorder) $sortorder="ASC";
|
||||
|
||||
|
||||
llxHeader();
|
||||
@@ -56,13 +49,16 @@ print_titre($langs->trans("ListOfGroups"));
|
||||
|
||||
$sql = "SELECT g.rowid, g.nom, ".$db->pdate("g.datec")." as datec";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."usergroup as g";
|
||||
$sql .= " WHERE 1=1";
|
||||
if ($_POST["search_group"]) {
|
||||
$sql .= " AND (g.nom like '%".$_POST["search_group"]."%' OR g.note like '%".$_POST["search_group"]."%')";
|
||||
}
|
||||
if ($sortfield) {
|
||||
$sql .= " ORDER BY ".$sortfield;
|
||||
}
|
||||
if ($sortorder) {
|
||||
$sql .= " ".$sortorder;
|
||||
}
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
|
||||
@@ -44,17 +44,6 @@ print '<table border="0" width="100%">';
|
||||
print '<tr><td valign="top" width="30%">';
|
||||
|
||||
|
||||
/*
|
||||
* Recherche User
|
||||
*/
|
||||
$var=false;
|
||||
print '<form method="post" action="'.DOL_URL_ROOT.'/user/index.php">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("SearchAUser").'</td></tr>';
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print $langs->trans("Ref").' : <input type="text" name="sf_ref"> <input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
|
||||
print "</table></form><br>\n";
|
||||
|
||||
/*
|
||||
* Recherche Group
|
||||
*/
|
||||
@@ -63,7 +52,18 @@ print '<tr><td valign="top" width="30%">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("SearchAGroup").'</td></tr>';
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print $langs->trans("Ref").' : <input type="text" name="search_contract"> <input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
|
||||
print $langs->trans("Ref").' : <input type="text" name="search_group"> <input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
|
||||
print "</table></form><br>\n";
|
||||
|
||||
/*
|
||||
* Recherche User
|
||||
*/
|
||||
$var=false;
|
||||
print '<form method="post" action="'.DOL_URL_ROOT.'/user/index.php">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("SearchAUser").'</td></tr>';
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print $langs->trans("Ref").' : <input type="text" name="search_user"> <input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
|
||||
print "</table></form><br>\n";
|
||||
|
||||
|
||||
|
||||
@@ -31,21 +31,29 @@ require("./pre.inc.php");
|
||||
|
||||
$langs->load("users");
|
||||
|
||||
|
||||
llxHeader();
|
||||
|
||||
|
||||
$sortfield = isset($_GET["sortfield"])?$_GET["sortfield"]:$_POST["sortfield"];
|
||||
$sortorder = isset($_GET["sortorder"])?$_GET["sortorder"]:$_POST["sortorder"];
|
||||
$page=isset($_GET["page"])?$_GET["page"]:$_POST["page"];
|
||||
if (! $sortfield) {
|
||||
$sortfield="u.name";
|
||||
}
|
||||
$page = $_GET["page"];
|
||||
if ($page < 0) $page = 0;
|
||||
|
||||
$limit = $conf->liste_limit;
|
||||
$offset = $limit * $page ;
|
||||
|
||||
if (! $sortfield) $sortfield="u.name";
|
||||
if (! $sortorder) $sortorder="ASC";
|
||||
|
||||
|
||||
llxHeader();
|
||||
|
||||
print_titre($langs->trans("ListOfUsers"));
|
||||
|
||||
$sql = "SELECT u.rowid, u.name, u.firstname, u.code, u.login, ".$db->pdate("u.datec")." as datec";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||
$sql .= " WHERE 1=1";
|
||||
if ($_POST["search_user"]) {
|
||||
$sql .= " AND (u.name like '%".$_POST["search_user"]."%' OR u.firstname like '%".$_POST["search_user"]."%')";
|
||||
}
|
||||
if ($sortfield) { $sql.=" ORDER BY $sortfield $sortorder"; }
|
||||
|
||||
$result = $db->query($sql);
|
||||
|
||||
Reference in New Issue
Block a user