Subversion Repositories Applications.papyrus

Rev

Rev 1638 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1638 Rev 1693
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.php,v 1.33 2007-10-10 12:24:54 alexandre_tb Exp $
22
// CVS : $Id: inscription.php,v 1.34 2007-11-16 14:21:33 alexandre_tb Exp $
23
/**
23
/**
24
* Inscription
24
* Inscription
25
*
25
*
26
* Un module d'inscription, en general ce code est specifique a
26
* Un module d'inscription, en general ce code est specifique a
27
* un site web
27
* un site web
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-2007
34
*@copyright     Tela-Botanica 2000-2007
35
*@version       $Revision: 1.33 $ $Date: 2007-10-10 12:24:54 $
35
*@version       $Revision: 1.34 $ $Date: 2007-11-16 14:21:33 $
36
// +------------------------------------------------------------------------------------------------------+
36
// +------------------------------------------------------------------------------------------------------+
37
*/
37
*/
Line 38... Line 38...
38
 
38
 
39
// +------------------------------------------------------------------------------------------------------+
39
// +------------------------------------------------------------------------------------------------------+
Line 210... Line 210...
210
							if (file_exists(GEN_CHEMIN_CLIENT.$repertoire.GEN_SEP.$repertoire.'.inscription.inc.php'))
210
							if (file_exists(GEN_CHEMIN_CLIENT.$repertoire.GEN_SEP.$repertoire.'.inscription.inc.php'))
211
							include_once GEN_CHEMIN_CLIENT.$repertoire.GEN_SEP.$repertoire.'.inscription.inc.php' ;
211
							include_once GEN_CHEMIN_CLIENT.$repertoire.GEN_SEP.$repertoire.'.inscription.inc.php' ;
212
						}   
212
						}   
213
					}
213
					}
214
					$d->close();
214
					$d->close();
-
 
215
					// envoi d un mail aux moderateurs et a l inscrit
215
					//$GLOBALS['ins_url']
216
					envoie_mail();
216
					header('Location: '.str_replace ('&amp;', '&', $GLOBALS['ins_url']->getURL()));
217
					header('Location: '.str_replace ('&amp;', '&', $GLOBALS['ins_url']->getURL()));
217
				    return $res.info($id_utilisateur);
218
				    return $res.info($id_utilisateur);
218
			    }
219
			    }
219
            } else {
220
            } else {
220
            	// Si le formulaire n'est pas bon on remet l'action inscription_v
221
            	// Si le formulaire n'est pas bon on remet l'action inscription_v
221
            	$formulaire->addElement('hidden', 'action', 'inscription_v') ;	
222
            	$formulaire->addElement('hidden', 'action', 'inscription_v') ;	
222
            }
223
            }
223
        }
224
        }
224
        if ($_REQUEST['action'] == 'modifier_v') {
225
        if ($_REQUEST['action'] == 'modifier_v') {
-
 
226
            // avant d effectuer la mise a jour, on recupere les anciennes valeurs de l annuaire
-
 
227
            $requete = 'select * from '.INS_ANNUAIRE.' where '.INS_CHAMPS_ID.'="'.$GLOBALS['AUTH']->getAuthData(INS_CHAMPS_ID).'"';
-
 
228
            $resultat = $GLOBALS['ins_db']->query($requete);
-
 
229
            $GLOBALS['anciennes_valeurs_annuaire'] = $resultat->fetchRow (DB_FETCHMODE_ASSOC);
-
 
230
 
225
            if ($formulaire->validate()) {
231
            if ($formulaire->validate()) {
226
                $formulaire->process('inscription_mise_a_jour', false) ;
232
                $formulaire->process('inscription_mise_a_jour', false) ;
227
            } else {
233
            } else {
228
            	return $formulaire->toHTML();
234
            	return $formulaire->toHTML();
229
            }
235
            }
Line 328... Line 334...
328
}
334
}
Line 329... Line 335...
329
 
335
 
330
/* +--Fin du code ----------------------------------------------------------------------------------------+
336
/* +--Fin du code ----------------------------------------------------------------------------------------+
331
*
337
*
-
 
338
* $Log: not supported by cvs2svn $
-
 
339
* Revision 1.33  2007-10-10 12:24:54  alexandre_tb
-
 
340
* gestion du retour arrière par un header location
-
 
341
* si le template ACCUEIL est vide, on envoie directement le formulaire
-
 
342
* d inscription
332
* $Log: not supported by cvs2svn $
343
*
333
* Revision 1.32  2007-09-07 09:18:23  alexandre_tb
344
* Revision 1.32  2007-09-07 09:18:23  alexandre_tb
334
* ajout de controle par variable de session pour eviter une double inscription
345
* ajout de controle par variable de session pour eviter une double inscription
335
*
346
*
336
* Revision 1.31  2007-09-06 08:39:08  alexandre_tb
347
* Revision 1.31  2007-09-06 08:39:08  alexandre_tb