Fix: order of firstname/name

This commit is contained in:
Laurent Destailleur 2011-12-03 16:14:24 +01:00
parent c50c4da39c
commit 70f670d870

View File

@ -71,15 +71,16 @@ $search_categ = isset($_GET["search_categ"])?$_GET["search_categ"]:$_POST["searc
* View * View
*/ */
llxHeader('',$langs->trans("Member"),'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros');
$form=new Form($db); $form=new Form($db);
$htmlother=new FormOther($db); $htmlother=new FormOther($db);
$membertypestatic=new AdherentType($db);
$memberstatic=new Adherent($db);
llxHeader('',$langs->trans("Member"),'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros');
$now=dol_now(); $now=dol_now();
$membertypestatic=new AdherentType($db);
$sql = "SELECT d.rowid, d.login, d.prenom, d.nom, d.societe, "; $sql = "SELECT d.rowid, d.login, d.prenom, d.nom, d.societe, ";
$sql.= " d.datefin,"; $sql.= " d.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,";
@ -256,18 +257,18 @@ if ($resql)
$datefin=$db->jdate($objp->datefin); $datefin=$db->jdate($objp->datefin);
$adh=new Adherent($db);
// Nom // Nom
$var=!$var; $var=!$var;
print "<tr $bc[$var]>"; print "<tr ".$bc[$var].">";
$memberstatic->nom=$objp->nom;
$memberstatic->prenom=$objp->prenom;
if ($objp->societe != '') if ($objp->societe != '')
{ {
print "<td><a href=\"fiche.php?rowid=$objp->rowid\">".img_object($langs->trans("ShowMember"),"user").' '.$objp->prenom." ".dol_trunc($objp->nom,12)." / ".dol_trunc($objp->societe,12)."</a></td>\n"; print "<td><a href=\"fiche.php?rowid=$objp->rowid\">".img_object($langs->trans("ShowMember"),"user").' '.dol_trunc($memberstatic->getFullName($langs))." / ".dol_trunc($objp->societe,12)."</a></td>\n";
} }
else else
{ {
print "<td><a href=\"fiche.php?rowid=$objp->rowid\">".img_object($langs->trans("ShowMember"),"user").' '.$objp->prenom." ".dol_trunc($objp->nom)."</a></td>\n"; print "<td><a href=\"fiche.php?rowid=$objp->rowid\">".img_object($langs->trans("ShowMember"),"user").' '.dol_trunc($memberstatic->getFullName($langs))."</a></td>\n";
} }
// Login // Login
@ -281,14 +282,14 @@ if ($resql)
print '</td>'; print '</td>';
// Moral/Physique // Moral/Physique
print "<td>".$adh->getmorphylib($objp->morphy)."</td>\n"; print "<td>".$memberstatic->getmorphylib($objp->morphy)."</td>\n";
// EMail // EMail
print "<td>".dol_print_email($objp->email,0,0,1)."</td>\n"; print "<td>".dol_print_email($objp->email,0,0,1)."</td>\n";
// Statut // Statut
print '<td nowrap="nowrap">'; print '<td nowrap="nowrap">';
print $adh->LibStatut($objp->statut,$objp->cotisation,$datefin,2); print $memberstatic->LibStatut($objp->statut,$objp->cotisation,$datefin,2);
print "</td>"; print "</td>";
// End of subscription date // End of subscription date