From cf6a902bfef3f66715a51e5b7752b2c6b1a364dc Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 9 Aug 2011 17:59:45 +0000 Subject: [PATCH] Fix: use hooks for extrafields --- .../class/actions_adherent.class.php | 37 + htdocs/adherents/class/adherent.class.php | 25 +- htdocs/adherents/fiche.php | 630 ++++++++++-------- htdocs/core/class/commonobject.class.php | 48 +- htdocs/includes/modules/modAdherent.class.php | 9 +- htdocs/includes/modules/modSociete.class.php | 4 +- htdocs/societe/class/societe.class.php | 23 +- htdocs/societe/soc.php | 12 +- 8 files changed, 467 insertions(+), 321 deletions(-) create mode 100644 htdocs/adherents/class/actions_adherent.class.php diff --git a/htdocs/adherents/class/actions_adherent.class.php b/htdocs/adherents/class/actions_adherent.class.php new file mode 100644 index 00000000000..529e836b83e --- /dev/null +++ b/htdocs/adherents/class/actions_adherent.class.php @@ -0,0 +1,37 @@ + + * + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/adherents/class/actions_adherent.class.php + * \ingroup member + * \brief File for member class + * \version $Id: actions_adherent.class.php,v 1.1 2011/08/09 17:59:48 hregis Exp $ + */ +require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php"); + + +/** + * \class ActionsAdherent + * \brief Class to manage members objects + */ +class ActionsAdherent extends Adherent +{ + +} + + +?> \ No newline at end of file diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 5b22c78609b..1f1c0d295fd 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -24,7 +24,7 @@ * \file htdocs/adherents/class/adherent.class.php * \ingroup member * \brief File of class to manage members of a foundation - * \version $Id: adherent.class.php,v 1.45 2011/08/03 00:45:44 eldy Exp $ + * \version $Id: adherent.class.php,v 1.46 2011/08/09 17:59:46 hregis Exp $ */ require_once(DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php"); @@ -420,12 +420,33 @@ class Adherent extends CommonObject if ($resql) { $nbrowsaffected+=$this->db->affected_rows($resql); - + + /* $result=$this->insertExtraFields(); if ($result < 0) { $error++; } + */ + + // Hook for external modules + if (! empty($this->hooks)) + { + foreach($this->hooks as $hook) + { + if ($hook['type'] == 'member_extrafields' && ! empty($hook['modules'])) + { + foreach($hook['modules'] as $module) + { + if (method_exists($module,'insertExtraFields')) + { + $result=$module->insertExtraFields($this); + if ($result < 0) $error++; + } + } + } + } + } // Update password if (! $error && $this->pass) diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index a3b9dc5e521..7804204f0fa 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -22,7 +22,7 @@ * \file htdocs/adherents/fiche.php * \ingroup member * \brief Page of member - * \version $Id: fiche.php,v 1.238 2011/07/31 22:23:27 eldy Exp $ + * \version $Id: fiche.php,v 1.239 2011/08/09 17:59:52 hregis Exp $ */ require("../main.inc.php"); @@ -32,7 +32,7 @@ require_once(DOL_DOCUMENT_ROOT."/lib/images.lib.php"); require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php"); require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php"); require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent_type.class.php"); -require_once(DOL_DOCUMENT_ROOT."/core/class/extrafields.class.php"); +//require_once(DOL_DOCUMENT_ROOT."/core/class/extrafields.class.php"); require_once(DOL_DOCUMENT_ROOT."/adherents/class/cotisation.class.php"); require_once(DOL_DOCUMENT_ROOT."/compta/bank/class/account.class.php"); require_once(DOL_DOCUMENT_ROOT."/core/class/html.formcompany.class.php"); @@ -45,8 +45,8 @@ $langs->load("users"); // Security check if (! $user->rights->adherent->lire) accessforbidden(); -$adh = new Adherent($db); -$extrafields = new ExtraFields($db); +$object = new Adherent($db); +//$extrafields = new ExtraFields($db); $errmsg=''; $errmsgs=array(); @@ -57,17 +57,17 @@ $typeid=GETPOST("typeid"); if ($rowid) { // Load member - $result = $adh->fetch($rowid); + $result = $object->fetch($rowid); // Define variables to know what current user can do on users $canadduser=($user->admin || $user->rights->user->user->creer); // Define variables to know what current user can do on properties of user linked to edited member - if ($adh->user_id) + if ($object->user_id) { - // $user est le user qui edite, $adh->user_id est l'id de l'utilisateur lies au membre edite - $caneditfielduser=( (($user->id == $adh->user_id) && $user->rights->user->self->creer) - || (($user->id != $adh->user_id) && $user->rights->user->user->creer) ); - $caneditpassworduser=( (($user->id == $adh->user_id) && $user->rights->user->self->password) + // $user est le user qui edite, $object->user_id est l'id de l'utilisateur lies au membre edite + $caneditfielduser=( (($user->id == $object->user_id) && $user->rights->user->self->creer) + || (($user->id != $object->user_id) && $user->rights->user->user->creer) ); + $caneditpassworduser=( (($user->id == $object->user_id) && $user->rights->user->self->password) || (($user->id != $adh->user_id) && $user->rights->user->user->password) ); } } @@ -80,6 +80,11 @@ if ($rowid) $caneditfieldmember=$user->rights->adherent->creer; } +// Instantiate hooks of thirdparty module. Note that conf->hooks_modules contains array array +if (is_array($conf->hooks_modules) && !empty($conf->hooks_modules)) +{ + $object->callHooks('member_extrafields'); +} /* @@ -91,7 +96,7 @@ if ($_POST['action'] == 'setuserid' && ($user->rights->user->self->creer || $use $error=0; if (empty($user->rights->user->user->creer)) // If can edit only itself user, we can link to itself only { - if ($_POST["userid"] != $user->id && $_POST["userid"] != $adh->user_id) + if ($_POST["userid"] != $user->id && $_POST["userid"] != $object->user_id) { $error++; $mesg='
'.$langs->trans("ErrorUserPermissionAllowsToLinksToItselfOnly").'
'; @@ -100,10 +105,10 @@ if ($_POST['action'] == 'setuserid' && ($user->rights->user->self->creer || $use if (! $error) { - if ($_POST["userid"] != $adh->user_id) // If link differs from currently in database + if ($_POST["userid"] != $object->user_id) // If link differs from currently in database { - $result=$adh->setUserId($_POST["userid"]); - if ($result < 0) dol_print_error($adh->db,$adh->error); + $result=$object->setUserId($_POST["userid"]); + if ($result < 0) dol_print_error($object->db,$object->error); $_POST['action']=''; $action=''; } @@ -114,7 +119,7 @@ if ($_POST['action'] == 'setsocid') $error=0; if (! $error) { - if ($_POST["socid"] != $adh->fk_soc) // If link differs from currently in database + if ($_POST["socid"] != $object->fk_soc) // If link differs from currently in database { $sql ="SELECT rowid FROM ".MAIN_DB_PREFIX."adherent"; $sql.=" WHERE fk_soc = '".$_POST["socid"]."'"; @@ -136,8 +141,8 @@ if ($_POST['action'] == 'setsocid') if (! $error) { - $result=$adh->setThirdPartyId($_POST["socid"]); - if ($result < 0) dol_print_error($adh->db,$adh->error); + $result=$object->setThirdPartyId($_POST["socid"]); + if ($result < 0) dol_print_error($object->db,$object->error); $_POST['action']=''; $action=''; } @@ -152,7 +157,7 @@ if ($_POST["action"] == 'confirm_create_user' && $_POST["confirm"] == 'yes' && $ { // Creation user $nuser = new User($db); - $result=$nuser->create_from_member($adh,$_POST["login"]); + $result=$nuser->create_from_member($object,$_POST["login"]); if ($result < 0) { @@ -162,7 +167,7 @@ if ($_POST["action"] == 'confirm_create_user' && $_POST["confirm"] == 'yes' && $ } else { - $errmsg=$adh->error; + $errmsg=$object->error; } } @@ -173,7 +178,7 @@ if ($_POST["action"] == 'confirm_create_thirdparty' && $_POST["confirm"] == 'yes { // Creation user $company = new Societe($db); - $result=$company->create_from_member($adh,$_POST["companyname"]); + $result=$company->create_from_member($object,$_POST["companyname"]); if ($result < 0) { @@ -184,15 +189,15 @@ if ($_POST["action"] == 'confirm_create_thirdparty' && $_POST["confirm"] == 'yes } else { - $errmsg=$adh->error; + $errmsg=$object->error; } } if ($_REQUEST["action"] == 'confirm_sendinfo' && $_REQUEST["confirm"] == 'yes') { - if ($adh->email) + if ($object->email) { - $result=$adh->send_an_email($langs->transnoentitiesnoconv("ThisIsContentOfYourCard")."\n\n%INFOS%\n\n",$langs->transnoentitiesnoconv("CardContent")); + $result=$object->send_an_email($langs->transnoentitiesnoconv("ThisIsContentOfYourCard")."\n\n%INFOS%\n\n",$langs->transnoentitiesnoconv("CardContent")); $mesg=$langs->trans("CardSent"); } } @@ -212,79 +217,79 @@ if ($_REQUEST["action"] == 'update' && ! $_POST["cancel"] && $user->rights->adhe // Create new object if ($result > 0) { - $adh->oldcopy=dol_clone($adh); + $object->oldcopy=dol_clone($object); // Change values - $adh->civilite_id = trim($_POST["civilite_id"]); - $adh->prenom = trim($_POST["prenom"]); - $adh->nom = trim($_POST["nom"]); - $adh->login = trim($_POST["login"]); - $adh->pass = trim($_POST["pass"]); + $object->civilite_id = trim($_POST["civilite_id"]); + $object->prenom = trim($_POST["prenom"]); + $object->nom = trim($_POST["nom"]); + $object->login = trim($_POST["login"]); + $object->pass = trim($_POST["pass"]); - $adh->societe = trim($_POST["societe"]); - $adh->adresse = trim($_POST["address"]); // deprecated - $adh->address = trim($_POST["address"]); - $adh->cp = trim($_POST["zipcode"]); // deprecated - $adh->zip = trim($_POST["zipcode"]); - $adh->ville = trim($_POST["town"]); // deprecated - $adh->town = trim($_POST["town"]); + $object->societe = trim($_POST["societe"]); + $object->adresse = trim($_POST["address"]); // deprecated + $object->address = trim($_POST["address"]); + $object->cp = trim($_POST["zipcode"]); // deprecated + $object->zip = trim($_POST["zipcode"]); + $object->ville = trim($_POST["town"]); // deprecated + $object->town = trim($_POST["town"]); - $adh->fk_departement = $_POST["departement_id"]; - $adh->pays_id = $_POST["pays_id"]; + $object->fk_departement = $_POST["departement_id"]; + $object->pays_id = $_POST["pays_id"]; - $adh->phone = trim($_POST["phone"]); - $adh->phone_perso = trim($_POST["phone_perso"]); - $adh->phone_mobile= trim($_POST["phone_mobile"]); - $adh->email = trim($_POST["email"]); - $adh->naiss = $datenaiss; + $object->phone = trim($_POST["phone"]); + $object->phone_perso = trim($_POST["phone_perso"]); + $object->phone_mobile= trim($_POST["phone_mobile"]); + $object->email = trim($_POST["email"]); + $object->naiss = $datenaiss; - $adh->typeid = $_POST["typeid"]; - $adh->note = trim($_POST["comment"]); - $adh->morphy = $_POST["morphy"]; + $object->typeid = $_POST["typeid"]; + $object->note = trim($_POST["comment"]); + $object->morphy = $_POST["morphy"]; - $adh->amount = $_POST["amount"]; + $object->amount = $_POST["amount"]; - if (GETPOST('deletephoto')) $adh->photo=''; - elseif (! empty($_FILES['photo']['name'])) $adh->photo = dol_sanitizeFileName($_FILES['photo']['name']); + if (GETPOST('deletephoto')) $object->photo=''; + elseif (! empty($_FILES['photo']['name'])) $object->photo = dol_sanitizeFileName($_FILES['photo']['name']); // Get status and public property - $adh->statut = $_POST["statut"]; - $adh->public = $_POST["public"]; + $object->statut = $_POST["statut"]; + $object->public = $_POST["public"]; // Get extra fields foreach($_POST as $key => $value) { if (preg_match("/^options_/",$key)) { - $adh->array_options[$key]=$_POST[$key]; + $object->array_options[$key]=$_POST[$key]; } } // Check if we need to also synchronize user information $nosyncuser=0; - if ($adh->user_id) // If linked to a user + if ($object->user_id) // If linked to a user { - if ($user->id != $adh->user_id && empty($user->rights->user->user->creer)) $nosyncuser=1; // Disable synchronizing + if ($user->id != $object->user_id && empty($user->rights->user->user->creer)) $nosyncuser=1; // Disable synchronizing } // Check if we need to also synchronize password information $nosyncuserpass=0; - if ($adh->user_id) // If linked to a user + if ($object->user_id) // If linked to a user { - if ($user->id != $adh->user_id && empty($user->rights->user->user->password)) $nosyncuserpass=1; // Disable synchronizing + if ($user->id != $object->user_id && empty($user->rights->user->user->password)) $nosyncuserpass=1; // Disable synchronizing } - $result=$adh->update($user,0,$nosyncuser,$nosyncuserpass); - if ($result >= 0 && ! sizeof($adh->errors)) + $result=$object->update($user,0,$nosyncuser,$nosyncuserpass); + if ($result >= 0 && ! sizeof($object->errors)) { - $dir= $conf->adherent->dir_output . '/' . get_exdir($adh->id,2,0,1).'/photos'; + $dir= $conf->adherent->dir_output . '/' . get_exdir($object->id,2,0,1).'/photos'; $file_OK = is_uploaded_file($_FILES['photo']['tmp_name']); if ($file_OK) { if (GETPOST('deletephoto')) { - $fileimg=$conf->adherent->dir_output.'/'.get_exdir($adh->id,2,0,1).'/photos/'.$adh->photo; - $dirthumbs=$conf->adherent->dir_output.'/'.get_exdir($adh->id,2,0,1).'/photos/thumbs'; + $fileimg=$conf->adherent->dir_output.'/'.get_exdir($object->id,2,0,1).'/photos/'.$object->photo; + $dirthumbs=$conf->adherent->dir_output.'/'.get_exdir($object->id,2,0,1).'/photos/thumbs'; dol_delete_file($fileimg); dol_delete_dir_recursive($dirthumbs); } @@ -318,13 +323,13 @@ if ($_REQUEST["action"] == 'update' && ! $_POST["cancel"] && $user->rights->adhe } } - $_GET["rowid"]=$adh->id; + $_GET["rowid"]=$object->id; $_REQUEST["action"]=''; } else { - if ($adh->error) $errmsg=$adh->error; - else $errmsgs=$adh->errors; + if ($object->error) $errmsg=$object->error; + else $errmsgs=$object->errors; $action=''; } } @@ -371,39 +376,39 @@ if ($_POST["action"] == 'add' && $user->rights->adherent->creer) $userid=$_POST["userid"]; $socid=$_POST["socid"]; - $adh->civilite_id = $civilite_id; - $adh->prenom = $prenom; - $adh->nom = $nom; - $adh->societe = $societe; - $adh->adresse = $address; // deprecated - $adh->address = $address; - $adh->cp = $zip; // deprecated - $adh->zip = $zip; - $adh->ville = $town; // deprecated - $adh->town = $town; - $adh->fk_departement = $departement_id; - $adh->pays_id = $pays_id; - $adh->phone = $phone; - $adh->phone_perso = $phone_perso; - $adh->phone_mobile= $phone_mobile; - $adh->email = $email; - $adh->login = $login; - $adh->pass = $pass; - $adh->naiss = $datenaiss; - $adh->photo = $photo; - $adh->typeid = $typeid; - $adh->note = $comment; - $adh->morphy = $morphy; - $adh->user_id = $userid; - $adh->fk_soc = $socid; - $adh->public = $public; + $object->civilite_id = $civilite_id; + $object->prenom = $prenom; + $object->nom = $nom; + $object->societe = $societe; + $object->adresse = $address; // deprecated + $object->address = $address; + $object->cp = $zip; // deprecated + $object->zip = $zip; + $object->ville = $town; // deprecated + $object->town = $town; + $object->fk_departement = $departement_id; + $object->pays_id = $pays_id; + $object->phone = $phone; + $object->phone_perso = $phone_perso; + $object->phone_mobile= $phone_mobile; + $object->email = $email; + $object->login = $login; + $object->pass = $pass; + $object->naiss = $datenaiss; + $object->photo = $photo; + $object->typeid = $typeid; + $object->note = $comment; + $object->morphy = $morphy; + $object->user_id = $userid; + $object->fk_soc = $socid; + $object->public = $public; // Get extra fields foreach($_POST as $key => $value) { if (preg_match("/^options_/",$key)) { - $adh->array_options[$key]=$_POST[$key]; + $object->array_options[$key]=$_POST[$key]; } } @@ -463,19 +468,19 @@ if ($_POST["action"] == 'add' && $user->rights->adherent->creer) $db->begin(); // Email a peu pres correct et le login n'existe pas - $result=$adh->create($user); + $result=$object->create($user); if ($result > 0) { $db->commit(); - $rowid=$adh->id; + $rowid=$object->id; $action=''; } else { $db->rollback(); - if ($adh->error) $errmsg=$adh->error; - else $errmsgs=$adh->errors; + if ($object->error) $errmsg=$object->error; + else $errmsgs=$object->errors; $action = 'create'; } @@ -487,7 +492,7 @@ if ($_POST["action"] == 'add' && $user->rights->adherent->creer) if ($user->rights->adherent->supprimer && $_REQUEST["action"] == 'confirm_delete' && $_REQUEST["confirm"] == 'yes') { - $result=$adh->delete($rowid); + $result=$object->delete($rowid); if ($result > 0) { Header("Location: liste.php"); @@ -495,40 +500,40 @@ if ($user->rights->adherent->supprimer && $_REQUEST["action"] == 'confirm_delete } else { - $errmesg=$adh->error; + $errmesg=$object->error; } } if ($user->rights->adherent->creer && $_POST["action"] == 'confirm_valid' && $_POST["confirm"] == 'yes') { - $result=$adh->validate($user); + $result=$object->validate($user); $adht = new AdherentType($db); - $adht->fetch($adh->typeid); + $adht->fetch($object->typeid); - if ($result >= 0 && ! sizeof($adh->errors)) + if ($result >= 0 && ! sizeof($object->errors)) { // Send confirmation Email (selon param du type adherent sinon generique) - if ($adh->email && $_POST["send_mail"]) + if ($object->email && $_POST["send_mail"]) { - $result=$adh->send_an_email($adht->getMailOnValid(),$conf->global->ADHERENT_MAIL_VALID_SUBJECT,array(),array(),array(),"","",0,2); + $result=$object->send_an_email($adht->getMailOnValid(),$conf->global->ADHERENT_MAIL_VALID_SUBJECT,array(),array(),array(),"","",0,2); if ($result < 0) { - $errmsg.=$adh->error; + $errmsg.=$object->error; } } // Rajoute l'utilisateur dans les divers abonnements (mailman, spip, etc...) - if ($adh->add_to_abo() < 0) + if ($object->add_to_abo() < 0) { // error - $errmsg.= $langs->trans("FaildToAddToMailmanList").': '.$adh->error."
\n"; + $errmsg.= $langs->trans("FaildToAddToMailmanList").': '.$object->error."
\n"; } } else { - if ($adh->error) $errmsg=$adh->error; - else $errmsgs=$adh->errors; + if ($object->error) $errmsg=$object->error; + else $errmsgs=$object->errors; $action=''; } } @@ -536,53 +541,53 @@ if ($user->rights->adherent->creer && $_POST["action"] == 'confirm_valid' && $_P if ($user->rights->adherent->supprimer && $_POST["action"] == 'confirm_resign' && $_POST["confirm"] == 'yes') { $adht = new AdherentType($db); - $adht->fetch($adh->typeid); + $adht->fetch($object->typeid); - $result=$adh->resiliate($user); + $result=$object->resiliate($user); - if ($result >= 0 && ! sizeof($adh->errors)) + if ($result >= 0 && ! sizeof($object->errors)) { - if ($adh->email && $_POST["send_mail"]) + if ($object->email && $_POST["send_mail"]) { - $result=$adh->send_an_email($adht->getMailOnResiliate(),$conf->global->ADHERENT_MAIL_RESIL_SUBJECT,array(),array(),array(),"","",0,-1); + $result=$object->send_an_email($adht->getMailOnResiliate(),$conf->global->ADHERENT_MAIL_RESIL_SUBJECT,array(),array(),array(),"","",0,-1); } if ($result < 0) { - $errmsg.=$adh->error; + $errmsg.=$object->error; } // supprime l'utilisateur des divers abonnements .. - if ($adh->del_to_abo() < 0) + if ($object->del_to_abo() < 0) { // error - $errmsg.=$langs->trans("FaildToRemoveFromMailmanList").': '.$adh->error."
\n"; + $errmsg.=$langs->trans("FaildToRemoveFromMailmanList").': '.$object->error."
\n"; } } else { - if ($adh->error) $errmsg=$adh->error; - else $errmsgs=$adh->errors; + if ($object->error) $errmsg=$object->error; + else $errmsgs=$object->errors; $action=''; } } if ($user->rights->adherent->supprimer && $_POST["action"] == 'confirm_del_spip' && $_POST["confirm"] == 'yes') { - if (! sizeof($adh->errors)) + if (! sizeof($object->errors)) { - if(!$adh->del_to_spip()){ - $errmsg.="Echec de la suppression de l'utilisateur dans spip: ".$adh->error."
\n"; + if(!$object->del_to_spip()){ + $errmsg.="Echec de la suppression de l'utilisateur dans spip: ".$object->error."
\n"; } } } if ($user->rights->adherent->creer && $_POST["action"] == 'confirm_add_spip' && $_POST["confirm"] == 'yes') { - if (! sizeof($adh->errors)) + if (! sizeof($object->errors)) { - if (!$adh->add_to_spip()) + if (!$object->add_to_spip()) { - $errmsg.="Echec du rajout de l'utilisateur dans spip: ".$adh->error."
\n"; + $errmsg.="Echec du rajout de l'utilisateur dans spip: ".$object->error."
\n"; } } } @@ -594,7 +599,7 @@ if ($user->rights->adherent->creer && $_POST["action"] == 'confirm_add_spip' && */ // fetch optionals attributes and labels -$extralabels=$extrafields->fetch_name_optionals_label('member'); +//$extralabels=$extrafields->fetch_name_optionals_label('member'); $help_url='EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros'; llxHeader('',$langs->trans("Member"),$help_url); @@ -611,15 +616,15 @@ if ($action == 'create') /* Fiche creation */ /* */ /* ************************************************************************** */ - $adh->fk_departement = $_POST["departement_id"]; + $object->fk_departement = $_POST["departement_id"]; // We set pays_id, pays_code and label for the selected country - $adh->pays_id=$_POST["pays_id"]?$_POST["pays_id"]:$mysoc->pays_id; - if ($adh->pays_id) + $object->pays_id=$_POST["pays_id"]?$_POST["pays_id"]:$mysoc->pays_id; + if ($object->pays_id) { $sql = "SELECT rowid, code, libelle"; $sql.= " FROM ".MAIN_DB_PREFIX."c_pays"; - $sql.= " WHERE rowid = ".$adh->pays_id; + $sql.= " WHERE rowid = ".$object->pays_id; $resql=$db->query($sql); if ($resql) { @@ -629,9 +634,9 @@ if ($action == 'create') { dol_print_error($db); } - $adh->pays_id=$obj->rowid; - $adh->pays_code=$obj->code; - $adh->pays=$obj->libelle; + $object->pays_id=$obj->rowid; + $object->pays_code=$obj->code; + $object->pays=$obj->libelle; } $adht = new AdherentType($db); @@ -662,14 +667,14 @@ if ($action == 'create') // Login if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) { - print ''.$langs->trans("Login").' / '.$langs->trans("Id").'login).'">'; + print ''.$langs->trans("Login").' / '.$langs->trans("Id").'login).'">'; } // Moral-Physique $morphys["phy"] = $langs->trans("Physical"); $morphys["mor"] = $langs->trans("Moral"); print ''.$langs->trans("Nature")."\n"; - print $html->selectarray("morphy", $morphys, isset($_POST["morphy"])?$_POST["morphy"]:$adh->morphy, 1); + print $html->selectarray("morphy", $morphys, isset($_POST["morphy"])?$_POST["morphy"]:$object->morphy, 1); print "\n"; // Type @@ -684,19 +689,19 @@ if ($action == 'create') print "\n"; // Company - print ''.$langs->trans("Company").'societe).'">'; + print ''.$langs->trans("Company").'societe).'">'; // Civility print ''.$langs->trans("UserTitle").''; - print $htmlcompany->select_civilite(isset($_POST["civilite_id"])?$_POST["civilite_id"]:$adh->civilite_id,'civilite_id').''; + print $htmlcompany->select_civilite(isset($_POST["civilite_id"])?$_POST["civilite_id"]:$object->civilite_id,'civilite_id').''; print ''; // Lastname - print ''.$langs->trans("Lastname").'nom).'" size="40">'; + print ''.$langs->trans("Lastname").'nom).'" size="40">'; print ''; // Firstname - print ''.$langs->trans("Firstname").'prenom).'">'; + print ''.$langs->trans("Firstname").'prenom).'">'; print ''; // Password @@ -711,20 +716,20 @@ if ($action == 'create') // Address print ''.$langs->trans("Address").''; - print ''; + print ''; print ''; // Zip / Town print ''.$langs->trans("Zip").' / '.$langs->trans("Town").''; - print $htmlcompany->select_ziptown((isset($_POST["zipcode"])?$_POST["zipcode"]:$adh->zip),'zipcode',array('town','selectpays_id','departement_id'),6); + print $htmlcompany->select_ziptown((isset($_POST["zipcode"])?$_POST["zipcode"]:$object->zip),'zipcode',array('town','selectpays_id','departement_id'),6); print ' '; - print $htmlcompany->select_ziptown((isset($_POST["town"])?$_POST["town"]:$adh->town),'town',array('zipcode','selectpays_id','departement_id')); + print $htmlcompany->select_ziptown((isset($_POST["town"])?$_POST["town"]:$object->town),'town',array('zipcode','selectpays_id','departement_id')); print ''; // Country - $adh->pays_id=$adh->pays_id?$adh->pays_id:$mysoc->pays_id; + $object->pays_id=$object->pays_id?$object->pays_id:$mysoc->pays_id; print ''.$langs->trans('Country').''; - $html->select_pays(isset($_POST["pays_id"])?$_POST["pays_id"]:$adh->pays_id,'pays_id'); + $html->select_pays(isset($_POST["pays_id"])?$_POST["pays_id"]:$object->pays_id,'pays_id'); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1); print ''; @@ -732,9 +737,9 @@ if ($action == 'create') if (empty($conf->global->MEMBER_DISABLE_STATE)) { print ''.$langs->trans('State').''; - if ($adh->pays_id) + if ($object->pays_id) { - $htmlcompany->select_departement(isset($_POST["departement_id"])?$_POST["departement_id"]:$adh->fk_departement,$adh->pays_code); + $htmlcompany->select_departement(isset($_POST["departement_id"])?$_POST["departement_id"]:$object->fk_departement,$object->pays_code); } else { @@ -744,28 +749,29 @@ if ($action == 'create') } // Tel pro - print ''.$langs->trans("PhonePro").'phone).'">'; + print ''.$langs->trans("PhonePro").'phone).'">'; // Tel perso - print ''.$langs->trans("PhonePerso").'phone_perso).'">'; + print ''.$langs->trans("PhonePerso").'phone_perso).'">'; // Tel mobile - print ''.$langs->trans("PhoneMobile").'phone_mobile).'">'; + print ''.$langs->trans("PhoneMobile").'phone_mobile).'">'; // EMail - print ''.($conf->global->ADHERENT_MAIL_REQUIRED?'':'').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED?'':'').'email).'">'; + print ''.($conf->global->ADHERENT_MAIL_REQUIRED?'':'').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED?'':'').'email).'">'; // Birthday print "".$langs->trans("Birthday")."\n"; - $html->select_date(($adh->naiss ? $adh->naiss : -1),'naiss','','',1,'formsoc'); + $html->select_date(($object->naiss ? $object->naiss : -1),'naiss','','',1,'formsoc'); print "\n"; // Profil public print "".$langs->trans("Public")."\n"; - print $html->selectyesno("public",$adh->public,1); + print $html->selectyesno("public",$object->public,1); print "\n"; // Attribut optionnels + /* foreach($extrafields->attribute_label as $key=>$label) { $value=(isset($_POST["options_".$key])?$_POST["options_".$key]:''); @@ -773,19 +779,38 @@ if ($action == 'create') print $extrafields->showInputField($key,$value); print ''."\n"; } + */ + + // Hook for external modules + if (! empty($object->hooks)) + { + foreach($object->hooks as $hook) + { + if ($hook['type'] == 'member_extrafields' && ! empty($hook['modules'])) + { + foreach($hook['modules'] as $module) + { + if (method_exists($module,'showInputFields')) + { + $module->showInputFields($object,$_POST); + } + } + } + } + } /* // Third party Dolibarr if ($conf->societe->enabled) { print ''.$langs->trans("LinkedToDolibarrThirdParty").''; - print $html->select_societes($adh->fk_soc,'socid','',1); + print $html->select_societes($object->fk_soc,'socid','',1); print ''; } // Login Dolibarr print ''.$langs->trans("LinkedToDolibarrUser").''; - print $html->select_users($adh->user_id,'userid',1); + print $html->select_users($object->user_id,'userid',1); print ''; */ print "\n"; @@ -805,19 +830,19 @@ if ($action == 'edit') * ********************************************/ - $adh = new Adherent($db); - $res=$adh->fetch($rowid); - if ($res < 0) { dol_print_error($db,$adh->error); exit; } - $res=$adh->fetch_optionals($rowid,$extralabels); - if ($res < 0) { dol_print_error($db); exit; } + //$object = new Adherent($db); + $res=$object->fetch($rowid); + if ($res < 0) { dol_print_error($db,$object->error); exit; } + //$res=$object->fetch_optionals($rowid,$extralabels); + //if ($res < 0) { dol_print_error($db); exit; } $adht = new AdherentType($db); - $adht->fetch($adh->typeid); + $adht->fetch($object->typeid); // We set pays_id, and pays_code label of the chosen country - if (isset($_POST["pays"]) || $adh->pays_id) + if (isset($_POST["pays"]) || $object->pays_id) { - $sql = "SELECT rowid, code, libelle from ".MAIN_DB_PREFIX."c_pays where rowid = ".(isset($_POST["pays"])?$_POST["pays"]:$adh->pays_id); + $sql = "SELECT rowid, code, libelle from ".MAIN_DB_PREFIX."c_pays where rowid = ".(isset($_POST["pays"])?$_POST["pays"]:$object->pays_id); $resql=$db->query($sql); if ($resql) { @@ -827,12 +852,12 @@ if ($action == 'edit') { dol_print_error($db); } - $adh->pays_id=$obj->rowid; - $adh->pays_code=$obj->code; - $adh->pays=$langs->trans("Country".$obj->code)?$langs->trans("Country".$obj->code):$obj->libelle; + $object->pays_id=$obj->rowid; + $object->pays_code=$obj->code; + $object->pays=$langs->trans("Country".$obj->code)?$langs->trans("Country".$obj->code):$obj->libelle; } - $head = member_prepare_head($adh); + $head = member_prepare_head($object); dol_fiche_head($head, 'general', $langs->trans("Member"), 0, 'user'); @@ -852,42 +877,41 @@ if ($action == 'edit') print ''."\n"; } - $rowspan=17; - if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) $rowspan+=1; - $rowspan+=sizeof($extrafields->attribute_label); + $rowspan=15; + if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) $rowspan++; if ($conf->societe->enabled) $rowspan++; print '
'; - print ''; - print ""; - print ""; - print "statut."\">"; + print ''; + print ''; + print ''; + print ''; print ''; // Ref - print ''; + print ''; // Login if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) { - print ''; + print ''; } // Physique-Moral $morphys["phy"] = $langs->trans("Physical"); $morphys["mor"] = $langs->trans("Morale"); print '"; // Photo print '"; // Company - print ''; + print ''; // Civilite print ''; print ''; // Name - print ''; + print ''; print ''; // Firstname - print ''; + print ''; print ''; // Password if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) { - print ''; + print ''; } // Address print ''; // Zip / Town print ''; // Country - //$adh->pays_id=$adh->pays_id?$adh->pays_id:$mysoc->pays_id; // In edit mode we don't force to company country if not defined + //$object->pays_id=$object->pays_id?$object->pays_id:$mysoc->pays_id; // In edit mode we don't force to company country if not defined print ''; @@ -953,49 +977,69 @@ if ($action == 'edit') if (empty($conf->global->MEMBER_DISABLE_STATE)) { print ''; } // Tel - print ''; + print ''; // Tel perso - print ''; + print ''; // Tel mobile - print ''; + print ''; // EMail - print ''; + print ''; // Date naissance print "\n"; // Profil public print "\n"; // Other attributes + /* foreach($extrafields->attribute_label as $key=>$label) { - $value=(isset($_POST["options_$key"])?$_POST["options_$key"]:$adh->array_options["options_$key"]); + $value=(isset($_POST["options_$key"])?$_POST["options_$key"]:$object->array_options["options_$key"]); print "\n"; } + */ + + // Hook for external modules + if (! empty($object->hooks)) + { + foreach($object->hooks as $hook) + { + if ($hook['type'] == 'member_extrafields' && ! empty($hook['modules'])) + { + foreach($hook['modules'] as $module) + { + if (method_exists($module,'showInputFields')) + { + $module->showInputFields($object,$_POST,$rowid); + } + } + } + } + } // Third party Dolibarr if ($conf->societe->enabled) { - print ''; @@ -1035,21 +1079,21 @@ if ($rowid && $action != 'edit') /* */ /* ************************************************************************** */ - $adh = new Adherent($db); - $res=$adh->fetch($rowid); - if ($res < 0) { dol_print_error($db,$adh->error); exit; } - $res=$adh->fetch_optionals($rowid,$extralabels); - if ($res < 0) { dol_print_error($db); exit; } + //$object = new Adherent($db); + $res=$object->fetch($rowid); + if ($res < 0) { dol_print_error($db,$object->error); exit; } + //$res=$object->fetch_optionals($rowid,$extralabels); + //if ($res < 0) { dol_print_error($db); exit; } $adht = new AdherentType($db); - $res=$adht->fetch($adh->typeid); + $res=$adht->fetch($object->typeid); if ($res < 0) { dol_print_error($db); exit; } /* * Affichage onglets */ - $head = member_prepare_head($adh); + $head = member_prepare_head($object); dol_fiche_head($head, 'general', $langs->trans("Member"), 0, 'user'); @@ -1058,14 +1102,14 @@ if ($rowid && $action != 'edit') // Confirm create user if ($_GET["action"] == 'create_user') { - $login=$adh->login; + $login=$object->login; if (empty($login)) { // Full firstname and name separated with a dot : firstname.name include_once(DOL_DOCUMENT_ROOT.'/lib/functions2.lib.php'); - $login=dol_buildlogin($adh->nom,$adh->prenom); + $login=dol_buildlogin($object->nom,$object->prenom); } - if (empty($login)) $login=strtolower(substr($adh->prenom, 0, 4)) . strtolower(substr($adh->nom, 0, 4)); + if (empty($login)) $login=strtolower(substr($object->prenom, 0, 4)) . strtolower(substr($object->nom, 0, 4)); // Create a form array $formquestion=array( @@ -1074,31 +1118,31 @@ if ($rowid && $action != 'edit') $text=$langs->trans("ConfirmCreateLogin").'
'; if ($conf->societe->enabled) { - if ($adh->fk_soc > 0) $text.=$langs->trans("UserWillBeExternalUser"); + if ($object->fk_soc > 0) $text.=$langs->trans("UserWillBeExternalUser"); else $text.=$langs->trans("UserWillBeInternalUser"); } - $ret=$html->form_confirm($_SERVER["PHP_SELF"]."?rowid=".$adh->id,$langs->trans("CreateDolibarrLogin"),$text,"confirm_create_user",$formquestion,'yes'); + $ret=$html->form_confirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrLogin"),$text,"confirm_create_user",$formquestion,'yes'); if ($ret == 'html') print '
'; } // Confirm create third party if ($_GET["action"] == 'create_thirdparty') { - $name = $adh->getFullName($langs); + $name = $object->getFullName($langs); if (! empty($name)) { - if ($adh->societe) $name.=' ('.$adh->societe.')'; + if ($object->societe) $name.=' ('.$object->societe.')'; } else { - $name=$adh->societe; + $name=$object->societe; } // Create a form array $formquestion=array( array('label' => $langs->trans("NameToCreate"), 'type' => 'text', 'name' => 'companyname', 'value' => $name)); - $ret=$html->form_confirm($_SERVER["PHP_SELF"]."?rowid=".$adh->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1); + $ret=$html->form_confirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1); if ($ret == 'html') print '
'; } @@ -1108,17 +1152,17 @@ if ($rowid && $action != 'edit') $langs->load("mails"); $adht = new AdherentType($db); - $adht->fetch($adh->typeid); + $adht->fetch($object->typeid); - $subjecttosend=$adh->makeSubstitution($conf->global->ADHERENT_MAIL_VALID_SUBJECT); - $texttosend=$adh->makeSubstitution($adht->getMailOnValid()); + $subjecttosend=$object->makeSubstitution($conf->global->ADHERENT_MAIL_VALID_SUBJECT); + $texttosend=$object->makeSubstitution($adht->getMailOnValid()); $tmp=$langs->trans("SendAnEMailToMember"); $tmp.=' ('.$langs->trans("MailFrom").': '.$conf->global->ADHERENT_MAIL_FROM.', '; - $tmp.=$langs->trans("MailRecipient").': '.$adh->email.')'; + $tmp.=$langs->trans("MailRecipient").': '.$object->email.')'; $helpcontent=''; $helpcontent.=''.$langs->trans("MailFrom").': '.$conf->global->ADHERENT_MAIL_FROM.'
'."\n"; - $helpcontent.=''.$langs->trans("MailRecipient").': '.$adh->email.'
'."\n"; + $helpcontent.=''.$langs->trans("MailRecipient").': '.$object->email.'
'."\n"; $helpcontent.=''.$langs->trans("Subject").':
'."\n"; $helpcontent.=$subjecttosend."\n"; $helpcontent.="
"; @@ -1128,7 +1172,7 @@ if ($rowid && $action != 'edit') // Cree un tableau formulaire $formquestion=array(); - if ($adh->email) $formquestion[0]=array('type' => 'checkbox', 'name' => 'send_mail', 'label' => $label, 'value' => ($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL?true:false)); + if ($object->email) $formquestion[0]=array('type' => 'checkbox', 'name' => 'send_mail', 'label' => $label, 'value' => ($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL?true:false)); $ret=$html->form_confirm("fiche.php?rowid=$rowid",$langs->trans("ValidateMember"),$langs->trans("ConfirmValidateMember"),"confirm_valid",$formquestion,1); if ($ret == 'html') print '
'; } @@ -1136,7 +1180,7 @@ if ($rowid && $action != 'edit') // Confirm send card by mail if ($action == 'sendinfo') { - $ret=$html->form_confirm("fiche.php?rowid=$rowid",$langs->trans("SendCardByMail"),$langs->trans("ConfirmSendCardByMail",$adh->email),"confirm_sendinfo",'',0,1); + $ret=$html->form_confirm("fiche.php?rowid=$rowid",$langs->trans("SendCardByMail"),$langs->trans("ConfirmSendCardByMail",$object->email),"confirm_sendinfo",'',0,1); if ($ret == 'html') print '
'; } @@ -1146,17 +1190,17 @@ if ($rowid && $action != 'edit') $langs->load("mails"); $adht = new AdherentType($db); - $adht->fetch($adh->typeid); + $adht->fetch($object->typeid); - $subjecttosend=$adh->makeSubstitution($conf->global->ADHERENT_MAIL_RESIL_SUBJECT); - $texttosend=$adh->makeSubstitution($adht->getMailOnResiliate()); + $subjecttosend=$object->makeSubstitution($conf->global->ADHERENT_MAIL_RESIL_SUBJECT); + $texttosend=$object->makeSubstitution($adht->getMailOnResiliate()); $tmp=$langs->trans("SendAnEMailToMember"); $tmp.=' ('.$langs->trans("MailFrom").': '.$conf->global->ADHERENT_MAIL_FROM.', '; - $tmp.=$langs->trans("MailRecipient").': '.$adh->email.')'; + $tmp.=$langs->trans("MailRecipient").': '.$object->email.')'; $helpcontent=''; $helpcontent.=''.$langs->trans("MailFrom").': '.$conf->global->ADHERENT_MAIL_FROM.'
'."\n"; - $helpcontent.=''.$langs->trans("MailRecipient").': '.$adh->email.'
'."\n"; + $helpcontent.=''.$langs->trans("MailRecipient").': '.$object->email.'
'."\n"; $helpcontent.=''.$langs->trans("Subject").':
'."\n"; $helpcontent.=$subjecttosend."\n"; $helpcontent.="
"; @@ -1166,7 +1210,7 @@ if ($rowid && $action != 'edit') // Cree un tableau formulaire $formquestion=array(); - if ($adh->email) $formquestion[0]=array('type' => 'checkbox', 'name' => 'send_mail', 'label' => $label, 'value' => ($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL?'true':'false')); + if ($object->email) $formquestion[0]=array('type' => 'checkbox', 'name' => 'send_mail', 'label' => $label, 'value' => ($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL?'true':'false')); $ret=$html->form_confirm("fiche.php?rowid=$rowid",$langs->trans("ResiliateMember"),$langs->trans("ConfirmResiliateMember"),"confirm_resign",$formquestion); if ($ret == 'html') print '
'; } @@ -1196,8 +1240,8 @@ if ($rowid && $action != 'edit') if ($ret == 'html') print '
'; } - $rowspan=19+sizeof($extrafields->attribute_label); - if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) $rowspan+=1; + $rowspan=17; + if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) $rowspan++; if ($conf->societe->enabled) $rowspan++; print '
'.$langs->trans("Ref").''.$adh->id.'
'.$langs->trans("Ref").''.$object->id.'
'.$langs->trans("Login").' / '.$langs->trans("Id").'login).'">
'.$langs->trans("Login").' / '.$langs->trans("Id").'login).'">
'.$langs->trans("Nature").''; - print $html->selectarray("morphy", $morphys, isset($_POST["morphy"])?$_POST["morphy"]:$adh->morphy); + print $html->selectarray("morphy", $morphys, isset($_POST["morphy"])?$_POST["morphy"]:$object->morphy); print "'; - print $html->showphoto('memberphoto',$adh)."\n"; + print $html->showphoto('memberphoto',$object)."\n"; if ($caneditfieldmember) { - if ($adh->photo) print "
\n"; + if ($object->photo) print "
\n"; print ''; - if ($adh->photo) print ''; + if ($object->photo) print ''; print ''; print ''; print '
'.$langs->trans("Delete").'

'.$langs->trans("Delete").'

'.$langs->trans("PhotoFile").'
'; @@ -898,54 +922,54 @@ if ($action == 'edit') print '
'.$langs->trans("Type").''; if ($user->rights->adherent->creer) { - print $html->selectarray("typeid", $adht->liste_array(), (isset($_POST["typeid"])?$_POST["typeid"]:$adh->typeid)); + print $html->selectarray("typeid", $adht->liste_array(), (isset($_POST["typeid"])?$_POST["typeid"]:$object->typeid)); } else { print $adht->getNomUrl(1); - print ''; + print ''; } print "
'.$langs->trans("Company").'societe).'">
'.$langs->trans("Company").'societe).'">
'.$langs->trans("UserTitle").''; - print $htmlcompany->select_civilite(isset($_POST["civilite_id"])?$_POST["civilite_id"]:$adh->civilite_id)."\n"; + print $htmlcompany->select_civilite(isset($_POST["civilite_id"])?$_POST["civilite_id"]:$object->civilite_id)."\n"; print '
'.$langs->trans("Lastname").'nom).'">
'.$langs->trans("Lastname").'nom).'">
'.$langs->trans("Firstname").'prenom).'">
'.$langs->trans("Firstname").'prenom).'">
'.$langs->trans("Password").'pass).'">
'.$langs->trans("Password").'pass).'">
'.$langs->trans("Address").''; - print ''; + print ''; print '
'.$langs->trans("Zip").' / '.$langs->trans("Town").''; - print $htmlcompany->select_ziptown((isset($_POST["zipcode"])?$_POST["zipcode"]:$adh->zip),'zipcode',array('town','selectpays_id','departement_id'),6); + print $htmlcompany->select_ziptown((isset($_POST["zipcode"])?$_POST["zipcode"]:$object->zip),'zipcode',array('town','selectpays_id','departement_id'),6); print ' '; - print $htmlcompany->select_ziptown((isset($_POST["town"])?$_POST["town"]:$adh->town),'town',array('zipcode','selectpays_id','departement_id')); + print $htmlcompany->select_ziptown((isset($_POST["town"])?$_POST["town"]:$object->town),'town',array('zipcode','selectpays_id','departement_id')); print '
'.$langs->trans('Country').''; - $html->select_pays(isset($_POST["pays_id"])?$_POST["pays_id"]:$adh->pays_id,'pays_id'); + $html->select_pays(isset($_POST["pays_id"])?$_POST["pays_id"]:$object->pays_id,'pays_id'); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1); print '
'.$langs->trans('State').''; - $htmlcompany->select_departement($adh->fk_departement,$adh->pays_code); + $htmlcompany->select_departement($object->fk_departement,$object->pays_code); print '
'.$langs->trans("PhonePro").'phone).'">
'.$langs->trans("PhonePro").'phone).'">
'.$langs->trans("PhonePerso").'phone_perso).'">
'.$langs->trans("PhonePerso").'phone_perso).'">
'.$langs->trans("PhoneMobile").'phone_mobile).'">
'.$langs->trans("PhoneMobile").'phone_mobile).'">
'.($conf->global->ADHERENT_MAIL_REQUIRED?'':'').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED?'':'').'email).'">
'.($conf->global->ADHERENT_MAIL_REQUIRED?'':'').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED?'':'').'email).'">
".$langs->trans("Birthday")."\n"; - $html->select_date(($adh->naiss ? $adh->naiss : -1),'naiss','','',1,'formsoc'); + $html->select_date(($object->naiss ? $object->naiss : -1),'naiss','','',1,'formsoc'); print "
".$langs->trans("Public")."\n"; - print $html->selectyesno("public",(isset($_POST["public"])?$_POST["public"]:$adh->public),1); + print $html->selectyesno("public",(isset($_POST["public"])?$_POST["public"]:$object->public),1); print "
".$label.""; print $extrafields->showInputField($key,$value); print "
'.$langs->trans("LinkedToDolibarrThirdParty").''; - if ($adh->fk_soc) + print '
'.$langs->trans("LinkedToDolibarrThirdParty").''; + if ($object->fk_soc) { $company=new Societe($db); - $result=$company->fetch($adh->fk_soc); + $result=$company->fetch($object->fk_soc); print $company->getNomUrl(1); } else @@ -1006,10 +1050,10 @@ if ($action == 'edit') } // Login Dolibarr - print '
'.$langs->trans("LinkedToDolibarrUser").''; - if ($adh->user_id) + print '
'.$langs->trans("LinkedToDolibarrUser").''; + if ($object->user_id) { - print $html->form_users($_SERVER['PHP_SELF'].'?rowid='.$adh->id,$adh->user_id,'none'); + print $html->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id,$object->user_id,'none'); } else print $langs->trans("NoDolibarrAccess"); print '
'; @@ -1205,23 +1249,23 @@ if ($rowid && $action != 'edit') // Ref print ''; print ''; $showphoto=''; // Login if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) { - print ''; + print ''; print $showphoto; $showphoto=''; print ''; } // Morphy - print ''; + print ''; print $showphoto; $showphoto=''; print ''; @@ -1229,72 +1273,92 @@ if ($rowid && $action != 'edit') print '\n"; // Company - print ''; + print ''; // Civility - print ''; + print ''; print ''; // Name - print ''; + print ''; print ''; // Firstname - print ''; + print ''; // Password if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) { - print ''; + print ''; } // Address print ''; // Zip / Town - print ''; + print ''; // Country print ''; // State - print ''; + print ''; // Tel pro. - print ''; + print ''; // Tel perso - print ''; + print ''; // Tel mobile - print ''; + print ''; // EMail - print ''; + print ''; // Date naissance - print ''; + print ''; // Public - print ''; + print ''; // Status - print ''; + print ''; // Other attributes + /* foreach($extrafields->attribute_label as $key=>$label) { - $value=$adh->array_options["options_$key"]; + $value=$object->array_options["options_$key"]; print "\n"; } + */ + + // Hook for external modules + if (! empty($object->hooks)) + { + foreach($object->hooks as $hook) + { + if ($hook['type'] == 'member_extrafields' && ! empty($hook['modules'])) + { + foreach($hook['modules'] as $module) + { + if (method_exists($module,'showOutputFields')) + { + $module->showOutputFields($object,$rowid); + } + } + } + } + } // Third party Dolibarr if ($conf->societe->enabled) @@ -1303,29 +1367,29 @@ if ($rowid && $action != 'edit') print '
'.$langs->trans("Ref").''; - print $html->showrefnav($adh,'rowid'); + print $html->showrefnav($object,'rowid'); print '
'; - $showphoto.=$html->showphoto('memberphoto',$adh); + $showphoto.=$html->showphoto('memberphoto',$object); $showphoto.='
'.$langs->trans("Login").' / '.$langs->trans("Id").''.$adh->login.' 
'.$langs->trans("Login").' / '.$langs->trans("Id").''.$object->login.' 
'.$langs->trans("Nature").''.$adh->getmorphylib().'
'.$langs->trans("Nature").''.$object->getmorphylib().'
'.$langs->trans("Type").''.$adht->getNomUrl(1)."
'.$langs->trans("Company").''.$adh->societe.'
'.$langs->trans("Company").''.$object->societe.'
'.$langs->trans("UserTitle").''.$adh->getCivilityLabel().' 
'.$langs->trans("UserTitle").''.$object->getCivilityLabel().' 
'.$langs->trans("Lastname").''.$adh->nom.' 
'.$langs->trans("Lastname").''.$object->nom.' 
'.$langs->trans("Firstname").''.$adh->prenom.' 
'.$langs->trans("Firstname").''.$object->prenom.' 
'.$langs->trans("Password").''.preg_replace('/./i','*',$adh->pass).'
'.$langs->trans("Password").''.preg_replace('/./i','*',$object->pass).'
'.$langs->trans("Address").''; - dol_print_address($adh->address,'gmap','member',$adh->id); + dol_print_address($object->address,'gmap','member',$object->id); print '
'.$langs->trans("Zip").' / '.$langs->trans("Town").''.$adh->zip.(($adh->zip && $adh->town)?' / ':'').$adh->town.'
'.$langs->trans("Zip").' / '.$langs->trans("Town").''.$object->zip.(($object->zip && $object->town)?' / ':'').$object->town.'
'.$langs->trans("Country").''; - $img=picto_from_langcode($adh->pays_code); + $img=picto_from_langcode($object->pays_code); if ($img) print $img.' '; - print getCountry($adh->pays_code); + print getCountry($object->pays_code); print '
'.$langs->trans('State').''.$adh->departement.'
'.$langs->trans('State').''.$object->departement.'
'.$langs->trans("PhonePro").''.dol_print_phone($adh->phone,$adh->pays_code,0,$adh->fk_soc,1).'
'.$langs->trans("PhonePro").''.dol_print_phone($object->phone,$object->pays_code,0,$object->fk_soc,1).'
'.$langs->trans("PhonePerso").''.dol_print_phone($adh->phone_perso,$adh->pays_code,0,$adh->fk_soc,1).'
'.$langs->trans("PhonePerso").''.dol_print_phone($object->phone_perso,$object->pays_code,0,$object->fk_soc,1).'
'.$langs->trans("PhoneMobile").''.dol_print_phone($adh->phone_mobile,$adh->pays_code,0,$adh->fk_soc,1).'
'.$langs->trans("PhoneMobile").''.dol_print_phone($object->phone_mobile,$object->pays_code,0,$object->fk_soc,1).'
'.$langs->trans("EMail").''.dol_print_email($adh->email,0,$adh->fk_soc,1).'
'.$langs->trans("EMail").''.dol_print_email($object->email,0,$object->fk_soc,1).'
'.$langs->trans("Birthday").''.dol_print_date($adh->naiss,'day').'
'.$langs->trans("Birthday").''.dol_print_date($object->naiss,'day').'
'.$langs->trans("Public").''.yn($adh->public).'
'.$langs->trans("Public").''.yn($object->public).'
'.$langs->trans("Status").''.$adh->getLibStatut(4).'
'.$langs->trans("Status").''.$object->getLibStatut(4).'
".$label.""; print $extrafields->showOutputField($key,$value); print "
'; - if ($_GET['action'] != 'editthirdparty' && $user->rights->adherent->creer) print ''; + if ($_GET['action'] != 'editthirdparty' && $user->rights->adherent->creer) print ''; print '
'; print $langs->trans("LinkedToDolibarrThirdParty"); print 'id.'">'.img_edit($langs->trans('SetLinkToThirdParty'),1).'id.'">'.img_edit($langs->trans('SetLinkToThirdParty'),1).'
'; - print ''; + print ''; if ($_GET['action'] == 'editthirdparty') { $htmlname='socid'; print ''; - print ''; + print ''; print ''; print ''; print ''; print ''; print ''; print '
'; - print $html->select_societes($adh->fk_soc,'socid','',1); + print $html->select_societes($object->fk_soc,'socid','',1); print '
'; } else { - if ($adh->fk_soc) + if ($object->fk_soc) { $company=new Societe($db); - $result=$company->fetch($adh->fk_soc); + $result=$company->fetch($object->fk_soc); print $company->getNomUrl(1); } else @@ -1341,23 +1405,23 @@ if ($rowid && $action != 'edit') print ''; - if ($_GET['action'] != 'editlogin' && $user->rights->adherent->creer) print ''; + if ($_GET['action'] != 'editlogin' && $user->rights->adherent->creer) print ''; print '
'; print $langs->trans("LinkedToDolibarrUser"); print 'id.'">'.img_edit($langs->trans('SetLinkToUser'),1).'id.'">'.img_edit($langs->trans('SetLinkToUser'),1).'
'; - print ''; + print ''; if ($_GET['action'] == 'editlogin') { /*$include=array(); if (empty($user->rights->user->user->creer)) // If can edit only itself user, we can link to itself only { - $include=array($adh->user_id,$user->id); + $include=array($object->user_id,$user->id); }*/ - print $html->form_users($_SERVER['PHP_SELF'].'?rowid='.$adh->id,$adh->user_id,'userid',''); + print $html->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id,$object->user_id,'userid',''); } else { - if ($adh->user_id) + if ($object->user_id) { - print $html->form_users($_SERVER['PHP_SELF'].'?rowid='.$adh->id,$adh->user_id,'none'); + print $html->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id,$object->user_id,'none'); } else print $langs->trans("NoDolibarrAccess"); } @@ -1387,7 +1451,7 @@ if ($rowid && $action != 'edit') } // Valider - if ($adh->statut == -1) + if ($object->statut == -1) { if ($user->rights->adherent->creer) { @@ -1400,7 +1464,7 @@ if ($rowid && $action != 'edit') } // Reactiver - if ($adh->statut == 0) + if ($object->statut == 0) { if ($user->rights->adherent->creer) { @@ -1413,11 +1477,11 @@ if ($rowid && $action != 'edit') } // Envoi fiche par mail - if ($adh->statut >= 1) + if ($object->statut >= 1) { if ($user->rights->adherent->creer) { - if ($adh->email) print "id&action=sendinfo\">".$langs->trans("SendCardByMail")."\n"; + if ($object->email) print "id&action=sendinfo\">".$langs->trans("SendCardByMail")."\n"; else print "trans("NoEMail"))."\">".$langs->trans("SendCardByMail")."\n"; } else @@ -1427,7 +1491,7 @@ if ($rowid && $action != 'edit') } // Resilier - if ($adh->statut >= 1) + if ($object->statut >= 1) { if ($user->rights->adherent->supprimer) { @@ -1440,11 +1504,11 @@ if ($rowid && $action != 'edit') } // Create third party - if ($conf->societe->enabled && ! $adh->fk_soc) + if ($conf->societe->enabled && ! $object->fk_soc) { if ($user->rights->societe->creer) { - if ($adh->statut != -1) print ''.$langs->trans("CreateDolibarrThirdParty").''; + if ($object->statut != -1) print ''.$langs->trans("CreateDolibarrThirdParty").''; else print ''.$langs->trans("CreateDolibarrThirdParty").''; } else @@ -1454,11 +1518,11 @@ if ($rowid && $action != 'edit') } // Create user - if (! $user->societe_id && ! $adh->user_id) + if (! $user->societe_id && ! $object->user_id) { if ($user->rights->user->user->creer) { - if ($adh->statut != -1) print ''.$langs->trans("CreateDolibarrLogin").''; + if ($object->statut != -1) print ''.$langs->trans("CreateDolibarrLogin").''; else print ''.$langs->trans("CreateDolibarrLogin").''; } else @@ -1470,7 +1534,7 @@ if ($rowid && $action != 'edit') // Delete if ($user->rights->adherent->supprimer) { - print "id&action=delete\">".$langs->trans("Delete")."\n"; + print "id&action=delete\">".$langs->trans("Delete")."\n"; } else { @@ -1480,17 +1544,17 @@ if ($rowid && $action != 'edit') // Action SPIP if ($conf->global->ADHERENT_USE_SPIP) { - $isinspip=$adh->is_in_spip(); + $isinspip=$object->is_in_spip(); if ($isinspip == 1) { - print "id&action=del_spip\">".$langs->trans("DeleteIntoSpip")."\n"; + print "id&action=del_spip\">".$langs->trans("DeleteIntoSpip")."\n"; } if ($isinspip == 0) { - print "id&action=add_spip\">".$langs->trans("AddIntoSpip")."\n"; + print "id&action=add_spip\">".$langs->trans("AddIntoSpip")."\n"; } if ($isinspip == -1) { - print '
Failed to connect to SPIP: '.$adh->error.''; + print '
Failed to connect to SPIP: '.$object->error.''; } } @@ -1504,5 +1568,5 @@ if ($rowid && $action != 'edit') $db->close(); -llxFooter('$Date: 2011/07/31 22:23:27 $ - $Revision: 1.238 $'); +llxFooter('$Date: 2011/08/09 17:59:52 $ - $Revision: 1.239 $'); ?> diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 53be2fb2579..4eeb7d603b9 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -21,7 +21,7 @@ * \file htdocs/core/class/commonobject.class.php * \ingroup core * \brief File of parent class of all other business classes (invoices, contracts, proposals, orders, ...) - * \version $Id: commonobject.class.php,v 1.149 2011/08/09 09:13:09 hregis Exp $ + * \version $Id: commonobject.class.php,v 1.150 2011/08/09 17:59:45 hregis Exp $ */ @@ -1456,7 +1456,9 @@ class CommonObject { if (in_array($type,$hooks)) { - $path = '/'.$module.'/class/'; + $path = $module; + if ($module == 'adherent') $path = 'adherents'; + $path = '/'.$path.'/class/'; $actionfile = 'actions_'.$module.'.class.php'; $daofile = 'dao_'.$module.'.class.php'; $pathroot = ''; @@ -1990,7 +1992,7 @@ class CommonObject /** * */ - function showInputFields($object,$post='',$socid=0) + function showInputFields($object,$post='',$id=0) { global $conf; @@ -1999,19 +2001,19 @@ class CommonObject $extrafields = new ExtraFields($this->db); $elementtype = $object->element; - if ($object->element = 'societe') $elementtype = 'company'; + if ($object->element == 'societe') $elementtype = 'company'; $extralabels=$extrafields->fetch_name_optionals_label($elementtype); - if ($socid) + if ($id) { - $res=$object->fetch_optionals($socid,$extralabels); + $res=$object->fetch_optionals($id,$extralabels); if ($res < 0) { dol_print_error($db); exit; } } - + foreach($extrafields->attribute_label as $key=>$label) { - $value=(isset($post["options_$key"])?$post["options_$key"]:($socid?$object->array_options["options_$key"]:'')); + $value=(isset($post["options_$key"])?$post["options_$key"]:($id?$object->array_options["options_$key"]:'')); print "".$label.''; print $extrafields->showInputField($key,$value); print ''."\n"; @@ -2021,7 +2023,7 @@ class CommonObject /** * */ - function showOutputFields($object,$socid) + function showOutputFields($object,$id) { global $conf; @@ -2030,11 +2032,11 @@ class CommonObject $extrafields = new ExtraFields($this->db); $elementtype = $object->element; - if ($object->element = 'societe') $elementtype = 'company'; + if ($object->element == 'societe') $elementtype = 'company'; $extralabels=$extrafields->fetch_name_optionals_label($elementtype); - $res=$object->fetch_optionals($socid,$extralabels); + $res=$object->fetch_optionals($id,$extralabels); if ($res < 0) { dol_print_error($db); exit; } foreach($extrafields->attribute_label as $key=>$label) @@ -2050,29 +2052,29 @@ class CommonObject * Add/Update extra fields * TODO Use also type of field to do manage date fields */ - function insertExtraFields() + function insertExtraFields($object) { - if (sizeof($this->array_options) > 0) + if (sizeof($object->array_options) > 0) { $this->db->begin(); - $sql_del = "DELETE FROM ".MAIN_DB_PREFIX.$this->table_element."_extrafields WHERE fk_object = ".$this->id; - dol_syslog(get_class($this)."::insertExtraFields delete sql=".$sql_del); + $sql_del = "DELETE FROM ".MAIN_DB_PREFIX.$this->table_element."_extrafields WHERE fk_object = ".$object->id; + dol_syslog(get_class($object)."::insertExtraFields delete sql=".$sql_del); $this->db->query($sql_del); - $sql = "INSERT INTO ".MAIN_DB_PREFIX.$this->table_element."_extrafields (fk_object"; - foreach($this->array_options as $key => $value) + $sql = "INSERT INTO ".MAIN_DB_PREFIX.$object->table_element."_extrafields (fk_object"; + foreach($object->array_options as $key => $value) { // Add field of attribut $sql.=",".substr($key,8); // Remove 'options_' prefix } - $sql .= ") VALUES (".$this->id; - foreach($this->array_options as $key => $value) + $sql .= ") VALUES (".$object->id; + foreach($object->array_options as $key => $value) { // Add field o fattribut - if ($this->array_options[$key] != '') + if ($object->array_options[$key] != '') { - $sql.=",'".$this->array_options[$key]."'"; + $sql.=",'".$object->array_options[$key]."'"; } else { @@ -2081,12 +2083,12 @@ class CommonObject } $sql.=")"; - dol_syslog(get_class($this)."::insertExtraFields insert sql=".$sql); + dol_syslog(get_class($object)."::insertExtraFields insert sql=".$sql); $resql = $this->db->query($sql); if (! $resql) { $this->error=$this->db->lasterror(); - dol_syslog(get_class($this)."::update ".$this->error,LOG_ERR); + dol_syslog(get_class($object)."::update ".$this->error,LOG_ERR); $this->db->rollback(); return -1; } diff --git a/htdocs/includes/modules/modAdherent.class.php b/htdocs/includes/modules/modAdherent.class.php index 1b82f89f67a..df3e5508da3 100644 --- a/htdocs/includes/modules/modAdherent.class.php +++ b/htdocs/includes/modules/modAdherent.class.php @@ -28,7 +28,7 @@ * \file htdocs/includes/modules/modAdherent.class.php * \ingroup member * \brief File descriptor or module Member - * \version $Id: modAdherent.class.php,v 1.87 2011/07/31 23:28:11 eldy Exp $ + * \version $Id: modAdherent.class.php,v 1.88 2011/08/09 17:59:51 hregis Exp $ */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); @@ -74,9 +74,10 @@ class modAdherent extends DolibarrModules // Constantes //----------- $this->const = array(); - $this->const[0] = array("MAIN_SEARCHFORM_ADHERENT","yesno","1","Show form for quick member search"); - $this->const[1] = array("ADHERENT_MAIL_RESIL","texte","Votre adhésion vient d'être résiliée.\r\nNous espérons vous revoir très bientôt","Mail de résiliation"); - $this->const[2] = array("ADHERENT_MAIL_VALID","texte","Votre adhésion vient d'être validée. \r\nVoici le rappel de vos coordonnées (toute information erronée entrainera la non validation de votre inscription) :\r\n\r\n%INFOS%\r\n\r\n","Mail de validation"); + $this->const[0] = array("MAIN_MODULE_ADHERENT_HOOKS","chaine",'member_extrafields','',0); + $this->const[2] = array("MAIN_SEARCHFORM_ADHERENT","yesno","1","Show form for quick member search"); + $this->const[3] = array("ADHERENT_MAIL_RESIL","texte","Votre adhésion vient d'être résiliée.\r\nNous espérons vous revoir très bientôt","Mail de résiliation"); + $this->const[4] = array("ADHERENT_MAIL_VALID","texte","Votre adhésion vient d'être validée. \r\nVoici le rappel de vos coordonnées (toute information erronée entrainera la non validation de votre inscription) :\r\n\r\n%INFOS%\r\n\r\n","Mail de validation"); $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[10] = array("ADHERENT_MAILMAN_UNSUB_URL","chaine","http://lists.domain.com/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%MAILMAN_ADMINPW%&user=%EMAIL%","Url de désinscription aux listes mailman"); diff --git a/htdocs/includes/modules/modSociete.class.php b/htdocs/includes/modules/modSociete.class.php index 92ea19960e0..beed750649a 100644 --- a/htdocs/includes/modules/modSociete.class.php +++ b/htdocs/includes/modules/modSociete.class.php @@ -22,7 +22,7 @@ /** * \defgroup societe Module societe * \brief Module to manage third parties (customers, prospects) - * \version $Id: modSociete.class.php,v 1.120 2011/08/09 09:13:09 hregis Exp $ + * \version $Id: modSociete.class.php,v 1.121 2011/08/09 17:59:50 hregis Exp $ */ /** @@ -108,7 +108,7 @@ class modSociete extends DolibarrModules $this->const[$r][0] = "MAIN_MODULE_SOCIETE_HOOKS"; $this->const[$r][1] = "chaine"; - $this->const[$r][2] = "extrafields"; + $this->const[$r][2] = "thirdparty_extrafields"; $this->const[$r][3] = ""; $this->const[$r][4] = 0; $this->const[$r][4] = 'current'; diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index fc8450ad55c..6816a0ed23b 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -26,7 +26,7 @@ * \file htdocs/societe/class/societe.class.php * \ingroup societe * \brief File for third party class - * \version $Id: societe.class.php,v 1.92 2011/07/31 23:22:58 eldy Exp $ + * \version $Id: societe.class.php,v 1.93 2011/08/09 17:59:50 hregis Exp $ */ require_once(DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php"); @@ -533,11 +533,32 @@ class Societe extends CommonObject // Si le fournisseur est classe on l'ajoute $this->AddFournisseurInCategory($this->fournisseur_categorie); + /* $result=$this->insertExtraFields(); if ($result < 0) { $error++; } + */ + + // Hook for external modules + if (! empty($this->hooks)) + { + foreach($this->hooks as $hook) + { + if ($hook['type'] == 'thirdparty_extrafields' && ! empty($hook['modules'])) + { + foreach($hook['modules'] as $module) + { + if (method_exists($module,'insertExtraFields')) + { + $result=$module->insertExtraFields($this); + if ($result < 0) $error++; + } + } + } + } + } if (! $error && $call_trigger) { diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 098bb7385bd..f6372674671 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -25,7 +25,7 @@ * \file htdocs/societe/soc.php * \ingroup societe * \brief Third party card page - * \version $Id: soc.php,v 1.128 2011/08/09 14:27:38 hregis Exp $ + * \version $Id: soc.php,v 1.129 2011/08/09 17:59:52 hregis Exp $ */ require("../main.inc.php"); @@ -78,7 +78,7 @@ else // Instantiate hooks of thirdparty module. Note that conf->hooks_modules contains array array if (is_array($conf->hooks_modules) && !empty($conf->hooks_modules)) { - $object->callHooks(array('thirdpartycard','extrafields')); + $object->callHooks(array('thirdpartycard','thirdparty_extrafields')); } @@ -1040,7 +1040,7 @@ else { foreach($object->hooks as $hook) { - if ($hook['type'] == 'extrafields' && ! empty($hook['modules'])) + if ($hook['type'] == 'thirdparty_extrafields' && ! empty($hook['modules'])) { foreach($hook['modules'] as $module) { @@ -1483,7 +1483,7 @@ else { foreach($object->hooks as $hook) { - if ($hook['type'] == 'extrafields' && ! empty($hook['modules'])) + if ($hook['type'] == 'thirdparty_extrafields' && ! empty($hook['modules'])) { foreach($hook['modules'] as $module) { @@ -1839,7 +1839,7 @@ else { foreach($object->hooks as $hook) { - if ($hook['type'] == 'extrafields' && ! empty($hook['modules'])) + if ($hook['type'] == 'thirdparty_extrafields' && ! empty($hook['modules'])) { foreach($hook['modules'] as $module) { @@ -2029,5 +2029,5 @@ else $db->close(); -llxFooter('$Date: 2011/08/09 14:27:38 $ - $Revision: 1.128 $'); +llxFooter('$Date: 2011/08/09 17:59:52 $ - $Revision: 1.129 $'); ?> \ No newline at end of file