[ Index ]
 

Code source de Dolibarr 2.0.1

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/htdocs/public/adherents/ -> priv_liste.php (source)

   1  <?php
   2  /* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
   3   * Copyright (C) 2002-2003 Jean-Louis Bergamo   <jlb@j1b.org>
   4   * Copyright (C) 2004      Laurent Destailleur  <eldy@users.sourceforge.net>
   5   *
   6   * This program is free software; you can redistribute it and/or modify
   7   * it under the terms of the GNU General Public License as published by
   8   * the Free Software Foundation; either version 2 of the License, or
   9   * (at your option) any later version.
  10   *
  11   * This program is distributed in the hope that it will be useful,
  12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14   * GNU General Public License for more details.
  15   *
  16   * You should have received a copy of the GNU General Public License
  17   * along with this program; if not, write to the Free Software
  18   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  19   *
  20   * $Id: priv_liste.php,v 1.9 2005/08/25 20:40:22 eldy Exp $
  21   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/public/adherents/priv_liste.php,v $
  22   *
  23   */
  24  require ("./pre.inc.php");
  25  
  26  llxHeader();
  27  
  28  
  29  if ($sortorder == "") {  $sortorder="ASC"; }
  30  if ($sortfield == "") {  $sortfield="nom"; }
  31  
  32  if ($page == -1) { $page = 0 ; }
  33  
  34  $offset = $conf->liste_limit * $page ;
  35  $pageprev = $page - 1;
  36  $pagenext = $page + 1;
  37  
  38  $sql = "select rowid,prenom,nom, societe, cp,ville,email,naiss,photo from ".MAIN_DB_PREFIX."adherent where statut=1 ORDER BY  $sortfield $sortorder ". $db->plimit($conf->liste_limit, $offset);
  39  //$sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, cp, ville, d.email, t.libelle as type, d.morphy, d.statut, t.cotisation";
  40  //$sql .= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t";
  41  //$sql .= " WHERE d.fk_adherent_type = t.rowid AND d.statut = $statut";
  42  //$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit, $offset);
  43  
  44  $result = $db->query($sql);
  45  if ($result) 
  46  {
  47    $num = $db->num_rows();
  48    $i = 0;
  49    
  50    print_barre_liste("Liste des adhérents", $page, "priv_liste.php", "&statut=$statut&sortorder=$sortorder&sortfield=$sortfield");
  51    print "<table class=\"noborder\" width=\"100%\">";
  52  
  53    print '<tr class="liste_titre">';
  54    print "<td><a href=\"".$_SERVER['SCRIPT_NAME'] . "?page=$page&sortorder=ASC&sortfield=d.prenom\">Prenom</a> <a href=\"".$_SERVER['SCRIPT_NAME'] . "?page=$page&sortorder=ASC&sortfield=d.nom\">Nom</a> / <a href=\"".$_SERVER['SCRIPT_NAME'] . "?page=$page&sortorder=ASC&sortfield=d.societe\">Société</a></td>\n";
  55    print_liste_field_titre("Date naissance","priv_liste.php","naiss","&page=$page");
  56    print_liste_field_titre("Email","priv_liste.php","email","&page=$page");
  57    print_liste_field_titre("CP","priv_liste.php","cp","&page=$page");
  58    print_liste_field_titre("Vile","priv_liste.php","ville","&page=$page");
  59    print "<td>Photo</td>\n";
  60    print "</tr>\n";
  61      
  62    $var=True;
  63    while ($i < $num)
  64      {
  65        $objp = $db->fetch_object( $i);
  66        $var=!$var;
  67        print "<tr $bc[$var]>";
  68        print "<td><a href=\"priv_fiche.php?rowid=$objp->rowid\">".stripslashes($objp->prenom)." ".stripslashes($objp->nom)." / ".stripslashes($objp->societe)."</a></TD>\n";
  69        print "<td>$objp->naiss</td>\n";
  70        print "<td>$objp->email</td>\n";
  71        print "<td>$objp->cp</td>\n";
  72        print "<td>$objp->ville</td>\n";
  73        if (isset($objp->photo) && $objp->photo!= ''){
  74      print "<td><A HREF=\"$objp->photo\"><IMG SRC=\"$objp->photo\" HEIGHT=64 WIDTH=64></A></TD>\n";
  75        }else{
  76      print "<td>&nbsp;</td>\n";
  77        }
  78        print "</tr>";
  79        $i++;
  80      }
  81    print "</table>";
  82  }
  83  else
  84  {
  85    dolibarr_print_error($db);
  86  }
  87  
  88  
  89  $db->close();
  90  
  91  llxFooter('$Date: 2005/08/25 20:40:22 $ - $Revision: 1.9 $');
  92  ?>


Généré le : Mon Nov 26 12:29:37 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics