Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev 1120 Rev 1140
Line 8... Line 8...
8
	protected $type_resultat = '';
8
	protected $type_resultat = '';
9
	protected $submit = '';
9
	protected $submit = '';
10
	protected $acces_fiche = false;
10
	protected $acces_fiche = false;
11
	private $recherche_avancee;
11
	private $recherche_avancee;
12
	private $param;
12
	private $param;
13
	private $i18n =  array();
13
	private $i18n =	 array();
Line 14... Line 14...
14
	
14
	
Line 15... Line 15...
15
	private $parametresAvancesGeneriques = array('gen','fam','nn','nt','sp','ssp','type','sto','sti','stc');
15
	private $parametresAvancesGeneriques = array('gen','fam','nn','nt','sp','ssp','type','sto','sti','stc');
16
	
16
	
Line 99... Line 99...
99
		}
99
		}
100
		return $res;
100
		return $res;
101
	}
101
	}
Line 102... Line 102...
102
	
102
	
-
 
103
	//+---------------------------------------------recherche simple-------------------------------------+
-
 
104
	/*
-
 
105
	  grep-friendly: ICI->executerRechercheSimple()
-
 
106
	  En effet, cette méthode n'est jamais invoquée explicitement.
-
 
107
	  Le processus est le suivant:
-
 
108
	  * URL = index.php?type_nom=...&referentiel=..&module=recherche&action=rechercheSimple
-
 
109
	  * AppControleur::initialiser()
-
 
110
	  * `-> AppControleur::$parametres['action'] = $_GET['action']
-
 
111
	  * `-> AppControleur::executerModule()
-
 
112
	  *	 `-> effecture $module->$action()
-
 
113
	  * qui nous appelle ici
103
	//+---------------------------------------------recherche simple-------------------------------------+
114
	 */
104
	public function executerRechercheSimple() {
115
	public function executerRechercheSimple() {
105
		$donnees['type_nom'] = $this->type_nom;
116
		$donnees['type_nom'] = $this->type_nom;
106
		$donnees['nom'] = $this->nom;
117
		$donnees['nom'] = $this->nom;
107
		if (strlen($donnees['nom']) < 3) {
118
		if (strlen($donnees['nom']) < 3) {
Line 121... Line 132...
121
					$donnees['message']['attention'] = 'info_sp_abs';
132
					$donnees['message']['attention'] = 'info_sp_abs';
122
				}
133
				}
123
				$donnees['message']['nom_approche'] = $presence;
134
				$donnees['message']['nom_approche'] = $presence;
124
			}
135
			}
125
		}
136
		}
-
 
137
 
126
		$this->executerAccueil($donnees);
138
		$this->executerAccueil($donnees);
127
		if (Registre::get('resultats')) {
139
		if (Registre::get('resultats')) {
128
			$_GET['resultat'] = $this->type_resultat;
140
			$_GET['resultat'] = $this->type_resultat;
129
			$this->executerAction('Resultat', 'executerResultat');
141
			$this->executerAction('Resultat', 'executerResultat');
130
		}
142
		}
Line 244... Line 256...
244
		&& $_GET['anf'] != urlencode($this->i18n['valeur-form-date'])) {
256
		&& $_GET['anf'] != urlencode($this->i18n['valeur-form-date'])) {
245
			$this->param['anf'] = $this->convertirEncodageEntree(urldecode($_GET['anf']));
257
			$this->param['anf'] = $this->convertirEncodageEntree(urldecode($_GET['anf']));
246
		}
258
		}
247
	}
259
	}
Line 248... Line 260...
248
	
260
	
249
	private function capturerParametresAvancesPresenceSpecifiques()  {
261
	private function capturerParametresAvancesPresenceSpecifiques()	 {
250
		$champs_presence = $this->obtenirChampsPresence();
262
		$champs_presence = $this->obtenirChampsPresence();
251
		foreach($champs_presence as $champ) {
263
		foreach($champs_presence as $champ) {
252
			$param = $champ['param'];
264
			$param = $champ['param'];
253
			if (isset($_GET[$param]) && $_GET[$param] != '') {
265
			if (isset($_GET[$param]) && $_GET[$param] != '') {
Line 257... Line 269...
257
	}
269
	}
Line 258... Line 270...
258
	
270
	
259
	private function obtenirChampsPresence() {
271
	private function obtenirChampsPresence() {
260
		$tableau_champs_presence = array();
272
		$tableau_champs_presence = array();
261
		$referentiel = Registre::get('parametres.referentiel');
273
		$referentiel = Registre::get('parametres.referentiel');
262
		$champs_presence = Config::get($referentiel.'.champsPresence');
-
 
263
		$champs_presence_spl = explode('|', $champs_presence);
274
		$champs_presence_spl = explode('|', Config::get($referentiel.'.champsPresence'));
264
		foreach($champs_presence_spl as $champ) {
275
		foreach($champs_presence_spl as $champ) {
265
			$label_param_champ = explode(':', $champ);
276
			$label_param_champ = explode(':', $champ);
266
			$tableau_champs_presence[] = array('param' => $label_param_champ[1],
277
			$tableau_champs_presence[] = array('param' => $label_param_champ[1],
267
														'label' => $label_param_champ[0]);
278
														'label' => $label_param_champ[0]);