/[dolibarr]/dolibarr/htdocs/adherents/liste.php
ViewVC logotype

Diff of /dolibarr/htdocs/adherents/liste.php

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

revision 1.31 by eldy, Mon Aug 15 01:06:20 2005 UTC revision 1.32 by eldy, Thu Aug 25 19:38:55 2005 UTC
# Line 19  Line 19 
19   *   *
20   * $Id$   * $Id$
21   * $Source$   * $Source$
  *  
22   */   */
23    
24  /**  /**
# Line 36  require("./adherent.class.php"); Line 35  require("./adherent.class.php");
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"];
# Line 50  $pageprev = $page - 1; Line 52  $pageprev = $page - 1;
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"]))

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.32

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