19 |
* |
* |
20 |
* $Id$ |
* $Id$ |
21 |
* $Source$ |
* $Source$ |
|
* |
|
22 |
*/ |
*/ |
23 |
|
|
24 |
/** |
/** |
35 |
|
|
36 |
llxHeader(); |
llxHeader(); |
37 |
|
|
38 |
|
|
39 |
|
$sall=isset($_GET["sall"])?$_GET["sall"]:$_POST["sall"]; |
40 |
|
|
41 |
$sortorder=$_GET["sortorder"]; |
$sortorder=$_GET["sortorder"]; |
42 |
$sortfield=$_GET["sortfield"]; |
$sortfield=$_GET["sortfield"]; |
43 |
$page=$_GET["page"]; |
$page=$_GET["page"]; |
52 |
$pagenext = $page + 1; |
$pagenext = $page + 1; |
53 |
|
|
54 |
$sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, ".$db->pdate("d.datefin")." as datefin,"; |
$sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, ".$db->pdate("d.datefin")." as datefin,"; |
55 |
$sql .= " d.email, d.fk_adherent_type as type_id, t.libelle as type, d.morphy, d.statut, t.cotisation"; |
$sql.= " d.email, d.fk_adherent_type as type_id, t.libelle as type, d.morphy, d.statut, t.cotisation"; |
56 |
$sql .= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t"; |
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t"; |
57 |
$sql .= " WHERE d.fk_adherent_type = t.rowid "; |
$sql.= " WHERE d.fk_adherent_type = t.rowid "; |
58 |
if ($_GET["type"]) { |
if ($sall) |
59 |
|
{ |
60 |
|
$sql.=" AND (d.prenom like '%".$sall."%' OR d.nom like '%".$sall."%' OR d.societe like '%".$sall."%'"; |
61 |
|
$sql.=" OR d.email like '%".$sall."%' OR d.login like '%".$sall."%' OR d.adresse like '%".$sall."%'"; |
62 |
|
$sql.=" OR d.ville like '%".$sall."%' OR d.note like '%".$sall."%')"; |
63 |
|
} |
64 |
|
if ($_GET["type"]) |
65 |
|
{ |
66 |
$sql.=" AND t.rowid=".$_GET["type"]; |
$sql.=" AND t.rowid=".$_GET["type"]; |
67 |
} |
} |
68 |
if (isset($_GET["statut"])) |
if (isset($_GET["statut"])) |