Subversion Repositories Applications.papyrus

Rev

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

Rev 1796 Rev 1826
Line 14... Line 14...
14
// | annuaire_COTISATION													                |
14
// | annuaire_COTISATION													                |
15
// +--------------------------------------------------------------------------------+
15
// +--------------------------------------------------------------------------------+
16
// | Auteur : Alexandre Granier <alexandre@tela-botanica.org> 		  		        |
16
// | Auteur : Alexandre Granier <alexandre@tela-botanica.org> 		  		        |
17
// +--------------------------------------------------------------------------------+
17
// +--------------------------------------------------------------------------------+
18
//
18
//
19
// $Id: edition_fiche.php,v 1.6.2.1 2008-02-08 08:24:12 alexandre_tb Exp $
19
// $Id: edition_fiche.php,v 1.6.2.2 2008-04-16 12:41:12 alexandre_tb Exp $
Line 20... Line 20...
20
 
20
 
Line 21... Line 21...
21
 
21
 
Line 34... Line 34...
34
 
34
 
35
    $res = '<h1>Edition d\'un adh&eacute;rent : </h1>'."\n" ;
35
    $res = '<h1>Edition d\'un adh&eacute;rent : </h1>'."\n" ;
36
 	if (isset($_GET['id_inscription'])) {
36
 	if (isset($_GET['id_inscription'])) {
37
 		$GLOBALS['ins_url']->addQueryString ('id_inscription', $_GET['id_inscription']);
37
 		$GLOBALS['ins_url']->addQueryString ('id_inscription', $_GET['id_inscription']);
-
 
38
 	}
-
 
39
 	// avant la mise a jour, on supprime les mots de passe 
38
 	}
40
 	$GLOBALS['ins_config']['ic_inscription_template'] = preg_replace('/mot_de_passe[^\n]+\n/', '', $GLOBALS['ins_config']['ic_inscription_template']);
39
    $formulaire = new HTML_formulaireInscription('formulaire_inscription', 'post',
41
    $formulaire = new HTML_formulaireInscription('formulaire_inscription', 'post',
40
    					 preg_replace('/&amp;/', '&', $GLOBALS['ins_url']->getURL()), '_self', '', 0) ;
42
    					 preg_replace('/&amp;/', '&', $GLOBALS['ins_url']->getURL()), '_self', '', 0) ;
41
    $formulaire->addElement('hidden', 'id_inscription', $GLOBALS['ins_config']['ic_id_inscription']) ;
43
    $formulaire->addElement('hidden', 'id_inscription', $GLOBALS['ins_config']['ic_id_inscription']) ;
42
    $formulaire->construitFormulaire(preg_replace('/&amp;/', '&', $GLOBALS['ins_url']->getURL()), $_REQUEST[INS_CHAMPS_ID]);
44
    $formulaire->construitFormulaire(preg_replace('/&amp;/', '&', $GLOBALS['ins_url']->getURL()), $_REQUEST[INS_CHAMPS_ID]);
43
    if (isset($_REQUEST['form_structure'])) {
45
    if (isset($_REQUEST['form_structure'])) {
44
    	if ($_REQUEST['form_structure']==1) {
46
    	if ($_REQUEST['form_structure']==1) {
45
    		$formulaire->formulaireStructure() ;
47
    		$formulaire->formulaireStructure() ;
46
    	}
48
    	}
-
 
49
    }
47
    }
50
    
48
    //pour la modification d'une inscription, on charge les valeurs par défauts
51
    //pour la modification d'une inscription, on charge les valeurs par défauts
49
    if (isset ($_REQUEST[INS_CHAMPS_ID]) == 'modifier') {
52
    if (isset ($_REQUEST[INS_CHAMPS_ID]) == 'modifier') {
50
        $formulaire->addElement('hidden', 'action', 'modifier_v') ;
53
        $formulaire->addElement('hidden', 'action', 'modifier_v') ;
51
        $formulaire->setDefaults(formulaire_defaults($_REQUEST[INS_CHAMPS_ID])) ;
54
        $formulaire->setDefaults(formulaire_defaults($_REQUEST[INS_CHAMPS_ID])) ;
Line 52... Line 55...
52
    }
55
    }
53
    
56
    
54
    if (isset ($_REQUEST['action']) && $_REQUEST['action'] == 'modifier_v') {
57
    if (isset ($_REQUEST['action']) && $_REQUEST['action'] == 'modifier_v') {
-
 
58
        $GLOBALS['id_utilisateur'] = $_REQUEST[INS_CHAMPS_ID];
55
        $GLOBALS['id_utilisateur'] = $_REQUEST[INS_CHAMPS_ID];
59
        if ($formulaire->validate()) {
56
        if ($formulaire->validate()) {
60
            
57
            inscription_mise_a_jour($formulaire->getSubmitValues(), $_REQUEST[INS_CHAMPS_ID]);
61
            inscription_mise_a_jour($formulaire->getSubmitValues(), $_REQUEST[INS_CHAMPS_ID]);
58
            return $res.$formulaire->toHTML();
62
            return $res.$formulaire->toHTML();
59
        } else {
63
        } else {