Line 17... |
Line 17... |
17 |
// | |
|
17 |
// | |
|
18 |
// | You should have received a copy of the GNU Lesser General Public |
|
18 |
// | You should have received a copy of the GNU Lesser General Public |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
22 |
// CVS : $Id: inscription.fonct.php,v 1.15 2006-04-10 14:01:36 florian Exp $
|
22 |
// CVS : $Id: inscription.fonct.php,v 1.16 2006-04-11 08:41:41 alexandre_tb Exp $
|
23 |
// CVS : $Id: inscription.fonct.php,v 1.15 2006-04-10 14:01:36 florian Exp $
|
23 |
// CVS : $Id: inscription.fonct.php,v 1.16 2006-04-11 08:41:41 alexandre_tb Exp $
|
24 |
/**
|
24 |
/**
|
25 |
* Fonctions du module inscription
|
25 |
* Fonctions du module inscription
|
26 |
*
|
26 |
*
|
27 |
* Fonctions du module inscription
|
27 |
* Fonctions du module inscription
|
28 |
*
|
28 |
*
|
Line 30... |
Line 30... |
30 |
//Auteur original :
|
30 |
//Auteur original :
|
31 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
31 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
32 |
//Autres auteurs :
|
32 |
//Autres auteurs :
|
33 |
*@author Florian Schmitt <florian@ecole-et-nature.org>
|
33 |
*@author Florian Schmitt <florian@ecole-et-nature.org>
|
34 |
*@copyright Tela-Botanica 2000-2004
|
34 |
*@copyright Tela-Botanica 2000-2004
|
35 |
*@version $Revision: 1.15 $ $Date: 2006-04-10 14:01:36 $
|
35 |
*@version $Revision: 1.16 $ $Date: 2006-04-11 08:41:41 $
|
36 |
*@version $Revision: 1.15 $ $Date: 2006-04-10 14:01:36 $
|
36 |
*@version $Revision: 1.16 $ $Date: 2006-04-11 08:41:41 $
|
37 |
// +------------------------------------------------------------------------------------------------------+
|
37 |
// +------------------------------------------------------------------------------------------------------+
|
38 |
*/
|
38 |
*/
|
Line 39... |
Line 39... |
39 |
|
39 |
|
40 |
// +------------------------------------------------------------------------------------------------------+
|
40 |
// +------------------------------------------------------------------------------------------------------+
|
Line 162... |
Line 162... |
162 |
|
162 |
|
163 |
|
163 |
|
164 |
function insertion($valeur) {
|
164 |
function insertion($valeur) {
|
165 |
// =========== Insertion dans l'annuaire gen_annuaire ===================
|
165 |
// =========== Insertion dans l'annuaire gen_annuaire ===================
|
166 |
// Génération du nom wikini à partir du nom et du prénom
|
166 |
// Génération du nom wikini à partir du nom et du prénom
|
- |
|
167 |
if (INS_UTILISE_WIKINI && INS_NOM_WIKINI_GENERE) {
|
- |
|
168 |
$valeur['nom_wiki'] = genere_nom_wiki ($valeur['nom'], isset ($valeur['prenom']) ? $valeur['prenom'] : '') ;
|
- |
|
169 |
} else {
|
- |
|
170 |
if (!INS_NOM_WIKINI_GENERE) {
|
167 |
if (INS_UTILISE_WIKINI) {
|
171 |
$valeur['nom_wiki'] = $valeur['nomwiki'];
|
168 |
$valeur['nom_wiki'] = genere_nom_wiki ($valeur['nom'], isset ($valeur['prenom']) ? $valeur['prenom'] : '') ;
|
172 |
}
|
169 |
}
|
173 |
}
|
170 |
$id_utilisateur = nextId(INS_ANNUAIRE, INS_CHAMPS_ID, $GLOBALS['ins_db']) ;
|
174 |
$id_utilisateur = nextId(INS_ANNUAIRE, INS_CHAMPS_ID, $GLOBALS['ins_db']) ;
|
171 |
$requete = 'insert into '.INS_ANNUAIRE.' set '.
|
175 |
$requete = 'insert into '.INS_ANNUAIRE.' set '.
|
Line 267... |
Line 271... |
267 |
} else {
|
271 |
} else {
|
268 |
$n_dpt = substr($valeur['cp'], 0, 2) ;
|
272 |
$n_dpt = substr($valeur['cp'], 0, 2) ;
|
269 |
}
|
273 |
}
|
270 |
$req .= ",".INS_CHAMPS_DEPARTEMENT."='$n_dpt'";
|
274 |
$req .= ",".INS_CHAMPS_DEPARTEMENT."='$n_dpt'";
|
271 |
}
|
275 |
}
|
- |
|
276 |
if (INS_UTILISE_WIKINI) $req .= ','.INS_CHAMPS_NOM_WIKINI.'="'.$valeur['nomwiki'].'"';
|
272 |
return $req ;
|
277 |
return $req ;
|
273 |
}
|
278 |
}
|
Line 684... |
Line 689... |
684 |
}
|
689 |
}
|
Line 685... |
Line 690... |
685 |
|
690 |
|
686 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
691 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
687 |
*
|
692 |
*
|
- |
|
693 |
* $Log: not supported by cvs2svn $
|
- |
|
694 |
* Revision 1.15 2006/04/10 14:01:36 florian
|
- |
|
695 |
* uniformisation de l'appli bottin: plus qu'un fichier de fonctions
|
688 |
* $Log: not supported by cvs2svn $
|
696 |
*
|
689 |
* Revision 1.14 2006/04/04 12:23:05 florian
|
697 |
* Revision 1.14 2006/04/04 12:23:05 florian
|
690 |
* modifs affichage fiches, généricité de la carto, modification totale de l'appli annuaire
|
698 |
* modifs affichage fiches, généricité de la carto, modification totale de l'appli annuaire
|
691 |
*
|
699 |
*
|
692 |
* Revision 1.13 2006/03/21 10:25:33 alexandre_tb
|
700 |
* Revision 1.13 2006/03/21 10:25:33 alexandre_tb
|