Merge pull request #686 from grandoc/develop

fix: change name with lastname
This commit is contained in:
Laurent Destailleur 2013-02-23 07:38:35 -08:00
commit 3274b1c21a
60 changed files with 211 additions and 229 deletions

View File

@ -364,10 +364,10 @@ abstract class ActionsAdherentCardCommon
if ($action == 'create_user')
{
// Full firstname and name separated with a dot : firstname.name
// Full firstname and lastname separated with a dot : firstname.lastname
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
$login=dol_buildlogin($this->object->lastname, $this->object->prenom);
$login=dol_buildlogin($this->object->lastname, $this->object->firstname);
$generated_password=getRandomPassword('');
$password=$generated_password;

View File

@ -654,7 +654,7 @@ if ($rowid)
*/
if ($action != 'addsubscription' && $action != 'create_thirdparty')
{
$sql = "SELECT d.rowid, d.prenom, d.lastname, d.societe,";
$sql = "SELECT d.rowid, d.firstname, d.lastname, d.societe,";
$sql.= " c.rowid as crowid, c.cotisation,";
$sql.= " c.dateadh,";
$sql.= " c.datef,";

View File

@ -61,7 +61,7 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg
$arrayofmembers=array();
// requete en prenant que les adherents a jour de cotisation
$sql = "SELECT d.rowid, d.prenom as firstname, d.lastname, d.login, d.societe as company, d.datefin,";
$sql = "SELECT d.rowid, d.firstname, d.lastname, d.login, d.societe as company, d.datefin,";
$sql.= " d.address, d.cp as zip, d.town, d.naiss, d.email, d.photo,";
$sql.= " t.libelle as type,";
$sql.= " p.code as country_code, p.libelle as country";
@ -109,12 +109,8 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg
'%DOL_MAIN_URL_ROOT%'=>DOL_MAIN_URL_ROOT,
'%SERVER%'=>"http://".$_SERVER["SERVER_NAME"]."/", // deprecated
// For backward compatibility
'%PRENOM%'=>$objp->firstname,
'%LASTNAME%'=>$objp->lastname,
'%SOCIETE%'=>$objp->company,
'%ADDRESS%'=>$objp->address,
'%CP%'=>$objp->zip,
'%TOWN%'=>$objp->town,
'%PAYS%'=>$objp->country,
'%ANNEE%'=>$year,
'%SERVEUR%'=>"http://".$_SERVER["SERVER_NAME"]."/" // deprecated

View File

@ -45,7 +45,6 @@ class Adherent extends CommonObject
var $ref;
var $civilite_id;
var $firstname;
var $prenom; // deprecated
var $lastname;
var $login;
var $pass;
@ -227,12 +226,8 @@ class Adherent extends CommonObject
'%PASSWORD%'=>$msgishtml?dol_htmlentitiesbr($this->pass):$this->pass,
// For backward compatibility
'%INFOS%'=>$msgishtml?dol_htmlentitiesbr($infos):$infos,
'%PRENOM%'=>$msgishtml?dol_htmlentitiesbr($this->firstname):$this->firstname,
'%LASTNAME%'=>$msgishtml?dol_htmlentitiesbr($this->lastname):$this->lastname,
'%SOCIETE%'=>$msgishtml?dol_htmlentitiesbr($this->societe):$this->societe,
'%ADDRESS%'=>$msgishtml?dol_htmlentitiesbr($this->address):$this->address,
'%CP%'=>$msgishtml?dol_htmlentitiesbr($this->zip):$this->zip,
'%TOWN%'=>$msgishtml?dol_htmlentitiesbr($this->town):$this->town,
'%PAYS%'=>$msgishtml?dol_htmlentitiesbr($this->country):$this->country,
);
@ -400,7 +395,7 @@ class Adherent extends CommonObject
// Clean parameters
$this->lastname=trim($this->lastname)?trim($this->lastname):trim($this->lastname);
$this->firstname=trim($this->firstname)?trim($this->firstname):trim($this->prenom);
$this->firstname=trim($this->firstname)?trim($this->firstname):trim($this->firstname);
$this->address=($this->address?$this->address:$this->address);
$this->zip=($this->zip?$this->zip:$this->cp);
$this->town=($this->town?$this->town:$this->town);
@ -421,7 +416,7 @@ class Adherent extends CommonObject
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET";
$sql.= " civilite = ".(!is_null($this->civilite_id)?"'".$this->civilite_id."'":"null");
$sql.= ", prenom = ".($this->firstname?"'".$this->db->escape($this->firstname)."'":"null");
$sql.= ", firstname = ".($this->firstname?"'".$this->db->escape($this->firstname)."'":"null");
$sql.= ", lastname=" .($this->lastname?"'".$this->db->escape($this->lastname)."'":"null");
$sql.= ", login=" .($this->login?"'".$this->db->escape($this->login)."'":"null");
$sql.= ", societe=" .($this->societe?"'".$this->db->escape($this->societe)."'":"null");
@ -523,7 +518,6 @@ class Adherent extends CommonObject
$luser->civilite_id=$this->civilite_id;
$luser->firstname=$this->firstname;
$luser->lastname=$this->lastname;
$luser->prenom=$this->firstname; // deprecated
$luser->login=$this->user_login;
$luser->pass=$this->pass;
$luser->societe_id=$this->societe;
@ -1015,7 +1009,7 @@ class Adherent extends CommonObject
{
global $langs;
$sql = "SELECT d.rowid, d.civilite, d.prenom as firstname, d.lastname, d.societe, d.fk_soc, d.statut, d.public, d.address, d.cp as zip, d.town, d.note,";
$sql = "SELECT d.rowid, d.civilite, d.firstname, d.lastname, d.societe, d.fk_soc, d.statut, d.public, d.address, d.cp as zip, d.town, d.note,";
$sql.= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass,";
$sql.= " d.photo, d.fk_adherent_type, d.morphy, d.entity,";
$sql.= " d.datec as datec,";
@ -1053,7 +1047,6 @@ class Adherent extends CommonObject
$this->ref = $obj->rowid;
$this->id = $obj->rowid;
$this->civilite_id = $obj->civilite;
$this->prenom = $obj->firstname; // deprecated
$this->firstname = $obj->firstname;
$this->lastname = $obj->lastname;
$this->login = $obj->login;
@ -1813,7 +1806,7 @@ class Adherent extends CommonObject
// Member
if ($this->fullname && ! empty($conf->global->LDAP_MEMBER_FIELD_FULLNAME)) $info[$conf->global->LDAP_MEMBER_FIELD_FULLNAME] = $this->fullname;
if ($this->lastname && ! empty($conf->global->LDAP_MEMBER_FIELD_NAME)) $info[$conf->global->LDAP_MEMBER_FIELD_NAME] = $this->lastname;
if ($this->prenom && ! empty($conf->global->LDAP_MEMBER_FIELD_FIRSTNAME)) $info[$conf->global->LDAP_MEMBER_FIELD_FIRSTNAME] = $this->prenom;
if ($this->firstname && ! empty($conf->global->LDAP_MEMBER_FIELD_FIRSTNAME)) $info[$conf->global->LDAP_MEMBER_FIELD_FIRSTNAME] = $this->firstname;
if ($this->login && ! empty($conf->global->LDAP_MEMBER_FIELD_LOGIN)) $info[$conf->global->LDAP_MEMBER_FIELD_LOGIN] = $this->login;
if ($this->pass && ! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD)) $info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD] = $this->pass; // this->pass = mot de passe non crypte
if ($this->poste && ! empty($conf->global->LDAP_MEMBER_FIELD_TITLE)) $info[$conf->global->LDAP_MEMBER_FIELD_TITLE] = $this->poste;

View File

