Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev 74 Rev 76
Line 5... Line 5...
5
	// Méthodes
5
	// Méthodes
6
	/**
6
	/**
7
	 * Fonction d'affichage par défaut
7
	 * Fonction d'affichage par défaut
8
	 */
8
	 */
9
	public function executerActionParDefaut() {
9
	public function executerActionParDefaut() {
10
		$rechercheAccueil = $this->executerAction('recherche-simple', 'accueil');
10
		$this->executerAction('RechercheSimple', 'executerAccueil');
11
		$this->setSortie(self::RENDU_CORPS, $rechercheAccueil);
-
 
-
 
11
		
12
	}
12
	}
Line 13... Line 13...
13
 
13
 
14
	public function executerRechercheSimple() {
14
	public function executerRechercheSimple() {
15
		$donnees['type_nom'] = $_GET['type_nom'];
15
		$donnees['type_nom'] = $_GET['type_nom'];
Line 26... Line 26...
26
			} elseif ($presence != 'ok') {
26
			} elseif ($presence != 'ok') {
27
				$donnees['nom_approche'] = $presence;
27
				$donnees['nom_approche'] = $presence;
28
				$donnees['url_nom_approche'] = $this->obtenirUrlRechercheSimple($presence, $donnees['type_nom']);
28
				$donnees['url_nom_approche'] = $this->obtenirUrlRechercheSimple($presence, $donnees['type_nom']);
29
			}
29
			}
30
		}
30
		}
31
		Registre::set('donnees', $donnees);
31
		Registre::set('donneesMoteur', $donnees);
32
		$this->executerAction('recherche_simple', 'executerForm');
32
		$this->executerAction('RechercheSimple', 'executerForm');
-
 
33
		if ($presence == 'ok') {
-
 
34
			$this->executerAction('Resultat', 'executerResultat');
-
 
35
		}
33
	}
36
	}
Line 34... Line 37...
34
	
37
	
35
	// regarde si il y a des résultats correspondant au nom recherché sinon recherche un nom approché
38
	// regarde si il y a des résultats correspondant au nom recherché sinon recherche un nom approché
36
	private function rechercherNom($noms) {
39
	private function rechercherNom($noms) {
Line 46... Line 49...
46
		} elseif ($res['entete']['total'] == 1 || urldecode($_GET['submit']) == $form['fiche']) { // renvoie à la fiche
49
		} elseif ($res['entete']['total'] == 1 || urldecode($_GET['submit']) == $form['fiche']) { // renvoie à la fiche
47
			$ids = array_keys($res['resultat']);
50
			$ids = array_keys($res['resultat']);
48
			$url = $this->obtenirUrlFiche($ids[0]);
51
			$url = $this->obtenirUrlFiche($ids[0]);
49
			$this->redirigerVers($url);
52
			$this->redirigerVers($url);
50
		} else { // affiche les résultats
53
		} else { // affiche les résultats
-
 
54
			Registre::set('resultats', $res);
51
			$approche = 'ok';
55
			$approche = 'ok';
52
		}
56
		}
53
		return $approche;
57
		return $approche;
54
	}
58
	}