Subversion Repositories Sites.obs-saisons.fr

Rev

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

Rev 43 Rev 44
Line 56... Line 56...
56
    public function validerFormulaireSaisieStation() {
56
    public function validerFormulaireSaisieStation() {
Line 57... Line 57...
57
    	
57
    	
Line 58... Line 58...
58
    	$valeurs_verifiees = $this->collecterValeursFormulaireSaisieStation();
58
    	$valeurs_verifiees = $this->collecterValeursFormulaireSaisieStation();
59
    	
59
    	
-
 
60
    	$station_dao = new StationDao();
-
 
61
    	$retour_ajout_station = $station_dao->ajouterStation($valeurs_verifiees);
-
 
62
    	
-
 
63
    	if($id_nouvelle_station = $this->renvoyerIdSiAjoutStationEffectue($retour_ajout_station)) {
-
 
64
    		$this->id_station_en_cours = $id_nouvelle_station;
-
 
65
    		$this->afficherInformationsStation();  
-
 
66
    		$this->setNavigation();
-
 
67
    	}
-
 
68
    }
-
 
69
    
-
 
70
    private function renvoyerIdSiAjoutStationEffectue($donnees_retour_dao) {
-
 
71
    	
-
 
72
    	if(isset($donnees_retour_dao['id_nouvelle_station'])) {
-
 
73
    		return $donnees_retour_dao['id_nouvelle_station'];
-
 
74
    	}
60
    	$station_dao = new StationDao();
75
    	
Line 61... Line 76...
61
    	$station_dao->ajouterStation($valeurs_verifiees);
76
    	return false;
Line 62... Line 77...
62
    }
77
    }
Line 109... Line 124...
109
    // +---------------------------------------------------------------------------------------------------------------+
124
    // +---------------------------------------------------------------------------------------------------------------+
110
    // METHODES POUR FABRIQUER LE MENU
125
    // METHODES POUR FABRIQUER LE MENU
111
    public function construireMenuNavigation($espece_en_cours = null) {
126
    public function construireMenuNavigation($espece_en_cours = null) {
Line 112... Line 127...
112
    	    	    	
127
    	    	    	
-
 
128
    	$id_station_en_cours = $this->id_station_en_cours;
Line 113... Line 129...
113
    	$id_station_en_cours = $this->id_station_en_cours;
129
    	$id_espece_en_cours = $_GET['id_espece'];
Line 114... Line 130...
114
    	
130
    	
115
    	$stations = $this->getListeStations();
131
    	$stations = $this->getListeStations();
Line 129... Line 145...
129
    	
145
    	
130
    	$donnees['stations'] = $stations;
146
    	$donnees['stations'] = $stations;
Line 131... Line 147...
131
    	$donnees['id_station_en_cours'] = $id_station_en_cours;
147
    	$donnees['id_station_en_cours'] = $id_station_en_cours;
132
    	
148
    	
133
    	if($id_espece_en_cours != null) {
149
    	if($id_espece_en_cours != null) {
Line 134... Line 150...
134
    		$donnees['id_espece_en_cours'] = $id_espece;
150
    		$donnees['id_espece_en_cours'] = $id_espece_en_cours;
Line 135... Line 151...
135
    	}
151
    	}