@ -64,7 +64,7 @@ llxHeader('',$langs->trans("ListOfSubscriptions"),'EN:Module_Foundations|FR:Modu
if ($msg) print $msg.'<br>';
// Liste des cotisations
$sql = "SELECT d.rowid, d.login, d.prenom as firstname, d.lastname, d.societe,";
$sql = "SELECT d.rowid, d.login, d.firstname, d.lastname, d.societe,";
$sql.= " c.rowid as crowid, c.cotisation,";
$sql.= " c.dateadh,";
$sql.= " c.datef,";

View File

@ -163,7 +163,7 @@ if ($id > 0)
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$member->lastname.'&nbsp;</td>';
print '</tr>';
// Prenom
// Firstname
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur">'.$member->firstname.'&nbsp;</td>';
print '</tr>';

View File

@ -251,9 +251,8 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer)
// Change values
$object->civilite_id = trim($_POST["civilite_id"]);
$object->prenom = trim($_POST["prenom"]); // deprecated
$object->firstname = trim($_POST["prenom"]);
$object->lastname = trim($_POST["nom"]);
$object->firstname = trim($_POST["firstname"]);
$object->lastname = trim($_POST["lastname"]);
$object->login = trim($_POST["login"]);
$object->pass = trim($_POST["pass"]);
@ -408,7 +407,7 @@ if ($action == 'add' && $user->rights->adherent->creer)
$typeid=$_POST["typeid"];
$civilite_id=$_POST["civilite_id"];
$lastname=$_POST["lastname"];
$prenom=$_POST["prenom"];
$firstname=$_POST["firstname"];
$societe=$_POST["societe"];
$address=$_POST["address"];
$zip=$_POST["zipcode"];
@ -432,9 +431,8 @@ if ($action == 'add' && $user->rights->adherent->creer)
$socid=$_POST["socid"];
$object->civilite_id = $civilite_id;
$object->prenom = $prenom; // deprecated
$object->firstname = $prenom;
$object->lastname = $nom;
$object->firstname = $firstname;
$object->lastname = $lastname;
$object->societe = $societe;
$object->address = $address;
$object->cp = $zip; // deprecated
@ -502,7 +500,7 @@ if ($action == 'add' && $user->rights->adherent->creer)
$langs->load("errors");
$errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Lastname"))."<br>\n";
}
if ($morphy != 'mor' && (!isset($prenom) || $prenom=='')) {
if ($morphy != 'mor' && (!isset($firstname) || $firstname=='')) {
$error++;
$langs->load("errors");
$errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Firstname"))."<br>\n";
@ -821,7 +819,7 @@ else
print '</tr>';
// Firstname
print '<tr><td id="tdfirstname">'.$langs->trans("Firstname").'</td><td><input type="text" name="prenom" size="40" value="'.(GETPOST('prenom','alpha')?GETPOST('prenom','alpha'):$object->firstname).'"></td>';
print '<tr><td id="tdfirstname">'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" size="40" value="'.(GETPOST('firstname','alpha')?GETPOST('firstname','alpha'):$object->firstname).'"></td>';
print '</tr>';
// Password
@ -1078,7 +1076,7 @@ else
print '</tr>';
// Firstname
print '<tr><td id="tdfirstname">'.$langs->trans("Firstname").'</td><td><input type="text" name="prenom" size="40" value="'.(isset($_POST["prenom"])?$_POST["prenom"]:$object->firstname).'"></td>';
print '<tr><td id="tdfirstname">'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" size="40" value="'.(isset($_POST["firstname"])?$_POST["firstname"]:$object->firstname).'"></td>';
print '</tr>';
// Password

View File

@ -205,7 +205,7 @@ $var=true;
*/
$max=5;
$sql = "SELECT a.rowid, a.statut, a.lastname, a.prenom as firstname, a.societe as company, a.fk_soc,";
$sql = "SELECT a.rowid, a.statut, a.lastname, a.firstname, a.societe as company, a.fk_soc,";
$sql.= " a.tms as datem, datefin as date_end_subscription,";
$sql.= " ta.rowid as typeid, ta.libelle, ta.cotisation";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."adherent_type as ta";
@ -265,7 +265,7 @@ else
*/
$max=5;
$sql = "SELECT a.rowid, a.statut, a.lastname, a.prenom as firstname, a.societe as company, a.fk_soc,";
$sql = "SELECT a.rowid, a.statut, a.lastname, a.firstname, a.societe as company, a.fk_soc,";
$sql.= " datefin as date_end_subscription,";
$sql.= " c.rowid as cid, c.tms as datem, c.datec as datec, c.dateadh as date_start, c.datef as date_end, c.cotisation";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."cotisation as c";

View File

@ -108,11 +108,11 @@ print '<td class="valeur">';
print $form->showrefnav($adh,'id');
print '</td></tr>';
// Nom
// Lastname
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$adh->lastname.'&nbsp;</td>';
print '</tr>';
// Prenom
// Firstname
print '<tr><td width="15%">'.$langs->trans("Firstname").'</td><td class="valeur">'.$adh->firstname.'&nbsp;</td>';
print '</tr>';

View File

@ -40,7 +40,7 @@ $statut=GETPOST("statut");
$search=GETPOST("search");
$search_ref=GETPOST("search_ref");
$search_lastname=GETPOST("search_lastname");
$search_prenom=GETPOST("search_prenom");
$search_firstname=GETPOST("search_firstname");
$search_login=GETPOST("search_login");
$type=GETPOST("type");
$search_email=GETPOST("search_email");
@ -63,7 +63,7 @@ if (GETPOST("button_removefilter"))
$search="";
$search_ref="";
$search_lastname="";
$search_prenom="";
$search_firstname="";
$search_login="";
$type="";
$search_email="";
@ -86,7 +86,7 @@ llxHeader('',$langs->trans("Member"),'EN:Module_Foundations|FR:Module_Adh&eacute
$now=dol_now();
$sql = "SELECT d.rowid, d.login, d.lastname, d.prenom as firstname, d.societe as company, d.fk_soc,";
$sql = "SELECT d.rowid, d.login, d.lastname, d.firstname, d.societe as company, d.fk_soc,";
$sql.= " d.datefin,";
$sql.= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,";
$sql.= " t.libelle as type, t.cotisation";
@ -103,7 +103,7 @@ if ($sall)
{
$sql.=" AND (";
if (is_numeric($sall)) $sql.= "d.rowid = ".$sall." OR ";
$sql.=" d.prenom LIKE '%".$sall."%' OR d.lastname LIKE '%".$sall."%' OR d.societe LIKE '%".$sall."%'";
$sql.=" d.firstname LIKE '%".$sall."%' OR d.lastname LIKE '%".$sall."%' OR d.societe LIKE '%".$sall."%'";
$sql.=" OR d.email LIKE '%".$sall."%' OR d.login LIKE '%".$sall."%' OR d.address LIKE '%".$sall."%'";
$sql.=" OR d.town LIKE '%".$sall."%' OR d.note LIKE '%".$sall."%')";
}
@ -122,7 +122,7 @@ if ($search_ref)
}
if ($search_lastname)
{
$sql.= " AND (d.prenom LIKE '%".$search_lastname."%' OR d.lastname LIKE '%".$search_lastname."%')";
$sql.= " AND (d.firstname LIKE '%".$search_lastname."%' OR d.lastname LIKE '%".$search_lastname."%')";
}
if ($search_login)
{

View File

@ -405,7 +405,7 @@ if ($rowid > 0)
$now=dol_now();
$sql = "SELECT d.rowid, d.login, d.prenom as firstname, d.lastname, d.societe, ";
$sql = "SELECT d.rowid, d.login, d.firstname, d.lastname, d.societe, ";
$sql.= " d.datefin,";
$sql.= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,";
$sql.= " t.libelle as type, t.cotisation";
@ -415,7 +415,7 @@ if ($rowid > 0)
$sql.= " AND t.rowid = ".$adht->id;
if ($sall)
{
$sql.= " AND (d.prenom LIKE '%".$sall."%' OR d.lastname LIKE '%".$sall."%' OR d.societe LIKE '%".$sall."%'";
$sql.= " AND (d.firstname LIKE '%".$sall."%' OR d.lastname LIKE '%".$sall."%' OR d.societe LIKE '%".$sall."%'";
$sql.= " OR d.email LIKE '%".$sall."%' OR d.login LIKE '%".$sall."%' OR d.address LIKE '%".$sall."%'";
$sql.= " OR d.town LIKE '%".$sall."%' OR d.note LIKE '%".$sall."%')";
}
@ -427,12 +427,12 @@ if ($rowid > 0)
{
if (isset($_POST['search']) && $_POST['search'] != '')
{
$sql.= " AND (d.prenom LIKE '%".$_POST['search']."%' OR d.lastname LIKE '%".$_POST['search']."%')";
$sql.= " AND (d.firstname LIKE '%".$_POST['search']."%' OR d.lastname LIKE '%".$_POST['search']."%')";
}
}
if (! empty($search_lastname))
{
$sql.= " AND (d.prenom LIKE '%".$search_lastname."%' OR d.lastname LIKE '%".$search_lastname."%')";
$sql.= " AND (d.firstname LIKE '%".$search_lastname."%' OR d.lastname LIKE '%".$search_lastname."%')";
}
if (! empty($search_login))
{
@ -493,7 +493,7 @@ if ($rowid > 0)
$param="&rowid=".$rowid;
if (! empty($status)) $param.="&status=".$status;
if (! empty($search_lastname)) $param.="&search_lastname=".$search_lastname;
if (! empty($search_firstname)) $param.="&search_prenom=".$search_firstname;
if (! empty($search_firstname)) $param.="&search_firstname=".$search_firstname;
if (! empty($search_login)) $param.="&search_login=".$search_login;
if (! empty($search_email)) $param.="&search_email=".$search_email;
if (! empty($filter)) $param.="&filter=".$filter;

View File

@ -94,8 +94,8 @@ if ( $retour >= 0 )
$_SESSION['uid'] = $tab['rowid'];
$_SESSION['uname'] = $username;
$_SESSION['nom'] = $tab['name'];
$_SESSION['prenom'] = $tab['firstname'];
$_SESSION['lastname'] = $tab['lastname'];
$_SESSION['firstname'] = $tab['firstname'];
$_SESSION['CASHDESK_ID_THIRDPARTY'] = $thirdpartyid;
$_SESSION['CASHDESK_ID_WAREHOUSE'] = $warehouseid;
$_SESSION['CASHDESK_ID_BANKACCOUNT_CASH'] = ($bankid_cash > 0 ? $bankid_cash : '');

View File

@ -66,7 +66,7 @@ print '<li class="menu_choix1"><a href="affIndex.php?menu=facturation&id=NOUV"><
// Open new tab on backoffice (this is not a disconnect from POS)
print '<li class="menu_choix2"><a href=".." target="backoffice"><span>'.$langs->trans("BackOffice").'</span></a></li>';
// Disconnect
print '<li class="menu_choix0">'.$langs->trans("User").': '.$_SESSION['prenom'].' '.$_SESSION['nom'];
print '<li class="menu_choix0">'.$langs->trans("User").': '.$_SESSION['firstname'].' '.$_SESSION['lastname'];
print ' <a href="deconnexion.php">'.img_picto($langs->trans('Logout'), 'logout.png').'</a><br>';
print $langs->trans("CashDeskThirdParty").': '.$companyLink.'<br>';
/*print $langs->trans("CashDeskBankCash").': '.$bankcashLink.'<br>';

View File

@ -407,12 +407,12 @@ else if ($id || $ref)
print '<tr><td>'.$langs->trans("UserTitle").'</td><td class="valeur">'.$member->getCivilityLabel().'&nbsp;</td>';
print '</tr>';
// Nom
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$member->nom.'&nbsp;</td>';
// Lastname
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$member->lastname.'&nbsp;</td>';
print '</tr>';
// Prenom
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur">'.$member->prenom.'&nbsp;</td>';
// Firstname
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur">'.$member->firstname.'&nbsp;</td>';
print '</tr>';
// Status

View File

@ -338,8 +338,8 @@ if ($object->type == 3)
print '<td nowrap="nowrap" valign="top">';
print $member->getNomUrl(1);
print "</td>\n";
print '<td valign="top">'.$member->nom."</td>\n";
print '<td valign="top">'.$member->prenom."</td>\n";
print '<td valign="top">'.$member->lastname."</td>\n";
print '<td valign="top">'.$member->firstname."</td>\n";
print "</tr>\n";
}
}

View File

@ -287,7 +287,7 @@ class ActionComm extends CommonObject
$sql.= " a.priority, a.fulldayevent, a.location,";
$sql.= " c.id as type_id, c.code as type_code, c.libelle,";
$sql.= " s.nom as socname,";
$sql.= " u.firstname, u.name as lastname";
$sql.= " u.firstname, u.lastname as lastname";
$sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."actioncomm as a)";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_author";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on s.rowid = a.fk_soc";

View File

@ -39,7 +39,7 @@ $offset = $limit * $page ;
$type=GETPOST('type', 'alpha');
$search_lastname=GETPOST('search_nom')?GETPOST('search_nom'):GETPOST('search_lastname'); // For backward compatibility
$search_firstname=GETPOST('search_prenom')?GETPOST('search_prenom'):GETPOST('search_firstname'); // For backward compatibility
$search_firstname=GETPOST('search_firstname')?GETPOST('search_firstname'):GETPOST('search_firstname'); // For backward compatibility
$search_company=GETPOST('search_societe')?GETPOST('search_societe'):GETPOST('search_company'); // For backward compatibility
$contactname=GETPOST('contactname');

View File

@ -51,8 +51,8 @@ if (! $sortfield) $sortfield="email";
$id=GETPOST('id','int');
$rowid=GETPOST('rowid','int');
$action=GETPOST("action");
$search_nom=GETPOST("search_nom");
$search_prenom=GETPOST("search_prenom");
$search_lastname=GETPOST("search_lastname");
$search_firstname=GETPOST("search_firstname");
$search_email=GETPOST("search_email");
// Search modules dirs
@ -154,8 +154,8 @@ if ($action == 'delete')
if ($_POST["button_removefilter"])
{
$search_nom='';
$search_prenom='';
$search_lastname='';
$search_firstname='';
$search_email='';
}
@ -369,11 +369,11 @@ if ($object->fetch($id) >= 0)
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="id" value="'.$object->id.'">';
$sql = "SELECT mc.rowid, mc.nom, mc.prenom, mc.email, mc.other, mc.statut, mc.date_envoi, mc.source_url, mc.source_id, mc.source_type";
$sql = "SELECT mc.rowid, mc.lastname, mc.firstname, mc.email, mc.other, mc.statut, mc.date_envoi, mc.source_url, mc.source_id, mc.source_type";
$sql .= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc";
$sql .= " WHERE mc.fk_mailing=".$object->id;
if ($search_nom) $sql.= " AND mc.nom LIKE '%".$db->escape($search_nom)."%'";
if ($search_prenom) $sql.= " AND mc.prenom LIKE '%".$db->escape($search_prenom)."%'";
if ($search_lastname) $sql.= " AND mc.lastname LIKE '%".$db->escape($search_lastname)."%'";
if ($search_firstname) $sql.= " AND mc.firstname LIKE '%".$db->escape($search_firstname)."%'";
if ($search_email) $sql.= " AND mc.email LIKE '%".$db->escape($search_email)."%'";
$sql .= $db->order($sortfield,$sortorder);
$sql .= $db->plimit($conf->liste_limit+1, $offset);
@ -384,8 +384,8 @@ if ($object->fetch($id) >= 0)
$num = $db->num_rows($resql);
$parm = "&amp;id=".$object->id;
if ($search_nom) $parm.= "&amp;search_nom=".urlencode($search_nom);
if ($search_prenom) $parm.= "&amp;search_prenom=".urlencode($search_prenom);
if ($search_lastname) $parm.= "&amp;search_lastname=".urlencode($search_lastname);
if ($search_firstname) $parm.= "&amp;search_firstname=".urlencode($search_firstname);
if ($search_email) $parm.= "&amp;search_email=".urlencode($search_email);
print_barre_liste($langs->trans("MailSelectedRecipients"),$page,$_SERVER["PHP_SELF"],$parm,$sortfield,$sortorder,"",$num,$object->nbemail,'');
@ -394,8 +394,8 @@ if ($object->fetch($id) >= 0)
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("EMail"),$_SERVER["PHP_SELF"],"mc.email",$parm,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Lastname"),$_SERVER["PHP_SELF"],"mc.nom",$parm,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Firstname"),$_SERVER["PHP_SELF"],"mc.prenom",$parm,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Lastname"),$_SERVER["PHP_SELF"],"mc.lastname",$parm,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Firstname"),$_SERVER["PHP_SELF"],"mc.firstname",$parm,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("OtherInformations"),$_SERVER["PHP_SELF"],"",$parm,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Source"),$_SERVER["PHP_SELF"],"",$parm,"",'align="center"',$sortfield,$sortorder);
@ -422,11 +422,11 @@ if ($object->fetch($id) >= 0)
print '</td>';
// Name
print '<td class="liste_titre">';
print '<input class="flat" type="text" name="search_nom" size="12" value="'.$search_nom.'">';
print '<input class="flat" type="text" name="search_lastname" size="12" value="'.$search_lastname.'">';
print '</td>';
// Firstname
print '<td class="liste_titre">';
print '<input class="flat" type="text" name="search_prenom" size="10" value="'.$search_prenom.'">';
print '<input class="flat" type="text" name="search_firstname" size="10" value="'.$search_firstname.'">';
print '</td>';
// Other
print '<td class="liste_titre">';
@ -452,8 +452,8 @@ if ($object->fetch($id) >= 0)
print "<tr $bc[$var]>";
print '<td>'.$obj->email.'</td>';
print '<td>'.$obj->nom.'</td>';
print '<td>'.$obj->prenom.'</td>';
print '<td>'.$obj->lastname.'</td>';
print '<td>'.$obj->firstname.'</td>';
print '<td>'.$obj->other.'</td>';
print '<td align="center">';
if (empty($obj->source_id) || empty($obj->source_type))

View File

@ -174,7 +174,7 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes')
// On choisit les mails non deja envoyes pour ce mailing (statut=0)
// ou envoyes en erreur (statut=-1)
$sql = "SELECT mc.rowid, mc.nom, mc.prenom, mc.email, mc.other, mc.source_url, mc.source_id, mc.source_type, mc.tag";
$sql = "SELECT mc.rowid, mc.lastname, mc.firstname, mc.email, mc.other, mc.source_url, mc.source_id, mc.source_type, mc.tag";
$sql .= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc";
$sql .= " WHERE mc.statut < 1 AND mc.fk_mailing = ".$object->id;
@ -209,7 +209,7 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes')
$obj = $db->fetch_object($resql);
// sendto en RFC2822
$sendto = str_replace(',',' ',$obj->prenom." ".$obj->nom)." <".$obj->email.">";
$sendto = str_replace(',',' ',$obj->firstname." ".$obj->lastname)." <".$obj->email.">";
// Make substitutions on topic and body. From (AA=YY;BB=CC;...) we keep YY, CC, ...
$other=explode(';',$obj->other);
@ -224,8 +224,8 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes')
'__CHECK_READ__' => '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$obj->tag.'" width="1" height="1" style="width:1px;height:1px" border="0"/>',
'__UNSUBSCRIBE__' => '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.$obj->tag.'&unsuscrib=1" target="_blank">'.$langs->trans("MailUnsubcribe").'</a>',
'__MAILTOEMAIL__' => '<a href="mailto:'.$obj->email.'">'.$obj->email.'</a>',
'__LASTNAME__' => $obj->nom,
'__FIRSTNAME__' => $obj->prenom,
'__LASTNAME__' => $obj->lastname,
'__FIRSTNAME__' => $obj->firstname,
'__OTHER1__' => $other1,
'__OTHER2__' => $other2,
'__OTHER3__' => $other3,

View File

@ -39,8 +39,8 @@ class Don extends CommonObject
var $ref;
var $date;
var $amount;
var $prenom;
var $nom;
var $firstname;
var $lastname;
var $societe;
var $address;
var $cp;
@ -181,8 +181,8 @@ class Don extends CommonObject
$this->id=0;
$this->ref = 'SPECIMEN';
$this->specimen=1;
$this->nom = 'Doe';
$this->prenom = 'John';
$this->lastname = 'Doe';
$this->firstname = 'John';
$this->socid = 1;
$this->date = dol_now();
$this->amount = 100;
@ -210,7 +210,7 @@ class Don extends CommonObject
if (dol_strlen(trim($this->societe)) == 0)
{
if ((dol_strlen(trim($this->nom)) + dol_strlen(trim($this->prenom))) == 0)
if ((dol_strlen(trim($this->lastname)) + dol_strlen(trim($this->firstname))) == 0)
{
$error_string[$err] = "Vous devez saisir vos nom et prenom ou le nom de votre societe.";
$err++;
@ -310,8 +310,8 @@ class Don extends CommonObject
$sql.= ", entity";
$sql.= ", amount";
$sql.= ", fk_paiement";
$sql.= ", prenom";
$sql.= ", nom";
$sql.= ", firstname";
$sql.= ", lastname";
$sql.= ", societe";
$sql.= ", address";
$sql.= ", cp";
@ -331,8 +331,8 @@ class Don extends CommonObject
$sql.= ", ".$conf->entity;
$sql.= ", ".price2num($this->amount);
$sql.= ", ".($this->modepaiementid?$this->modepaiementid:"null");
$sql.= ", '".$this->db->escape($this->prenom)."'";
$sql.= ", '".$this->db->escape($this->nom)."'";
$sql.= ", '".$this->db->escape($this->firstname)."'";
$sql.= ", '".$this->db->escape($this->lastname)."'";
$sql.= ", '".$this->db->escape($this->societe)."'";
$sql.= ", '".$this->db->escape($this->address)."'";
$sql.= ", '".$this->db->escape($this->zip)."'";
@ -391,8 +391,8 @@ class Don extends CommonObject
$sql = "UPDATE ".MAIN_DB_PREFIX."don SET ";
$sql .= "amount = " . price2num($this->amount);
$sql .= ",fk_paiement = ".($this->modepaiementid?$this->modepaiementid:"null");
$sql .= ",prenom = '".$this->db->escape($this->prenom)."'";
$sql .= ",nom='".$this->db->escape($this->nom)."'";
$sql .= ",firstname = '".$this->db->escape($this->firstname)."'";
$sql .= ",lastname='".$this->db->escape($this->lastname)."'";
$sql .= ",societe='".$this->db->escape($this->societe)."'";
$sql .= ",address='".$this->db->escape($this->address)."'";
$sql .= ",cp='".$this->db->escape($this->zip)."'";
@ -463,7 +463,7 @@ class Don extends CommonObject
global $conf;
$sql = "SELECT d.rowid, d.datec, d.tms as datem, d.datedon,";
$sql.= " d.prenom, d.nom, d.societe, d.amount, d.fk_statut, d.address, d.cp, d.town, d.pays, d.public, d.amount, d.fk_paiement, d.note, cp.libelle, d.email, d.phone, d.phone_mobile, d.fk_don_projet,";
$sql.= " d.firstname, d.lastname, d.societe, d.amount, d.fk_statut, d.address, d.cp, d.town, d.pays, d.public, d.amount, d.fk_paiement, d.note, cp.libelle, d.email, d.phone, d.phone_mobile, d.fk_don_projet,";
$sql.= " p.title as project_label";
$sql.= " FROM ".MAIN_DB_PREFIX."don as d";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = d.fk_don_projet";
@ -483,8 +483,8 @@ class Don extends CommonObject
$this->datec = $this->db->jdate($obj->datec);
$this->datem = $this->db->jdate($obj->datem);
$this->date = $this->db->jdate($obj->datedon);
$this->prenom = $obj->prenom;
$this->nom = $obj->nom;
$this->firstname = $obj->firstname;
$this->lastname = $obj->lastname;
$this->societe = $obj->societe;
$this->statut = $obj->fk_statut;
$this->address = $obj->address;

View File

@ -85,8 +85,8 @@ if ($action == 'update')
{
$don->fetch($id);
$don->prenom = $_POST["prenom"];
$don->nom = $_POST["nom"];
$don->firstname = $_POST["firstname"];
$don->lastname = $_POST["lastname"];
$don->societe = $_POST["societe"];
$don->address = $_POST["address"];
$don->amount = price2num($_POST["amount"]);
@ -137,8 +137,8 @@ if ($action == 'add')
if (! $error)
{
$don->prenom = $_POST["prenom"];
$don->nom = $_POST["nom"];
$don->firstname = $_POST["firstname"];
$don->lastname = $_POST["lastname"];
$don->societe = $_POST["societe"];
$don->address = $_POST["address"];
$don->amount = price2num($_POST["amount"]);
@ -297,8 +297,8 @@ if ($action == 'create')
print "</td></tr>\n";
print "<tr>".'<td>'.$langs->trans("Company").'</td><td><input type="text" name="societe" value="'.$_POST["societe"].'" size="40"></td></tr>';
print "<tr>".'<td>'.$langs->trans("Firstname").'</td><td><input type="text" name="prenom" value="'.$_POST["prenom"].'" size="40"></td></tr>';
print "<tr>".'<td>'.$langs->trans("Lastname").'</td><td><input type="text" name="nom" value="'.$_POST["nom"].'" size="40"></td></tr>';
print "<tr>".'<td>'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" value="'.$_POST["firstname"].'" size="40"></td></tr>';
print "<tr>".'<td>'.$langs->trans("Lastname").'</td><td><input type="text" name="lastname" value="'.$_POST["lastname"].'" size="40"></td></tr>';
print "<tr>".'<td>'.$langs->trans("Address").'</td><td>';
print '<textarea name="address" wrap="soft" cols="40" rows="3">'.$_POST["address"].'</textarea></td></tr>';
@ -387,8 +387,8 @@ if (! empty($id) && $action == 'edit')
$langs->load("companies");
print "<tr>".'<td>'.$langs->trans("Company").'</td><td><input type="text" name="societe" size="40" value="'.$don->societe.'"></td></tr>';
print "<tr>".'<td>'.$langs->trans("Firstname").'</td><td><input type="text" name="prenom" size="40" value="'.$don->prenom.'"></td></tr>';
print "<tr>".'<td>'.$langs->trans("Lastname").'</td><td><input type="text" name="nom" size="40" value="'.$don->nom.'"></td></tr>';
print "<tr>".'<td>'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" size="40" value="'.$don->firstname.'"></td></tr>';
print "<tr>".'<td>'.$langs->trans("Lastname").'</td><td><input type="text" name="lastname" size="40" value="'.$don->lastname.'"></td></tr>';
print "<tr>".'<td>'.$langs->trans("Address").'</td><td>';
print '<textarea name="address" wrap="soft" cols="40" rows="'.ROWS_3.'">'.$don->address.'</textarea></td></tr>';
@ -483,8 +483,8 @@ if (! empty($id) && $action != 'edit')
print "</td></tr>\n";
print "<tr>".'<td>'.$langs->trans("Company").'</td><td>'.$don->societe.'</td></tr>';
print "<tr>".'<td>'.$langs->trans("Firstname").'</td><td>'.$don->prenom.'</td></tr>';
print "<tr>".'<td>'.$langs->trans("Lastname").'</td><td>'.$don->nom.'</td></tr>';
print "<tr>".'<td>'.$langs->trans("Firstname").'</td><td>'.$don->firstname.'</td></tr>';
print "<tr>".'<td>'.$langs->trans("Lastname").'</td><td>'.$don->lastname.'</td></tr>';
print "<tr>".'<td>'.$langs->trans("Address").'</td><td>'.dol_nl2br($don->address).'</td></tr>';
// Zip / Town

View File

@ -60,7 +60,7 @@ llxHeader('',$langs->trans("Donations"),'EN:Module_Donations|FR:Module_Dons|ES:M
$donationstatic=new Don($db);
// Genere requete de liste des dons
$sql = "SELECT d.rowid, d.datedon, d.prenom, d.nom, d.societe,";
$sql = "SELECT d.rowid, d.datedon, d.firstname, d.lastname, d.societe,";
$sql.= " d.amount, d.fk_statut as statut, ";
$sql.= " p.rowid as pid, p.ref, p.title, p.public";
$sql.= " FROM ".MAIN_DB_PREFIX."don as d LEFT JOIN ".MAIN_DB_PREFIX."projet AS p";
@ -79,7 +79,7 @@ if (trim($search_company) != '')
}
if (trim($search_name) != '')
{
$sql.= ' AND d.nom LIKE \'%'.$db->escape(trim($search_name)) . '%\' OR d.prenom LIKE \'%'.$db->escape(trim($search_name)) . '%\'';
$sql.= ' AND d.lastname LIKE \'%'.$db->escape(trim($search_name)) . '%\' OR d.firstname LIKE \'%'.$db->escape(trim($search_name)) . '%\'';
}
$sql.= $db->order($sortfield,$sortorder);
$sql.= $db->plimit($limit+1, $offset);
@ -109,7 +109,7 @@ if ($resql)
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"d.rowid","&page=$page&statut=$statut","","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"d.societe","&page=$page&statut=$statut","","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Name"),$_SERVER["PHP_SELF"],"d.nom","&page=$page&statut=$statut","","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Name"),$_SERVER["PHP_SELF"],"d.lastname","&page=$page&statut=$statut","","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"d.datedon","&page=$page&statut=$statut","",'align="center"',$sortfield,$sortorder);
if (! empty($conf->projet->enabled))
{
@ -154,8 +154,8 @@ if ($resql)
print "<tr ".$bc[$var].">";
$donationstatic->id=$objp->rowid;
$donationstatic->ref=$objp->rowid;
$donationstatic->nom=$objp->nom;
$donationstatic->prenom=$objp->prenom;
$donationstatic->lastname=$objp->lastname;
$donationstatic->firstname=$objp->firstname;
print "<td>".$donationstatic->getNomUrl(1)."</td>\n";
print "<td>".$objp->societe."</td>\n";
print "<td>".$donationstatic->getFullName($langs)."</td>\n";

View File

@ -512,7 +512,7 @@ if (! empty($conf->don->enabled) && $user->rights->societe->lire)
$langs->load("boxes");
$donationstatic=new Don($db);
$sql = "SELECT d.rowid, d.nom, d.prenom, d.societe, d.datedon as date, d.tms as dm, d.amount, d.fk_statut";
$sql = "SELECT d.rowid, d.lastname, d.firstname, d.societe, d.datedon as date, d.tms as dm, d.amount, d.fk_statut";
$sql.= " FROM ".MAIN_DB_PREFIX."don as d";
$sql.= " WHERE d.entity = ".$conf->entity;
$sql.= $db->order("d.tms","DESC");
@ -544,8 +544,8 @@ if (! empty($conf->don->enabled) && $user->rights->societe->lire)
$var=!$var;
print '<tr '.$bc[$var].'>';
$donationstatic->id=$objp->rowid;
$donationstatic->nom=$objp->nom;
$donationstatic->prenom=$objp->prenom;
$donationstatic->lastname=$objp->lastname;
$donationstatic->firstname=$objp->firstname;
$label=$donationstatic->getFullName($langs);
if ($objp->societe) $label.=($label?' - ':'').$objp->societe;
$donationstatic->ref=$label;

View File

@ -540,7 +540,7 @@ class BonPrelevement extends CommonObject
$this->method_trans = $method;
$langs->load('withdrawals');
$subject = $langs->trans("InfoTransSubject", $this->ref);
$message = $langs->trans("InfoTransMessage", $this->ref, $user->prenom, $user->nom);
$message = $langs->trans("InfoTransMessage", $this->ref, $user->firstname, $user->lastname);
$message .=$langs->trans("InfoTransData", price($this->amount), $this->methodes_trans[$this->method_trans], dol_print_date($date,'day'));
// TODO Call trigger to create a notification using notification module

View File

@ -135,7 +135,7 @@ report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportl
$catotal=0;
if ($modecompta == 'CREANCES-DETTES')
{
$sql = "SELECT u.rowid as rowid, u.name as name, u.firstname as firstname, sum(f.total) as amount, sum(f.total_ttc) as amount_ttc";
$sql = "SELECT u.rowid as rowid, u.lastname as name, u.firstname as firstname, sum(f.total) as amount, sum(f.total_ttc) as amount_ttc";
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON f.fk_user_author = u.rowid";
$sql.= " WHERE f.fk_statut in (1,2)";
@ -149,7 +149,7 @@ else
* Liste des paiements (les anciens paiements ne sont pas vus par cette requete car, sur les
* vieilles versions, ils n'etaient pas lies via paiement_facture. On les ajoute plus loin)
*/
$sql = "SELECT u.rowid as rowid, u.name as name, u.firstname as firstname, sum(pf.amount) as amount_ttc";
$sql = "SELECT u.rowid as rowid, u.lastname as name, u.firstname as firstname, sum(pf.amount) as amount_ttc";
$sql.= " FROM ".MAIN_DB_PREFIX."user as u" ;
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON f.fk_user_author = u.rowid ";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON pf.fk_facture = f.rowid";

View File

@ -395,10 +395,10 @@ abstract class ActionsContactCardCommon
if ($action == 'create_user')
{
// Full firstname and name separated with a dot : firstname.name
// Full firstname and lastname separated with a dot : firstname.lastname
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
$login=dol_buildlogin($this->object->nom, $this->object->prenom);
$login=dol_buildlogin($this->object->lastname, $this->object->firstname);
$generated_password=getRandomPassword('');
$password=$generated_password;

View File

@ -42,7 +42,6 @@ class Contact extends CommonObject
var $name; // TODO deprecated
var $nom; // TODO deprecated
var $firstname;
var $prenom; // TODO deprecated
var $address;
var $cp; // TODO deprecated
var $zip;
@ -110,7 +109,7 @@ class Contact extends CommonObject
$this->db->begin();
// Clean parameters
$this->lastname=$this->lastname?trim($this->lastname):$this->name;
$this->lastname=$this->lastname?trim($this->lastname):$this->lastname;
$this->firstname=trim($this->firstname);
if (! empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->lastname=ucwords($this->lastname);
if (! empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->firstname=ucwords($this->firstname);
@ -120,7 +119,7 @@ class Contact extends CommonObject
$sql = "INSERT INTO ".MAIN_DB_PREFIX."socpeople (";
$sql.= " datec";
$sql.= ", fk_soc";
$sql.= ", name";
$sql.= ", lastname";
$sql.= ", firstname";
$sql.= ", fk_user_creat";
$sql.= ", priv";
@ -216,7 +215,7 @@ class Contact extends CommonObject
$this->id = $id;
// Clean parameters
$this->lastname=trim($this->lastname)?trim($this->lastname):trim($this->name);
$this->lastname=trim($this->lastname)?trim($this->lastname):trim($this->lastname);
$this->firstname=trim($this->firstname);
$this->email=trim($this->email);
$this->phone_pro=trim($this->phone_pro);
@ -234,7 +233,7 @@ class Contact extends CommonObject
if ($this->socid > 0) $sql .= " fk_soc='".$this->db->escape($this->socid)."',";
else if ($this->socid == -1) $sql .= " fk_soc=null,";
$sql .= " civilite='".$this->db->escape($this->civilite_id)."'";
$sql .= ", name='".$this->db->escape($this->lastname)."'";
$sql .= ", lastname='".$this->db->escape($this->lastname)."'";
$sql .= ", firstname='".$this->db->escape($this->firstname)."'";
$sql .= ", address='".$this->db->escape($this->address)."'";
$sql .= ", cp='".$this->db->escape($this->zip)."'";
@ -482,7 +481,7 @@ class Contact extends CommonObject
$langs->load("companies");
$sql = "SELECT c.rowid, c.fk_soc, c.civilite as civilite_id, c.name as lastname, c.firstname,";
$sql = "SELECT c.rowid, c.fk_soc, c.civilite as civilite_id, c.lastname, c.firstname,";
$sql.= " c.address, c.cp as zip, c.town as town,";
$sql.= " c.fk_pays as country_id,";
$sql.= " c.fk_departement,";
@ -513,11 +512,7 @@ class Contact extends CommonObject
$this->ref = $obj->rowid;
$this->civilite_id = $obj->civilite_id;
$this->lastname = $obj->lastname;
$this->name = $obj->lastname; // TODO deprecated
$this->firstname = $obj->firstname;
$this->nom = $obj->lastname; // TODO deprecated
$this->prenom = $obj->firstname; // TODO deprecated
$this->address = $obj->address;
$this->cp = $obj->zip; // TODO deprecated
$this->zip = $obj->zip;
@ -683,7 +678,7 @@ class Contact extends CommonObject
$error=0;
$this->old_name = $obj->name;
$this->old_lastname = $obj->lastname;
$this->old_firstname = $obj->firstname;
$this->db->begin();
@ -853,7 +848,7 @@ class Contact extends CommonObject
/**
* Return name of contact with link (and eventually picto)
* Use $this->id, $this->name, $this->firstname, this->civilite_id
* Use $this->id, $this->lastname, $this->firstname, this->civilite_id
*
* @param int $withpicto Include picto with link
* @param string $option Where the link point to

View File

@ -633,7 +633,7 @@ else
print $object->ref;
print '</td></tr>';
// Name
// Lastname
print '<tr><td width="20%" class="fieldrequired">'.$langs->trans("Lastname").' / '.$langs->trans("Label").'</td><td width="30%"><input name="lastname" type="text" size="20" maxlength="80" value="'.(isset($_POST["lastname"])?$_POST["lastname"]:$object->lastname).'"></td>';
print '<td width="20%">'.$langs->trans("Firstname").'</td><td width="30%"><input name="firstname" type="text" size="20" maxlength="80" value="'.(isset($_POST["firstname"])?$_POST["firstname"]:$object->firstname).'"></td></tr>';
@ -811,9 +811,9 @@ else
if ($action == 'create_user')
{
// Full firstname and name separated with a dot : firstname.name
// Full firstname and lastname separated with a dot : firstname.lastname
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
$login=dol_buildlogin($object->nom,$object->prenom);
$login=dol_buildlogin($object->lastname,$object->firstname);
$generated_password='';
if (! $ldap_sid) // TODO ldap_sid ?

View File

@ -35,8 +35,8 @@ $contactid = GETPOST('id','int');
if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'contact', $contactid,'');
$search_nom=GETPOST("search_nom");
$search_prenom=GETPOST("search_prenom");
$search_lastname=GETPOST("search_lastname");
$search_firstname=GETPOST("search_firstname");
$search_societe=GETPOST("search_societe");
$search_poste=GETPOST("search_poste");
$search_phone=GETPOST("search_phone");
@ -87,8 +87,8 @@ if (! empty($text)) $titre.= " $text";
if (GETPOST('button_removefilter'))
{
$search_nom="";
$search_prenom="";
$search_lastname="";
$search_firstname="";
$search_societe="";
$search_poste="";
$search_phone="";
@ -142,13 +142,13 @@ else
if ($search_priv == '1') $sql .= " AND (p.priv='1' AND p.fk_user_creat=".$user->id.")";
}
if ($search_nom) // filtre sur le nom
if ($search_lastname) // filtre sur le nom
{
$sql .= " AND p.name LIKE '%".$db->escape($search_nom)."%'";
$sql .= " AND p.name LIKE '%".$db->escape($search_lastname)."%'";
}
if ($search_prenom) // filtre sur le prenom
if ($search_firstname) // filtre sur le prenom
{
$sql .= " AND p.firstname LIKE '%".$db->escape($search_prenom)."%'";
$sql .= " AND p.firstname LIKE '%".$db->escape($search_firstname)."%'";
}
if ($search_societe) // filtre sur la societe
{
@ -233,7 +233,7 @@ if ($result)
$contactstatic=new Contact($db);
$param ='&begin='.urlencode($begin).'&view='.urlencode($view).'&userid='.urlencode($userid).'&contactname='.urlencode($sall);
$param.='&type='.urlencode($type).'&view='.urlencode($view).'&search_nom='.urlencode($search_nom).'&search_prenom='.urlencode($search_prenom).'&search_societe='.urlencode($search_societe).'&search_email='.urlencode($search_email);
$param.='&type='.urlencode($type).'&view='.urlencode($view).'&search_lastname='.urlencode($search_lastname).'&search_firstname='.urlencode($search_firstname).'&search_societe='.urlencode($search_societe).'&search_email='.urlencode($search_email);
if ($search_priv == '0' || $search_priv == '1') $param.="&search_priv=".urlencode($search_priv);
$num = $db->num_rows($result);
@ -279,10 +279,10 @@ if ($result)
// Ligne des champs de filtres
print '<tr class="liste_titre">';
print '<td class="liste_titre">';
print '<input class="flat" type="text" name="search_nom" size="9" value="'.$search_nom.'">';
print '<input class="flat" type="text" name="search_lastname" size="9" value="'.$search_lastname.'">';
print '</td>';
print '<td class="liste_titre">';
print '<input class="flat" type="text" name="search_prenom" size="9" value="'.$search_prenom.'">';
print '<input class="flat" type="text" name="search_firstname" size="9" value="'.$search_firstname.'">';
print '</td>';
print '<td class="liste_titre">';
print '<input class="flat" type="text" name="search_poste" size="9" value="'.$search_poste.'">';

View File

@ -78,7 +78,7 @@ class box_members extends ModeleBoxes
if ($user->rights->societe->lire)
{
$sql = "SELECT a.rowid, a.nom as lastname, a.prenom as firstname, a.societe as company, a.fk_soc,";
$sql = "SELECT a.rowid, a.lastname, a.firstname, a.societe as company, a.fk_soc,";
$sql.= " a.datec, a.tms, a.statut as status, a.datefin as date_end_subscription,";
$sql.= " t.cotisation";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."adherent_type as t";

View File

@ -85,8 +85,8 @@ class CMailFile
* CMailFile
*
* @param string $subject Topic/Subject of mail
* @param string $to Recipients emails (RFC 2822: "Nom prenom <email>[, ...]" ou "email[, ...]" ou "<email>[, ...]")
* @param string $from Sender email (RFC 2822: "Nom prenom <email>[, ...]" ou "email[, ...]" ou "<email>[, ...]")
* @param string $to Recipients emails (RFC 2822: "Nom firstname <email>[, ...]" ou "email[, ...]" ou "<email>[, ...]")
* @param string $from Sender email (RFC 2822: "Nom firstname <email>[, ...]" ou "email[, ...]" ou "<email>[, ...]")
* @param string $msg Message
* @param array $filename_list List of files to attach (full path of filename on file system)
* @param array $mimetype_list List of MIME type of attached files

View File

@ -64,7 +64,7 @@ abstract class CommonObject
$lastname=$this->lastname;
$firstname=$this->firstname;
if (empty($lastname)) $lastname=($this->name?$this->name:$this->nom);
if (empty($firstname)) $firstname=$this->prenom;
if (empty($firstname)) $firstname=$this->firstname;
$ret='';
if ($option && $this->civilite_id)

View File

@ -1005,7 +1005,7 @@ class Form
$out='';
// On recherche les utilisateurs
$sql = "SELECT DISTINCT u.rowid, u.name as lastname, u.firstname, u.login, u.admin, u.entity";
$sql = "SELECT DISTINCT u.rowid, u.lastname as lastname, u.firstname, u.login, u.admin, u.entity";
if (! empty($conf->multicompany->enabled) && $conf->entity == 1 && $user->admin && ! $user->entity)
{
$sql.= ", e.label";
@ -1033,7 +1033,7 @@ class Form
if (! empty($user->societe_id)) $sql.= " AND u.fk_societe = ".$user->societe_id;
if (is_array($exclude) && $excludeUsers) $sql.= " AND u.rowid NOT IN ('".$excludeUsers."')";
if (is_array($include) && $includeUsers) $sql.= " AND u.rowid IN ('".$includeUsers."')";
$sql.= " ORDER BY u.name ASC";
$sql.= " ORDER BY u.lastname ASC";
dol_syslog(get_class($this)."::select_dolusers sql=".$sql);
$resql=$this->db->query($sql);

View File

@ -299,7 +299,7 @@ class FormOther
$moreforfilter.='<option value="">&nbsp;</option>';
// Get list of users allowed to be viewed
$sql_usr = "SELECT u.rowid, u.name as name, u.firstname, u.login";
$sql_usr = "SELECT u.rowid, u.lastname as name, u.firstname, u.login";
$sql_usr.= " FROM ".MAIN_DB_PREFIX."user as u";
$sql_usr.= " WHERE u.entity IN (0,".$conf->entity.")";
if (empty($user->rights->user->user->lire)) $sql_usr.=" AND u.fk_societe = ".($user->societe_id?$user->societe_id:0);

View File

@ -769,7 +769,7 @@ function show_actions_todo($conf,$langs,$db,$object,$objcon='',$noprint=0)
$sql.= " a.fk_element, a.elementtype,";
$sql.= " c.code as acode, c.libelle,";
$sql.= " u.login, u.rowid";
if (get_class($object) == 'Adherent') $sql.= ", m.nom as name, m.prenom as firstname";
if (get_class($object) == 'Adherent') $sql.= ", m.lastname, m.firstname";
if (get_class($object) == 'Societe') $sql.= ", sp.name, sp.firstname";
$sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u, ".MAIN_DB_PREFIX."actioncomm as a";
if (get_class($object) == 'Adherent') $sql.= ", ".MAIN_DB_PREFIX."adherent as m";
@ -908,7 +908,7 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0)
$sql.= " a.fk_user_author, a.fk_contact,";
$sql.= " c.code as acode, c.libelle,";
$sql.= " u.login, u.rowid as user_id";
if (get_class($object) == 'Adherent') $sql.= ", m.nom as name, m.prenom as firstname";
if (get_class($object) == 'Adherent') $sql.= ", m.lastname, m.firstname";
if (get_class($object) == 'Societe') $sql.= ", sp.name, sp.firstname";
$sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u, ".MAIN_DB_PREFIX."actioncomm as a";
if (get_class($object) == 'Adherent') $sql.= ", ".MAIN_DB_PREFIX."adherent as m";

View File

@ -164,7 +164,7 @@ class mailing_fraise extends MailingTargets
// La requete doit retourner: id, email, fk_contact, name, firstname
$sql = "SELECT a.rowid as id, a.email as email, null as fk_contact, ";
$sql.= " a.nom as name, a.prenom as firstname,";
$sql.= " a.lastname, a.firstname,";
$sql.= " a.datefin, a.civilite, a.login, a.societe"; // Other fields
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a";
$sql.= " WHERE a.email IS NOT NULL";

View File

@ -62,7 +62,7 @@ class mailing_framboise extends MailingTargets
$cibles = array();
// Select the members from category
$sql = "SELECT a.rowid as id, a.email as email, a.nom as name, null as fk_contact, a.prenom as firstname,";
$sql = "SELECT a.rowid as id, a.email as email, a.lastname, null as fk_contact, a.firstname,";
if ($_POST['filter']) $sql.= " c.label";
else $sql.=" null as label";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a";

View File

@ -157,14 +157,14 @@ class MailingTargets // This can't be abstract as it is used for some method
$sql = "INSERT INTO ".MAIN_DB_PREFIX."mailing_cibles";
$sql .= " (fk_mailing,";
$sql .= " fk_contact,";
$sql .= " nom, prenom, email, other, source_url, source_id,";
$sql .= " lastname, firstname, email, other, source_url, source_id,";
if (! empty($conf->global->MAILING_EMAIL_UNSUBSCRIBE)) {
$sql .= " tag,";
}
$sql.= " source_type)";
$sql .= " VALUES (".$mailing_id.",";
$sql .= (empty($targetarray['fk_contact']) ? '0' : "'".$targetarray['fk_contact']."'") .",";
$sql .= "'".$this->db->escape($targetarray['name'])."',";
$sql .= "'".$this->db->escape($targetarray['lastname'])."',";
$sql .= "'".$this->db->escape($targetarray['firstname'])."',";
$sql .= "'".$this->db->escape($targetarray['email'])."',";
$sql .= "'".$this->db->escape($targetarray['other'])."',";

View File

@ -146,7 +146,7 @@ class mailing_pomme extends MailingTargets
// La requete doit retourner: id, email, fk_contact, name, firstname
$sql = "SELECT u.rowid as id, u.email as email, null as fk_contact,";
$sql.= " u.name as name, u.firstname as firstname, u.login, u.office_phone";
$sql.= " u.lastname as name, u.firstname as firstname, u.login, u.office_phone";
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
$sql.= " WHERE u.email != ''"; // u.email IS NOT NULL est implicite dans ce test
$sql.= " AND u.entity IN (0,".$conf->entity.")";

View File

@ -75,7 +75,7 @@ class modAdherent extends DolibarrModules
$this->const[5] = array("ADHERENT_MAIL_VALID_SUBJECT","chaine","Votre adhésion a été validée","Sujet du mail de validation");
$this->const[6] = array("ADHERENT_MAIL_RESIL_SUBJECT","chaine","Résiliation de votre adhésion","Sujet du mail de résiliation");
$this->const[21] = array("ADHERENT_MAIL_FROM","chaine","","From des mails");
$this->const[22] = array("ADHERENT_MAIL_COTIS","texte","Bonjour %PRENOM%,\r\nCet email confirme que votre cotisation a été reçue\r\net enregistrée","Mail de validation de cotisation");
$this->const[22] = array("ADHERENT_MAIL_COTIS","texte","Bonjour %FIRSTNAME%,\r\nCet email confirme que votre cotisation a été reçue\r\net enregistrée","Mail de validation de cotisation");
$this->const[23] = array("ADHERENT_MAIL_COTIS_SUBJECT","chaine","Reçu de votre cotisation","Sujet du mail de validation de cotisation");
$this->const[25] = array("ADHERENT_CARD_HEADER_TEXT","chaine","%ANNEE%","Texte imprimé sur le haut de la carte adhérent");
$this->const[26] = array("ADHERENT_CARD_FOOTER_TEXT","chaine","Association AZERTY","Texte imprimé sur le bas de la carte adhérent");
@ -172,9 +172,9 @@ class modAdherent extends DolibarrModules
$this->export_code[$r]=$this->rights_class.'_'.$r;
$this->export_label[$r]='MembersAndSubscriptions';
$this->export_permission[$r]=array(array("adherent","export"));
$this->export_fields_array[$r]=array('a.rowid'=>'Id','a.civilite'=>"UserTitle",'a.nom'=>"Lastname",'a.prenom'=>"Firstname",'a.login'=>"Login",'a.morphy'=>'Nature','a.societe'=>'Company','a.address'=>"Address",'a.cp'=>"Zip",'a.town'=>"Town",'a.pays'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.naiss'=>"Birthday",'a.statut'=>"Status",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datevalid'=>'DateValidation','a.tms'=>'DateLastModification','a.datefin'=>'DateEndSubscription','ta.rowid'=>'MemberTypeId','ta.libelle'=>'MemberTypeLabel','c.rowid'=>'SubscriptionId','c.dateadh'=>'DateSubscription','c.cotisation'=>'Amount');
$this->export_TypeFields_array[$r]=array('a.civilite'=>"Text",'a.nom'=>"Text",'a.prenom'=>"Text",'a.login'=>"Text",'a.morphy'=>'Text','a.societe'=>'Text','a.address'=>"Text",'a.cp'=>"Text",'a.town'=>"Text",'a.pays'=>"Text",'a.phone'=>"Text",'a.phone_perso'=>"Text",'a.phone_mobile'=>"Text",'a.email'=>"Text",'a.naiss'=>"Date",'a.statut'=>"Status",'a.note'=>"Text",'a.datec'=>'Date','a.datevalid'=>'Date','a.tms'=>'Date','a.datefin'=>'Date','ta.rowid'=>'List:fk_adherent_type:libelle','ta.libelle'=>'Text','c.dateadh'=>'Date','c.cotisation'=>'Number');
$this->export_entities_array[$r]=array('a.rowid'=>'member','a.civilite'=>"member",'a.nom'=>"member",'a.prenom'=>"member",'a.login'=>"member",'a.morphy'=>'member','a.societe'=>'member','a.address'=>"member",'a.cp'=>"member",'a.town'=>"member",'a.pays'=>"member",'a.phone'=>"member",'a.phone_perso'=>"member",'a.phone_mobile'=>"member",'a.email'=>"member",'a.naiss'=>"member",'a.statut'=>"member",'a.photo'=>"member",'a.note'=>"member",'a.datec'=>'member','a.datevalid'=>'member','a.tms'=>'member','a.datefin'=>'member','ta.rowid'=>'member_type','ta.libelle'=>'member_type','c.rowid'=>'subscription','c.dateadh'=>'subscription','c.cotisation'=>'subscription');
$this->export_fields_array[$r]=array('a.rowid'=>'Id','a.civilite'=>"UserTitle",'a.lastname'=>"Lastname",'a.firstname'=>"Firstname",'a.login'=>"Login",'a.morphy'=>'Nature','a.societe'=>'Company','a.address'=>"Address",'a.cp'=>"Zip",'a.town'=>"Town",'a.pays'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.naiss'=>"Birthday",'a.statut'=>"Status",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datevalid'=>'DateValidation','a.tms'=>'DateLastModification','a.datefin'=>'DateEndSubscription','ta.rowid'=>'MemberTypeId','ta.libelle'=>'MemberTypeLabel','c.rowid'=>'SubscriptionId','c.dateadh'=>'DateSubscription','c.cotisation'=>'Amount');
$this->export_TypeFields_array[$r]=array('a.civilite'=>"Text",'a.lastname'=>"Text",'a.firstname'=>"Text",'a.login'=>"Text",'a.morphy'=>'Text','a.societe'=>'Text','a.address'=>"Text",'a.cp'=>"Text",'a.town'=>"Text",'a.pays'=>"Text",'a.phone'=>"Text",'a.phone_perso'=>"Text",'a.phone_mobile'=>"Text",'a.email'=>"Text",'a.naiss'=>"Date",'a.statut'=>"Status",'a.note'=>"Text",'a.datec'=>'Date','a.datevalid'=>'Date','a.tms'=>'Date','a.datefin'=>'Date','ta.rowid'=>'List:fk_adherent_type:libelle','ta.libelle'=>'Text','c.dateadh'=>'Date','c.cotisation'=>'Number');
$this->export_entities_array[$r]=array('a.rowid'=>'member','a.civilite'=>"member",'a.lastname'=>"member",'a.firstname'=>"member",'a.login'=>"member",'a.morphy'=>'member','a.societe'=>'member','a.address'=>"member",'a.cp'=>"member",'a.town'=>"member",'a.pays'=>"member",'a.phone'=>"member",'a.phone_perso'=>"member",'a.phone_mobile'=>"member",'a.email'=>"member",'a.naiss'=>"member",'a.statut'=>"member",'a.photo'=>"member",'a.note'=>"member",'a.datec'=>'member','a.datevalid'=>'member','a.tms'=>'member','a.datefin'=>'member','ta.rowid'=>'member_type','ta.libelle'=>'member_type','c.rowid'=>'subscription','c.dateadh'=>'subscription','c.cotisation'=>'subscription');
// Add extra fields
$sql="SELECT name, label FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'member'";
$resql=$this->db->query($sql);
@ -207,7 +207,7 @@ class modAdherent extends DolibarrModules
$this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon
$this->import_tables_array[$r]=array('a'=>MAIN_DB_PREFIX.'adherent','extra'=>MAIN_DB_PREFIX.'adherent_extrafields');
$this->import_tables_creator_array[$r]=array('a'=>'fk_user_author'); // Fields to store import user id
$this->import_fields_array[$r]=array('a.civilite'=>"UserTitle",'a.nom'=>"Lastname*",'a.prenom'=>"Firstname",'a.login'=>"Login*","a.pass"=>"Password","a.fk_adherent_type"=>"MemberType*",'a.morphy'=>'Nature*','a.societe'=>'Company','a.address'=>"Address",'a.cp'=>"Zip",'a.town'=>"Town",'a.pays'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.naiss'=>"Birthday",'a.statut'=>"Status*",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datefin'=>'DateEndSubscription');
$this->import_fields_array[$r]=array('a.civilite'=>"UserTitle",'a.nom'=>"Lastname*",'a.firstname'=>"Firstname",'a.login'=>"Login*","a.pass"=>"Password","a.fk_adherent_type"=>"MemberType*",'a.morphy'=>'Nature*','a.societe'=>'Company','a.address'=>"Address",'a.cp'=>"Zip",'a.town'=>"Town",'a.pays'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.naiss'=>"Birthday",'a.statut'=>"Status*",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datefin'=>'DateEndSubscription');
// Add extra fields
$sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'member'";
$resql=$this->db->query($sql);
@ -223,7 +223,7 @@ class modAdherent extends DolibarrModules
// End add extra fields
$this->import_fieldshidden_array[$r]=array('extra.fk_object'=>'lastrowid-'.MAIN_DB_PREFIX.'adherent'); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent)
$this->import_regex_array[$r]=array('a.civilite'=>'code@'.MAIN_DB_PREFIX.'c_civilite','a.fk_adherent_type'=>'rowid@'.MAIN_DB_PREFIX.'adherent_type','a.morphy'=>'(phy|mor)','a.statut'=>'^[0|1]','a.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$','a.datefin'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$');
$this->import_examplevalues_array[$r]=array('a.civilite'=>"MR",'a.nom'=>'Smith','a.prenom'=>'John','a.login'=>'jsmith','a.pass'=>'passofjsmith','a.fk_adherent_type'=>'1','a.morphy'=>'"mor" or "phy"','a.societe'=>'JS company','a.address'=>'21 jump street','a.cp'=>'55000','a.town'=>'New York','a.pays'=>'1','a.email'=>'jsmith@example.com','a.naiss'=>'1972-10-10','a.statut'=>"0 or 1",'a.note'=>"This is a comment on member",'a.datec'=>dol_print_date($now,'%Y-%m-%d'),'a.datefin'=>dol_print_date(dol_time_plus_duree($now, 1, 'y'),'%Y-%m-%d'));
$this->import_examplevalues_array[$r]=array('a.civilite'=>"MR",'a.nom'=>'Smith','a.firstname'=>'John','a.login'=>'jsmith','a.pass'=>'passofjsmith','a.fk_adherent_type'=>'1','a.morphy'=>'"mor" or "phy"','a.societe'=>'JS company','a.address'=>'21 jump street','a.cp'=>'55000','a.town'=>'New York','a.pays'=>'1','a.email'=>'jsmith@example.com','a.naiss'=>'1972-10-10','a.statut'=>"0 or 1",'a.note'=>"This is a comment on member",'a.datec'=>dol_print_date($now,'%Y-%m-%d'),'a.datefin'=>dol_print_date(dol_time_plus_duree($now, 1, 'y'),'%Y-%m-%d'));
}

View File

@ -155,9 +155,9 @@ class modCategorie extends DolibarrModules
$this->export_icon[$r]='category';
$this->export_enabled[$r]='$conf->adherent->enabled';
$this->export_permission[$r]=array(array("categorie","lire"),array("adherent","lire"));
$this->export_fields_array[$r]=array('u.rowid'=>"CategId",'u.label'=>"Label",'u.description'=>"Description",'p.rowid'=>'MemberId','p.nom'=>'LastName','p.prenom'=>'Firstname');
$this->export_TypeFields_array[$r]=array('u.label'=>"Text",'u.description'=>"Text",'p.rowid'=>'List:adherent:nom','p.nom'=>'Text','p.prenom'=>'Text');
$this->export_entities_array[$r]=array('p.rowid'=>'member','p.nom'=>'member','p.prenom'=>'member'); // We define here only fields that use another picto
$this->export_fields_array[$r]=array('u.rowid'=>"CategId",'u.label'=>"Label",'u.description'=>"Description",'p.rowid'=>'MemberId','p.lastname'=>'LastName','p.firstname'=>'Firstname');
$this->export_TypeFields_array[$r]=array('u.label'=>"Text",'u.description'=>"Text",'p.rowid'=>'List:adherent:nom','p.lastname'=>'Text','p.firstname'=>'Text');
$this->export_entities_array[$r]=array('p.rowid'=>'member','p.lastname'=>'member','p.firstname'=>'member'); // We define here only fields that use another picto
$this->export_sql_start[$r]='SELECT DISTINCT ';
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'categorie as u, '.MAIN_DB_PREFIX.'categorie_member as cp, '.MAIN_DB_PREFIX.'adherent as p';
$this->export_sql_end[$r] .=' WHERE u.rowid = cp.fk_categorie AND cp.fk_member = p.rowid';

View File

@ -159,8 +159,8 @@ foreach($listUsers as $users)
print '<td>'.$users['rowid'].'</td>';
print '<td>';
$userstatic->id=$users['rowid'];
$userstatic->nom=$users['name'];
$userstatic->prenom=$users['firstname'];
$userstatic->lastname=$users['lastname'];
$userstatic->firstname=$users['firstname'];
print $userstatic->getNomUrl(1);
print '</td>';
print '<td>';

View File

@ -288,7 +288,7 @@ if ($action == 'confirm_send')
$subject = $societeName." - ".$langs->transnoentitiesnoconv("HolidaysToValidate");
// Content
$message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->prenom.",\n";
$message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->firstname.",\n";
$message.= "\n";
$message.= "Veuillez trouver ci-dessous une demande de congés payés à valider.\n";
@ -319,7 +319,7 @@ if ($action == 'confirm_send')
}
$message.= "\n";
$message.= "- ".$langs->transnoentitiesnoconv("Name")." : ".$expediteur->prenom." ".$expediteur->nom."\n";
$message.= "- ".$langs->transnoentitiesnoconv("Name")." : ".$expediteur->firstname." ".$expediteur->lastname."\n";
$message.= "- ".$langs->transnoentitiesnoconv("Period")." : ".dol_print_date($cp->date_debut,'day')." ".$langs->transnoentitiesnoconv("To")." ".dol_print_date($cp->date_fin,'day')."\n";
$message.= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/fiche.php?id=".$cp->rowid."\n\n";
$message.= "\n";
@ -397,10 +397,10 @@ if($action == 'confirm_valid')
$subject = $societeName." - ".$langs->transnoentitiesnoconv("HolidaysValidated");
// Content
$message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->prenom.",\n";
$message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->firstname.",\n";
$message.= "\n";
$message.= "Votre demande de congés payés du ".dol_print_date($cp->date_debut,'day')." au ".dol_print_date($cp->date_fin,'day')." vient d'être validée!\n";
$message.= "- ".$langs->transnoentitiesnoconv("ValidatedBy")." : ".$expediteur->prenom." ".$expediteur->nom."\n";
$message.= "- ".$langs->transnoentitiesnoconv("ValidatedBy")." : ".$expediteur->firstname." ".$expediteur->lastname."\n";
$message.= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/fiche.php?id=".$cp->rowid."\n\n";
$message.= "\n";
@ -465,11 +465,11 @@ if ($action == 'confirm_refuse')
$subject = $societeName." - ".$langs->transnoentitiesnoconv("HolidaysRefused");
// Content
$message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->prenom.",\n";
$message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->firstname.",\n";
$message.= "\n";
$message.= "Votre demande de congés payés ".dol_print_date($cp->date_debut,'day')." ".$langs->transnoentitiesnoconv("To")." ".dol_print_date($cp->date_fin,'day')." vient d'être refusée pour le motif suivant :\n";
$message.= $_POST['detail_refuse']."\n\n";
$message.= "- ".$langs->transnoentitiesnoconv("ModifiedBy")." : ".$expediteur->prenom." ".$expediteur->nom."\n";
$message.= "- ".$langs->transnoentitiesnoconv("ModifiedBy")." : ".$expediteur->firstname." ".$expediteur->lastname."\n";
$message.= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/fiche.php?id=".$cp->rowid."\n\n";
$message.= "\n";
@ -536,10 +536,10 @@ if ($action == 'confirm_cancel' && $_GET['confirm'] == 'yes')
$subject = $societeName." - ".$langs->transnoentitiesnoconv("HolidaysCanceled");
// Content
$message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->prenom.",\n";
$message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->firstname.",\n";
$message.= "\n";
$message.= "Votre demande de congés ".dol_print_date($cp->date_debut,'day')." ".$langs->transnoentitiesnoconv("To")." ".dol_print_date($cp->date_fin,'day')." va été annulée.\n";
$message.= "- ".$langs->transnoentitiesnoconv("ModifiedBy")." : ".$expediteur->prenom." ".$expediteur->nom."\n";
$message.= "- ".$langs->transnoentitiesnoconv("ModifiedBy")." : ".$expediteur->firstname." ".$expediteur->lastname."\n";
$message.= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/fiche.php?id=".$cp->rowid."\n\n";
$message.= "\n";

View File

@ -211,12 +211,12 @@ if ($id > 0)
print '</td>';
print '</tr>';
// Nom
// LastName
print '<tr><td width="25%" valign="top">'.$langs->trans("LastName").'</td>';
print '<td colspan="2">'.$fuser->lastname.'</td>';
print "</tr>\n";
// Prenom
// FirstName
print '<tr><td width="25%" valign="top">'.$langs->trans("FirstName").'</td>';
print '<td colspan="2">'.$fuser->firstname.'</td>';
print "</tr>\n";

View File

@ -126,7 +126,7 @@ if($num == '0') {
print '<tr '.$bc[$var].'>';
print '<td>'.$holidaystatic->getNomUrl(1).'</td>';
print '<td>'.$user->nom.' '.$user->prenom.'</td>';
print '<td>'.$user->lastname.' '.$user->firstname.'</td>';
print '<td>'.dol_print_date($start_date,'day');
print '</td>';
print '<td>'.dol_print_date($end_date,'day');

View File

@ -47,12 +47,18 @@ alter table llx_propal CHANGE COLUMN fk_adresse_livraison fk_delivery_address
alter table llx_commande CHANGE COLUMN fk_adresse_livraison fk_delivery_address integer;
alter table llx_don CHANGE COLUMN adresse address text;
alter table llx_don CHANGE COLUMN ville town text;
alter table llx_don CHANGE COLUMN prenom firstname varchar(50);
alter table llx_don CHANGE COLUMN nom lastname varchar(50);
alter table llx_adherent CHANGE COLUMN adresse address text;
alter table llx_adherent CHANGE COLUMN nom lastname text;
alter table llx_adherent CHANGE COLUMN nom lastname varchar(50);
alter table llx_adherent CHANGE COLUMN prenom firstname varchar(50);
alter table llx_adherent CHANGE COLUMN ville town text;
alter table llx_user CHANGE COLUMN name lastname text;
alter table llx_mailing_cibles CHANGE COLUMN nom lastname varchar(50);
alter table llx_mailing_cibles CHANGE COLUMN prenom firstname varchar(50);
alter table llx_user CHANGE COLUMN name lastname varchar(50);
alter table llx_entrepot CHANGE COLUMN ville town text;
alter table llx_societe CHANGE COLUMN ville town text;
alter table llx_socpeople CHANGE COLUMN name lastname varchar(50);
alter table llx_socpeople CHANGE COLUMN ville town text;
alter table llx_bank_account CHANGE COLUMN adresse_proprio owner_address text;

View File

@ -412,8 +412,8 @@ if ($id > 0 || ! empty($ref))
else
{
$userstatic->id = $task_time->fk_user;
$userstatic->nom = $task_time->name;
$userstatic->prenom = $task_time->firstname;
$userstatic->lastname = $task_time->lastname;
$userstatic->firstname = $task_time->firstname;
print $userstatic->getNomUrl(1);
}
print '</td>';

View File

@ -54,7 +54,7 @@ $langs->load("donations");
llxHeaderVierge();
$sql = "SELECT d.datedon as datedon, d.nom, d.prenom, d.amount, d.public, d.societe";
$sql = "SELECT d.datedon as datedon, d.lastname, d.firstname, d.amount, d.public, d.societe";
$sql.= " FROM ".MAIN_DB_PREFIX."don as d";
$sql.= " WHERE d.fk_statut in (2, 3) ORDER BY d.datedon DESC";
@ -84,7 +84,7 @@ if ($resql)
print "<TR $bc[$var]>";
if ($objp->public)
{
print "<td>".$objp->prenom." ".$objp->nom." ".$objp->societe."</td>\n";
print "<td>".$objp->firstname." ".$objp->lastname." ".$objp->societe."</td>\n";
}
else
{

View File

@ -187,7 +187,7 @@ if ($action == 'add')
$error+=1;
$errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Lastname"))."<br>\n";
}
if (empty($_POST["prenom"]))
if (empty($_POST["firstname"]))
{
$error+=1;
$errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Firstname"))."<br>\n";
@ -223,8 +223,8 @@ if ($action == 'add')
$adh = new Adherent($db);
$adh->statut = -1;
$adh->public = $_POST["public"];
$adh->prenom = $_POST["prenom"];
$adh->nom = $_POST["nom"];
$adh->firstname = $_POST["firstname"];
$adh->lastname = $_POST["lastname"];
$adh->civilite_id = $_POST["civilite_id"];
$adh->societe = $_POST["societe"];
$adh->address = $_POST["address"];
@ -448,9 +448,9 @@ else
print '<tr><td>'.$langs->trans('UserTitle').'</td><td>';
print $formcompany->select_civility(GETPOST('civilite_id'),'civilite_id').'</td></tr>'."\n";
// Lastname
print '<tr><td>'.$langs->trans("Lastname").' <FONT COLOR="red">*</FONT></td><td><input type="text" name="nom" size="40" value="'.dol_escape_htmltag(GETPOST('nom')).'"></td></tr>'."\n";
print '<tr><td>'.$langs->trans("Lastname").' <FONT COLOR="red">*</FONT></td><td><input type="text" name="lastname" size="40" value="'.dol_escape_htmltag(GETPOST('lastname')).'"></td></tr>'."\n";
// Firstname
print '<tr><td>'.$langs->trans("Firstname").' <FONT COLOR="red">*</FONT></td><td><input type="text" name="prenom" size="40" value="'.dol_escape_htmltag(GETPOST('prenom')).'"></td></tr>'."\n";
print '<tr><td>'.$langs->trans("Firstname").' <FONT COLOR="red">*</FONT></td><td><input type="text" name="firstname" size="40" value="'.dol_escape_htmltag(GETPOST('firstname')).'"></td></tr>'."\n";
// Company
print '<tr id="trcompany" class="trcompany"><td>'.$langs->trans("Company").'</td><td><input type="text" name="societe" size="40" value="'.dol_escape_htmltag(GETPOST('societe')).'"></td></tr>'."\n";
// Address

View File

@ -101,14 +101,14 @@ if (! $sortfield) { $sortfield="nom"; }
llxHeaderVierge($langs->trans("ListOfValidatedPublicMembers"));
$sql = "SELECT rowid, prenom, nom, societe, cp as zip, town, email, naiss, photo";
$sql = "SELECT rowid, firstname, lastname, societe, cp as zip, town, email, naiss, photo";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent";
$sql.= " WHERE entity = ".$entity;
$sql.= " AND statut = 1";
$sql.= " AND public = 1";
$sql.= $db->order($sortfield,$sortorder);
$sql.= $db->plimit($conf->liste_limit+1, $offset);
//$sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, cp, town, d.email, t.libelle as type, d.morphy, d.statut, t.cotisation";
//$sql = "SELECT d.rowid, d.firstname, d.lastname, d.societe, cp, town, d.email, t.libelle as type, d.morphy, d.statut, t.cotisation";
//$sql .= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t";
//$sql .= " WHERE d.fk_adherent_type = t.rowid AND d.statut = $statut";
//$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit, $offset);
@ -124,8 +124,8 @@ if ($result)
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td><a href="'.$_SERVER["PHP_SELF"].'?page='.$page.'&sortorder=ASC&sortfield=prenom">'.$langs->trans("Firstname").'</a>';
print ' <a href="'.$_SERVER['PHP_SELF'].'?page='.$page.'&sortorder=ASC&sortfield=nom">'.$langs->trans("Lastname").'</a>';
print '<td><a href="'.$_SERVER["PHP_SELF"].'?page='.$page.'&sortorder=ASC&sortfield=firstname">'.$langs->trans("Firstname").'</a>';
print ' <a href="'.$_SERVER['PHP_SELF'].'?page='.$page.'&sortorder=ASC&sortfield=lastname">'.$langs->trans("Lastname").'</a>';
print ' / <a href="'.$_SERVER["PHP_SELF"].'?page='.$page.'&sortorder=ASC&sortfield=societe">'.$langs->trans("Company").'</a></td>'."\n";
//print_liste_field_titre($langs->trans("DateToBirth"),"public_list.php","naiss",'',$param,$sortfield,$sortorder); // est-ce nécessaire ??
print_liste_field_titre($langs->trans("EMail"),"public_list.php","email",'',$param,$sortfield,$sortorder);
@ -140,7 +140,7 @@ if ($result)
$objp = $db->fetch_object($result);
$var=!$var;
print "<tr $bc[$var]>";
print '<td><a href="public_card.php?id='.$objp->rowid.'">'.$objp->prenom.' '.$objp->nom.($objp->societe?' / '.$objp->societe:'').'</a></td>'."\n";
print '<td><a href="public_card.php?id='.$objp->rowid.'">'.$objp->firstname.' '.$objp->lastname.($objp->societe?' / '.$objp->societe:'').'</a></td>'."\n";
//print "<td>$objp->naiss</td>\n"; // est-ce nécessaire ??
print '<td>'.$objp->email.'</td>'."\n";
print '<td>'.$objp->zip.'</td>'."\n";

View File

@ -146,7 +146,7 @@ if ($_GET["socid"])
$sql .= " , ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql .= " WHERE sc.fk_soc =".$soc->id;
$sql .= " AND sc.fk_user = u.rowid";
$sql .= " ORDER BY u.name ASC ";
$sql .= " ORDER BY u.lastname ASC ";
$resql = $db->query($sql);
if ($resql)
@ -199,7 +199,7 @@ if ($_GET["socid"])
$sql = "SELECT u.rowid, u.name, u.firstname, u.login";
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
$sql.= " WHERE u.entity IN (0,".$conf->entity.")";
$sql.= " ORDER BY u.name ASC ";
$sql.= " ORDER BY u.lastname ASC ";
$resql = $db->query($sql);
if ($resql)

View File

@ -112,11 +112,11 @@ if (empty($reshook))
{
$object->particulier = GETPOST("private");
$object->name = empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION)?GETPOST('prenom').' '.GETPOST('nom'):GETPOST('nom').' '.GETPOST('prenom');
$object->name = empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION)?GETPOST('firstname').' '.GETPOST('nom'):GETPOST('nom').' '.GETPOST('firstname');
$object->civilite_id = GETPOST('civilite_id');
// Add non official properties
$object->name_bis = GETPOST('nom');
$object->firstname = GETPOST('prenom');
$object->firstname = GETPOST('firstname');
}
else
{
@ -748,7 +748,7 @@ else
// If javascript on, we show option individual
if ($conf->use_javascript_ajax)
{
print '<tr class="individualline"><td>'.$langs->trans('FirstName').'</td><td><input type="text" size="30" name="prenom" value="'.$object->firstname.'"></td>';
print '<tr class="individualline"><td>'.$langs->trans('FirstName').'</td><td><input type="text" size="30" name="firstname" value="'.$object->firstname.'"></td>';
print '<td colspan=2>&nbsp;</td></tr>';
print '<tr class="individualline"><td>'.$langs->trans("UserTitle").'</td><td>';
print $formcompany->select_civility($object->civility_id).'</td>';

View File

@ -46,7 +46,6 @@ class User extends CommonObject
var $ref_ext;
var $ldap_sid;
var $search_sid;
var $prenom; // TODO deprecated
var $lastname;
var $firstname;
var $note;
@ -139,7 +138,7 @@ class User extends CommonObject
$login=trim($login);
// Get user
$sql = "SELECT u.rowid, u.name, u.firstname, u.email, u.job, u.signature, u.office_phone, u.office_fax, u.user_mobile,";
$sql = "SELECT u.rowid, u.lastname, u.firstname, u.email, u.job, u.signature, u.office_phone, u.office_fax, u.user_mobile,";
$sql.= " u.admin, u.login, u.webcal_login, u.phenix_login, u.phenix_pass, u.note,";
$sql.= " u.pass, u.pass_crypted, u.pass_temp,";
$sql.= " u.fk_societe, u.fk_socpeople, u.fk_member, u.fk_user, u.ldap_sid,";
@ -190,7 +189,6 @@ class User extends CommonObject
$this->ldap_sid = $obj->ldap_sid;
$this->lastname = $obj->name;
$this->prenom = $obj->firstname; // TODO deprecated
$this->firstname = $obj->firstname;
$this->login = $obj->login;
@ -908,7 +906,6 @@ class User extends CommonObject
// Positionne parametres
$this->admin = 0;
$this->prenom = $contact->prenom; // TODO deprecated
$this->lastname = $contact->lastname;
$this->firstname = $contact->firstname;
$this->email = $contact->email;
@ -1087,7 +1084,6 @@ class User extends CommonObject
dol_syslog(get_class($this)."::update notrigger=".$notrigger.", nosyncmember=".$nosyncmember.", nosyncmemberpass=".$nosyncmemberpass);
// Clean parameters
$this->prenom = trim($this->prenom); // deprecated
$this->lastname = trim($this->lastname);
$this->firstname = trim($this->firstname);
$this->login = trim($this->login);
@ -1184,7 +1180,6 @@ class User extends CommonObject
if ($result >= 0)
{
$adh->prenom=$this->firstname; // deprecated
$adh->firstname=$this->firstname;
$adh->lastname=$this->lastname;
$adh->login=$this->login;
@ -1723,7 +1718,7 @@ class User extends CommonObject
/**
* Return a link to the user card (with optionnaly the picto)
* Use this->id,this->lastname, this->prenom
* Use this->id,this->lastname, this->firstname
*
* @param int $withpicto Include picto in link (0=No picto, 1=Inclut le picto dans le lien, 2=Picto seul)
* @param string $option On what the link point to
@ -1941,7 +1936,6 @@ class User extends CommonObject
$this->ref = 'SPECIMEN';
$this->specimen=1;
$this->prenom='SPECIMEN'; // deprecated
$this->lastname='DOLIBARR';
$this->firstname='SPECIMEN';
$this->note='This is a note';

View File

@ -102,9 +102,9 @@ if ($id > 0)
print '<td colspan="2">'.$fuser->lastname.'</td>';
print "</tr>\n";
// Prenom
// Firstname
print '<tr><td width="25%" valign="top">'.$langs->trans("Firstname").'</td>';
print '<td colspan="2">'.$fuser->name.'</td>';
print '<td colspan="2">'.$fuser->firstname.'</td>';
print "</tr>\n";
print "</table>\n";

View File

@ -175,7 +175,7 @@ if ($action == 'add' && $canadduser)
if (! $message)
{
$object->lastname = $_POST["lastname"];
$object->firstname = $_POST["prenom"];
$object->firstname = $_POST["firstname"];
$object->login = $_POST["login"];
$object->admin = $_POST["admin"];
$object->office_phone = $_POST["office_phone"];
@ -316,7 +316,7 @@ if ($action == 'update' && ! $_POST["cancel"])
$object->oldcopy=dol_clone($object);
$object->lastname = GETPOST("lastname");
$object->firstname = GETPOST("prenom");
$object->firstname = GETPOST("firstname");
$object->login = GETPOST("login");
$object->pass = GETPOST("password");
$object->admin = empty($user->admin)?0:GETPOST("admin"); // A user can only be set admin by an admin
@ -546,8 +546,8 @@ if ($action == 'adduserldap')
{
foreach ($ldapusers as $key => $attribute)
{
$ldap_lastname = $attribute[$conf->global->LDAP_FIELD_NAME];
$ldap_prenom = $attribute[$conf->global->LDAP_FIELD_FIRSTNAME];
$ldap_lastname = $attribute[$conf->global->LDAP_FIELD_NAME];
$ldap_firstname = $attribute[$conf->global->LDAP_FIELD_FIRSTNAME];
$ldap_login = $attribute[$conf->global->LDAP_FIELD_LOGIN];
$ldap_loginsmb = $attribute[$conf->global->LDAP_FIELD_LOGIN_SAMBA];
$ldap_pass = $attribute[$conf->global->LDAP_FIELD_PASSWORD];
@ -708,17 +708,17 @@ if (($action == 'create') || ($action == 'adduserldap'))
}
print '</td></tr>';
// Prenom
// Firstname
print '<tr><td valign="top">'.$langs->trans("Firstname").'</td>';
print '<td>';
if (! empty($ldap_prenom))
if (! empty($ldap_firstname))
{
print '<input type="hidden" name="prenom" value="'.$ldap_prenom.'">';
print $ldap_prenom;
print '<input type="hidden" name="firstname" value="'.$ldap_firstname.'">';
print $ldap_firstname;
}
else
{
print '<input size="30" type="text" name="prenom" value="'.GETPOST('prenom').'">';
print '<input size="30" type="text" name="firstname" value="'.GETPOST('firstname').'">';
}
print '</td></tr>';
@ -1087,7 +1087,7 @@ else
// Firstname
print '<tr><td valign="top">'.$langs->trans("Firstname").'</td>';
print '<td>'.$object->prenom.'</td>';
print '<td>'.$object->Firstname.'</td>';
print '</tr>'."\n";
// Position/Job
@ -1587,12 +1587,12 @@ else
print '<td>';
if ($caneditfield && !$object->ldap_sid)
{
print '<input size="30" type="text" class="flat" name="prenom" value="'.$object->prenom.'">';
print '<input size="30" type="text" class="flat" name="Firstname" value="'.$object->Firstname.'">';
}
else
{
print '<input type="hidden" name="prenom" value="'.$object->prenom.'">';
print $object->prenom;
print '<input type="hidden" name="Firstname" value="'.$object->Firstname.'">';
print $object->Firstname;
}
print '</td></tr>';

View File

@ -84,9 +84,9 @@ else
if (! empty($socid)) $sql.= " AND u.fk_societe = ".$socid;
if (! empty($search_user))
{
$sql.= " AND (u.login LIKE '%".$db->escape($search_user)."%' OR u.name LIKE '%".$db->escape($search_user)."%' OR u.firstname LIKE '%".$db->escape($search_user)."%')";
$sql.= " AND (u.login LIKE '%".$db->escape($search_user)."%' OR u.lastname LIKE '%".$db->escape($search_user)."%' OR u.firstname LIKE '%".$db->escape($search_user)."%')";
}
if ($sall) $sql.= " AND (u.login LIKE '%".$db->escape($sall)."%' OR u.name LIKE '%".$db->escape($sall)."%' OR u.firstname LIKE '%".$db->escape($sall)."%' OR u.email LIKE '%".$db->escape($sall)."%' OR u.note LIKE '%".$db->escape($sall)."%')";
if ($sall) $sql.= " AND (u.login LIKE '%".$db->escape($sall)."%' OR u.lastname LIKE '%".$db->escape($sall)."%' OR u.firstname LIKE '%".$db->escape($sall)."%' OR u.email LIKE '%".$db->escape($sall)."%' OR u.note LIKE '%".$db->escape($sall)."%')";
$sql.=$db->order($sortfield,$sortorder);
$result = $db->query($sql);
@ -99,7 +99,7 @@ if ($result)
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Login"),"index.php","u.login",$param,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("LastName"),"index.php","u.name",$param,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("LastName"),"index.php","u.lastname",$param,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("FirstName"),"index.php","u.firstname",$param,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Company"),"index.php","u.fk_societe",$param,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("DateCreation"),"index.php","u.datec",$param,"",'align="center"',$sortfield,$sortorder);
@ -123,7 +123,7 @@ if ($result)
print img_picto($langs->trans("Administrator"),'star');
}
print '</td>';
print '<td>'.ucfirst($obj->name).'</td>';
print '<td>'.ucfirst($obj->lastname).'</td>';
print '<td>'.ucfirst($obj->firstname).'</td>';
print "<td>";
if ($obj->fk_societe)

View File

@ -105,9 +105,9 @@ print '<tr><td width="25%" valign="top">'.$langs->trans("Lastname").'</td>';
print '<td>'.$fuser->lastname.'</td>';
print "</tr>\n";
// Prenom
// Firstname
print '<tr><td width="25%" valign="top">'.$langs->trans("Firstname").'</td>';
print '<td>'.$fuser->prenom.'</td>';
print '<td>'.$fuser->firstname.'</td>';
print "</tr>\n";
// Login

View File

@ -105,8 +105,8 @@ if ($id)
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur" colspan="3">'.$fuser->lastname.'&nbsp;</td>';
print '</tr>';
// Prenom
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur" colspan="3">'.$fuser->prenom.'&nbsp;</td></tr>';
// Firstname
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur" colspan="3">'.$fuser->firstname.'&nbsp;</td></tr>';
// Login
print '<tr><td>'.$langs->trans("Login").'</td><td class="valeur" colspan="3">'.$fuser->login.'&nbsp;</td></tr>';

View File

@ -135,9 +135,9 @@ print '<tr><td width="25%" valign="top">'.$langs->trans("LastName").'</td>';
print '<td colspan="2">'.$fuser->lastname.'</td>';
print "</tr>\n";
// Prenom
// FirstName
print '<tr><td width="25%" valign="top">'.$langs->trans("FirstName").'</td>';
print '<td colspan="2">'.$fuser->prenom.'</td>';
print '<td colspan="2">'.$fuser->firstname.'</td>';
print "</tr>\n";
print '</table><br>';

View File

@ -261,7 +261,7 @@ print '</tr>'."\n";
// Firstname
print '<tr><td width="25%" valign="top">'.$langs->trans("Firstname").'</td>';
print '<td>'.$fuser->prenom.'</td>';
print '<td>'.$fuser->firstname.'</td>';
print '</tr>'."\n";
print '</table><br>';