/[dolibarr]/dolibarr/htdocs/user/index.php
ViewVC logotype

Diff of /dolibarr/htdocs/user/index.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.22 by rodolphe, Tue Aug 23 11:42:12 2005 UTC revision 1.23 by eldy, Tue Sep 6 19:17:12 2005 UTC
# Line 18  Line 18 
18   *   *
19   * $Id$   * $Id$
20   * $Source$   * $Source$
  *  
21   */   */
22    
23  /**  /**
# Line 33  if (! $user->rights->user->user->lire && Line 32  if (! $user->rights->user->user->lire &&
32    
33  $langs->load("users");  $langs->load("users");
34    
35    $sall=isset($_GET["sall"])?$_GET["sall"]:$_POST["sall"];
36    
37  $sortfield = isset($_GET["sortfield"])?$_GET["sortfield"]:$_POST["sortfield"];  $sortfield = isset($_GET["sortfield"])?$_GET["sortfield"]:$_POST["sortfield"];
38  $sortorder = isset($_GET["sortorder"])?$_GET["sortorder"]:$_POST["sortorder"];  $sortorder = isset($_GET["sortorder"])?$_GET["sortorder"]:$_POST["sortorder"];
39  $page=isset($_GET["page"])?$_GET["page"]:$_POST["page"];  $page=isset($_GET["page"])?$_GET["page"]:$_POST["page"];
# Line 56  $sql .= " WHERE 1=1"; Line 57  $sql .= " WHERE 1=1";
57  if ($_POST["search_user"]) {  if ($_POST["search_user"]) {
58      $sql .= " AND (u.name like '%".$_POST["search_user"]."%' OR u.firstname like '%".$_POST["search_user"]."%')";      $sql .= " AND (u.name like '%".$_POST["search_user"]."%' OR u.firstname like '%".$_POST["search_user"]."%')";
59  }  }
60    if ($sall) $sql.= " AND (u.login like '%".$sall."%' OR u.name like '%".$sall."%' OR u.firstname like '%".$sall."%' OR u.code like '%".$sall."%' OR u.email like '%".$sall."%' OR u.note like '%".$sall."%')";
61  if ($sortfield) { $sql.=" ORDER BY $sortfield $sortorder"; }  if ($sortfield) { $sql.=" ORDER BY $sortfield $sortorder"; }
62    
63  $result = $db->query($sql);  $result = $db->query($sql);
# Line 66  if ($result) Line 68  if ($result)
68    
69      print "<br>";      print "<br>";
70    
71        $param="search_user=$search_user&amp;sall=$sall";
72      print "<table class=\"noborder\" width=\"100%\">";      print "<table class=\"noborder\" width=\"100%\">";
73      print '<tr class="liste_titre">';      print '<tr class="liste_titre">';
74      print_liste_field_titre($langs->trans("Login"),"index.php","u.login","","","",$sortfield);      print_liste_field_titre($langs->trans("Login"),"index.php","u.login",$param,"","",$sortfield);
75      print_liste_field_titre($langs->trans("Lastname"),"index.php","u.name","","","",$sortfield);      print_liste_field_titre($langs->trans("Lastname"),"index.php","u.name",$param,"","",$sortfield);
76      print_liste_field_titre($langs->trans("Firstname"),"index.php","u.firstname","","","",$sortfield);      print_liste_field_titre($langs->trans("Firstname"),"index.php","u.firstname",$param,"","",$sortfield);
77      print_liste_field_titre($langs->trans("Code"),"index.php","u.code","","","",$sortfield);      print_liste_field_titre($langs->trans("Code"),"index.php","u.code",$param,"","",$sortfield);
78      print_liste_field_titre($langs->trans("DateCreation"),"index.php","u.datec","","","",$sortfield);      print_liste_field_titre($langs->trans("DateCreation"),"index.php","u.datec",$param,"","",$sortfield);
79      print "</tr>\n";      print "</tr>\n";
80      $var=True;      $var=True;
81      while ($i < $num)      while ($i < $num)

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26