New: Add login in lists in member module

This commit is contained in:
Laurent Destailleur 2008-08-17 21:50:27 +00:00
parent eb4fb7b1d2
commit e2a9b9cabc
2 changed files with 33 additions and 18 deletions

View File

@ -1,7 +1,7 @@
<?php <?php
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org> * Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,17 +16,14 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
* $Source$
*/ */
/** /**
\file htdocs/adherents/cotisations.php * \file htdocs/adherents/cotisations.php
\ingroup adherent * \ingroup adherent
\brief Page de consultation et insertion d'une cotisation * \brief Page de consultation et insertion d'une cotisation
\version $Revision$ * \version $Id$
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php"); require_once(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php");
@ -147,7 +144,7 @@ llxHeader();
if ($msg) print $msg.'<br>'; if ($msg) print $msg.'<br>';
// Liste des cotisations // Liste des cotisations
$sql = "SELECT d.rowid, d.prenom, d.nom, d.societe,"; $sql = "SELECT d.rowid, d.login, d.prenom, d.nom, d.societe,";
$sql.= " c.rowid as crowid, c.cotisation,"; $sql.= " c.rowid as crowid, c.cotisation,";
$sql.= " ".$db->pdate("c.dateadh")." as dateadh,"; $sql.= " ".$db->pdate("c.dateadh")." as dateadh,";
$sql.= " ".$db->pdate("c.datef")." as datef,"; $sql.= " ".$db->pdate("c.datef")." as datef,";
@ -178,6 +175,7 @@ if ($result)
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"),"cotisations.php","c.rowid",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Ref"),"cotisations.php","c.rowid",$param,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Name"),"cotisations.php","d.nom",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Name"),"cotisations.php","d.nom",$param,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Login"),"cotisations.php","d.login",$param,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Label"),"cotisations.php","c.note",$param,"",'align="left"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Label"),"cotisations.php","c.note",$param,"",'align="left"',$sortfield,$sortorder);
if ($conf->banque->enabled && $conf->global->ADHERENT_BANK_USE) if ($conf->banque->enabled && $conf->global->ADHERENT_BANK_USE)
{ {
@ -205,6 +203,7 @@ if ($result)
$adherent->ref=trim($objp->prenom.' '.$objp->nom); $adherent->ref=trim($objp->prenom.' '.$objp->nom);
$adherent->id=$objp->rowid; $adherent->id=$objp->rowid;
$adherent->login=$objp->login;
$var=!$var; $var=!$var;
@ -220,6 +219,9 @@ if ($result)
// Nom // Nom
print '<td>'.$adherent->getNomUrl(1).'</td>'; print '<td>'.$adherent->getNomUrl(1).'</td>';
// Login
print '<td>'.$adherent->login.'</td>';
// Libelle // Libelle
print '<td>'; print '<td>';
if ($allowinsertbankafter && $user->rights->banque->modifier && ! $objp->fk_account && $conf->banque->enabled && $conf->global->ADHERENT_BANK_USE && $objp->cotisation) if ($allowinsertbankafter && $user->rights->banque->modifier && ! $objp->fk_account && $conf->banque->enabled && $conf->global->ADHERENT_BANK_USE && $objp->cotisation)

View File

@ -21,7 +21,7 @@
/** /**
\file htdocs/adherents/liste.php \file htdocs/adherents/liste.php
\ingroup adherent \ingroup adherent
\brief Page listant les adhérents \brief Page listant les adh<EFBFBD>rents
\version $Id$ \version $Id$
*/ */
@ -33,7 +33,7 @@ $langs->load("companies");
/* /*
* Affiche liste * View
*/ */
llxHeader(); llxHeader();
@ -54,7 +54,7 @@ $offset = $conf->liste_limit * $page ;
$pageprev = $page - 1; $pageprev = $page - 1;
$pagenext = $page + 1; $pagenext = $page + 1;
$sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, "; $sql = "SELECT d.rowid, d.login, d.prenom, d.nom, d.societe, ";
$sql.= " ".$db->pdate("d.datefin")." as datefin,"; $sql.= " ".$db->pdate("d.datefin")." as datefin,";
$sql.= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,"; $sql.= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,";
$sql.= " t.libelle as type, t.cotisation"; $sql.= " t.libelle as type, t.cotisation";
@ -72,7 +72,7 @@ if ($_GET["type"])
} }
if (isset($_GET["statut"])) if (isset($_GET["statut"]))
{ {
$sql.=" AND d.statut in ($statut)"; // Peut valoir un nombre ou liste de nombre séparés par virgules $sql.=" AND d.statut in ($statut)"; // Peut valoir un nombre ou liste de nombre s<EFBFBD>par<EFBFBD>s par virgules
} }
if ( $_POST["action"] == 'search') if ( $_POST["action"] == 'search')
{ {
@ -84,6 +84,10 @@ if ($_GET["search_nom"])
{ {
$sql.= " AND (d.prenom LIKE '%".$_GET["search_nom"]."%' OR d.nom LIKE '%".$_GET["search_nom"]."%')"; $sql.= " AND (d.prenom LIKE '%".$_GET["search_nom"]."%' OR d.nom LIKE '%".$_GET["search_nom"]."%')";
} }
if ($_GET["search_login"])
{
$sql.= " AND d.login LIKE '%".$_GET["search_login"]."%'";
}
if ($_GET["search_email"]) if ($_GET["search_email"])
{ {
$sql.= " AND (d.email LIKE '%".$_GET["search_email"]."%')"; $sql.= " AND (d.email LIKE '%".$_GET["search_email"]."%')";
@ -133,15 +137,18 @@ if ($result)
} }
$param=""; $param="";
if (isset($_GET["statut"])) $param.="&statut=".$_GET["statut"]; if (isset($_GET["statut"])) $param.="&statut=".$_GET["statut"];
if (isset($_GET["search_nom"])) $param.="&search_nom=".$_GET["search_nom"]; if (isset($_GET["search_nom"])) $param.="&search_nom=".$_GET["search_nom"];
if (isset($_GET["filter"])) $param.="&filter=".$_GET["filter"]; if (isset($_GET["search_login"])) $param.="&search_login=".$_GET["search_login"];
if (isset($_GET["search_email"])) $param.="&search_email=".$_GET["search_email"];
if (isset($_GET["filter"])) $param.="&filter=".$_GET["filter"];
print_barre_liste($titre,$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords); print_barre_liste($titre,$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords);
print "<table class=\"noborder\" width=\"100%\">"; print "<table class=\"noborder\" width=\"100%\">";
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Name")." / ".$langs->trans("Company"),"liste.php","d.nom",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Name")." / ".$langs->trans("Company"),"liste.php","d.nom",$param,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Login"),"liste.php","d.login",$param,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Type"),"liste.php","t.libelle",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Type"),"liste.php","t.libelle",$param,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Person"),"liste.php","d.morphy",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Person"),"liste.php","d.morphy",$param,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("EMail"),"liste.php","d.email",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("EMail"),"liste.php","d.email",$param,"","",$sortfield,$sortorder);
@ -157,6 +164,9 @@ if ($result)
print '<td align="left">'; print '<td align="left">';
print '<input class="flat" type="text" name="search_nom" value="'.$_REQUEST["search_nom"].'" size="12"></td>'; print '<input class="flat" type="text" name="search_nom" value="'.$_REQUEST["search_nom"].'" size="12"></td>';
print '<td align="left">';
print '<input class="flat" type="text" name="search_login" value="'.$_REQUEST["search_login"].'" size="12"></td>';
print '<td class="liste_titre">&nbsp;</td>'; print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre">&nbsp;</td>'; print '<td class="liste_titre">&nbsp;</td>';
@ -197,6 +207,9 @@ if ($result)
print "<td><a href=\"fiche.php?rowid=$objp->rowid\">".img_object($langs->trans("ShowAdherent"),"user").' '.stripslashes($objp->prenom)." ".stripslashes($objp->nom)."</a></td>\n"; print "<td><a href=\"fiche.php?rowid=$objp->rowid\">".img_object($langs->trans("ShowAdherent"),"user").' '.stripslashes($objp->prenom)." ".stripslashes($objp->nom)."</a></td>\n";
} }
// Login
print "<td>".$objp->login."</td>\n";
// Type // Type
print '<td><a href="type.php?rowid='.$objp->type_id.'">'.img_object($langs->trans("ShowType"),"group").' '.$objp->type.'</a></td>'; print '<td><a href="type.php?rowid='.$objp->type_id.'">'.img_object($langs->trans("ShowType"),"group").' '.$objp->type.'</a></td>';
@ -204,7 +217,7 @@ if ($result)
print "<td>".$adh->getmorphylib($objp->morphy)."</td>\n"; print "<td>".$adh->getmorphylib($objp->morphy)."</td>\n";
// EMail // EMail
print "<td>$objp->email</td>\n"; print "<td>".$objp->email."</td>\n";
// Statut // Statut
print "<td>"; print "<td>";