';
print "| Rechercher un adhérent | ";
diff --git a/htdocs/adherents/liste.php b/htdocs/adherents/liste.php
index 82d348a752f..a68e29486e7 100644
--- a/htdocs/adherents/liste.php
+++ b/htdocs/adherents/liste.php
@@ -31,7 +31,16 @@ if ($sortfield == "") { $sortfield="d.nom"; }
if ($page == -1) { $page = 0 ; }
+/*
+ * SIZE_LISTE_LIMIT : constante de taille maximale des listes
+ */
+if (defined("SIZE_LISTE_LIMIT"))
+{
+ $conf->liste_limit=SIZE_LISTE_LIMIT;
+}
+
$offset = $conf->liste_limit * $page ;
+
$pageprev = $page - 1;
$pagenext = $page + 1;
@@ -44,6 +53,12 @@ $sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, ".$db->pdate("d.datefin")."
$sql .= " , d.email, t.libelle as type, d.morphy, d.statut, t.cotisation";
$sql .= " FROM llx_adherent as d, llx_adherent_type as t";
$sql .= " WHERE d.fk_adherent_type = t.rowid AND d.statut = $statut";
+if ( $_POST["action"] == 'search')
+{
+ if (isset($_POST['search']) && $_POST['search'] != ''){
+ $sql .= " AND (d.prenom LIKE '%".$_POST['search']."%' OR d.nom LIKE '%".$_POST['search']."%')";
+ }
+}
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit, $offset);
$result = $db->query($sql);
@@ -72,9 +87,14 @@ if ($result)
print_liste_field_titre("Type",$PHP_SELF,"t.libelle","&page=$page&statut=$statut");
print "\n";
+ print "";
+ print_liste_field_titre("Personne",$PHP_SELF,"d.morphy","&page=$page&statut=$statut");
+ print " | \n";
+
+ print "";
+ print_liste_field_titre("Statut",$PHP_SELF,"d.statut","&page=$page&statut=$statut");
+ print " | \n";
- print "Personne | \n";
- print "Statut | \n";
print "Action | \n";
print "
\n";
diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php
index 2131922b8bf..bf3ebf2cc22 100644
--- a/htdocs/admin/const.php
+++ b/htdocs/admin/const.php
@@ -24,6 +24,8 @@ llxHeader();
print_titre("Constantes de configuration Dolibarr");
+//print_r(get_defined_constants());
+
print '