| 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.11 2006-03-02 16:57:31 alexandre_tb Exp $
|
22 |
// CVS : $Id: inscription.fonct.php,v 1.12 2006-03-15 11:02:35 alexandre_tb Exp $
|
| 23 |
// CVS : $Id: inscription.fonct.php,v 1.11 2006-03-02 16:57:31 alexandre_tb Exp $
|
23 |
// CVS : $Id: inscription.fonct.php,v 1.12 2006-03-15 11:02:35 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 Aucun
|
33 |
*@author Aucun
|
| 34 |
*@copyright Tela-Botanica 2000-2004
|
34 |
*@copyright Tela-Botanica 2000-2004
|
| 35 |
*@version $Revision: 1.11 $ $Date: 2006-03-02 16:57:31 $
|
35 |
*@version $Revision: 1.12 $ $Date: 2006-03-15 11:02:35 $
|
| 36 |
*@version $Revision: 1.11 $ $Date: 2006-03-02 16:57:31 $
|
36 |
*@version $Revision: 1.12 $ $Date: 2006-03-15 11:02:35 $
|
| 37 |
// +------------------------------------------------------------------------------------------------------+
|
37 |
// +------------------------------------------------------------------------------------------------------+
|
| 38 |
*/
|
38 |
*/
|
| Line 39... |
Line 39... |
| 39 |
|
39 |
|
| 40 |
// +------------------------------------------------------------------------------------------------------+
|
40 |
// +------------------------------------------------------------------------------------------------------+
|
| Line 177... |
Line 177... |
| 177 |
* Réalise une mise à jour dans la base de donnée
|
177 |
* Réalise une mise à jour dans la base de donnée
|
| 178 |
*
|
178 |
*
|
| 179 |
* @param array un tableau de valeur avec en clé les noms des champs du formulaire
|
179 |
* @param array un tableau de valeur avec en clé les noms des champs du formulaire
|
| 180 |
* @return void
|
180 |
* @return void
|
| 181 |
*/
|
181 |
*/
|
| 182 |
function mise_a_jour($valeur, $id = '') {echo 'toto';
|
182 |
function mise_a_jour($valeur, $id = '') {
|
| 183 |
// ====================Mise à jour dans l'annuaire gen_annuaire ====================
|
183 |
// ====================Mise à jour dans l'annuaire gen_annuaire ====================
|
| 184 |
if ($id == '') {
|
184 |
if ($id == '') {
|
| 185 |
$id = $GLOBALS['AUTH']->getAuthData(INS_CHAMPS_ID);
|
185 |
$id = $GLOBALS['AUTH']->getAuthData(INS_CHAMPS_ID);
|
| 186 |
}
|
186 |
}
|
| 187 |
$requete = 'update '.INS_ANNUAIRE.' set '.
|
187 |
$requete = 'update '.INS_ANNUAIRE.' set '.
|
| Line 204... |
Line 204... |
| 204 |
* @return string une requete du type champs="valeur",...
|
204 |
* @return string une requete du type champs="valeur",...
|
| 205 |
*/
|
205 |
*/
|
| Line 206... |
Line 206... |
| 206 |
|
206 |
|
| 207 |
function requete_annuaire($valeur) {
|
207 |
function requete_annuaire($valeur) {
|
| - |
|
208 |
$req = INS_CHAMPS_NOM.'="'.addslashes($valeur['nom']).'", ';
|
| - |
|
209 |
if (isset($valeur['est_structure']) && $valeur['est_structure'] == 0)
|
| 208 |
$req = INS_CHAMPS_NOM.'="'.addslashes($valeur['nom']).'", ';
|
210 |
$req .= INS_CHAMPS_PRENOM.'="'.addslashes($valeur['prenom']).'", ';
|
| 209 |
// Initialisation de variable pour éviter des notices
|
211 |
// Initialisation de variable pour éviter des notices
|
| 210 |
foreach (array ('adresse_1', 'adresse_2', 'ville', 'telephone', 'fax', 'site') as $val) {
|
212 |
foreach (array ('adresse_1', 'adresse_2', 'ville', 'telephone', 'fax', 'site') as $val) {
|
| 211 |
if (!isset ($valeur[$val])) $valeur[$val] = '' ;
|
213 |
if (!isset ($valeur[$val])) $valeur[$val] = '' ;
|
| Line 516... |
Line 518... |
| 516 |
|
518 |
|
| Line 517... |
Line 519... |
| 517 |
$mail = & Mail::factory('mail') ;
|
519 |
$mail = & Mail::factory('mail') ;
|
| Line -... |
Line 520... |
| - |
|
520 |
|
| - |
|
521 |
$mail -> send ($ligne[INS_CHAMPS_MAIL], $headers, $body) ;
|
| - |
|
522 |
|
| - |
|
523 |
// Envoi du mail aux administrateur du site
|
| 518 |
|
524 |
foreach ($GLOBALS['mail_admin'] as $administrateur) {
|
| 519 |
$mail -> send ($ligne[INS_CHAMPS_MAIL], $headers, $body) ;
|
525 |
$mail -> send ($administrateur, $headers, $body) ;
|
| 520 |
|
526 |
}
|
| 521 |
if (PEAR::isError($mail)) {
|
527 |
if (PEAR::isError($mail)) {
|
| 522 |
echo 'erreur d\'envoi' ;
|
528 |
echo 'erreur d\'envoi' ;
|
| Line 642... |
Line 648... |
| 642 |
}
|
648 |
}
|
| Line 643... |
Line 649... |
| 643 |
|
649 |
|
| 644 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
650 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
| 645 |
*
|
651 |
*
|
| - |
|
652 |
* $Log: not supported by cvs2svn $
|
| - |
|
653 |
* Revision 1.11 2006/03/02 16:57:31 alexandre_tb
|
| - |
|
654 |
* correction appel au générateur de nom wiki
|
| 646 |
* $Log: not supported by cvs2svn $
|
655 |
*
|
| 647 |
* Revision 1.10 2006/02/28 14:02:20 alexandre_tb
|
656 |
* Revision 1.10 2006/02/28 14:02:20 alexandre_tb
|
| 648 |
* suppression des insertion dans les tables du bazar
|
657 |
* suppression des insertion dans les tables du bazar
|
| 649 |
*
|
658 |
*
|
| 650 |
* Revision 1.9 2006/02/14 10:19:10 alexandre_tb
|
659 |
* Revision 1.9 2006/02/14 10:19:10 alexandre_tb
|