33 |
jpm |
1 |
<?php
|
|
|
2 |
class RechercheSimple extends aControleur {
|
|
|
3 |
|
|
|
4 |
//+----------------------------------------------------------------------------------------------------------------+
|
|
|
5 |
// Méthodes
|
|
|
6 |
/**
|
|
|
7 |
* Fonction d'affichage par défaut
|
|
|
8 |
*/
|
|
|
9 |
public function executerActionParDefaut() {
|
|
|
10 |
$this->executerAccueil();
|
|
|
11 |
}
|
|
|
12 |
|
|
|
13 |
public function executerAccueil() {
|
|
|
14 |
$donnees = array();
|
|
|
15 |
$donnees['i18n'] = I18n::get('Recherche-accueil');
|
|
|
16 |
|
|
|
17 |
$donnees['referentiel_titre'] = I18n::get('Referentiels-titres.'.Config::get('referentiel'));
|
|
|
18 |
|
|
|
19 |
$donnees['form_nom'] = $this->executerFormulaireNom();
|
|
|
20 |
|
|
|
21 |
$this->setSortie(self::RENDU_CORPS, $this->getVue('recherche_accueil', $donnees));
|
|
|
22 |
}
|
|
|
23 |
|
|
|
24 |
public function executerFormulaireNom() {
|
43 |
delphine |
25 |
$donnees['eflore_type_nom'] = 'nom_vernaculaire';
|
33 |
jpm |
26 |
$donnees['i18n'] = I18n::get('Recherche-form-nom');
|
|
|
27 |
$donnees['url_js'] = Config::get('url_js');
|
|
|
28 |
|
|
|
29 |
return $this->getVue('form_nom', $donnees);
|
|
|
30 |
}
|
|
|
31 |
|
43 |
delphine |
32 |
public function executerRechercheNom() {
|
|
|
33 |
if ($_GET['eflore_nom'] == '') {
|
|
|
34 |
$donnees['information'] = 'Veuillez saisir un radical contenant au moins 3 caractères alphabétiques !';
|
|
|
35 |
} elseif ($_GET['eflore_type_nom'] == 'nom_vernaculaire') {
|
|
|
36 |
$donnees['nom_approche'] = $_GET['eflore_nom'];//$this->getNomVerna();
|
|
|
37 |
} else {
|
|
|
38 |
$donnees['nom_approche'] = $_GET['eflore_nom'];
|
|
|
39 |
}
|
|
|
40 |
if (isset($donnees)) {
|
|
|
41 |
$donnees['eflore_type_nom'] = $_GET['eflore_type_nom'];
|
|
|
42 |
$donnees['i18n'] = I18n::get('Recherche-accueil');
|
|
|
43 |
$donnees['referentiel_titre'] = I18n::get('Referentiels-titres.'.Config::get('referentiel'));
|
|
|
44 |
|
|
|
45 |
$donnees['i18n'] = I18n::get('Recherche-form-nom');
|
|
|
46 |
$donnees['url_js'] = Config::get('url_js');
|
|
|
47 |
|
|
|
48 |
$donnees['form_nom'] = $this->getVue('form_nom', $donnees);
|
|
|
49 |
$this->setSortie(self::RENDU_CORPS, $this->getVue('recherche_accueil', $donnees));
|
|
|
50 |
} else {
|
|
|
51 |
// envoyerResultat;
|
|
|
52 |
}
|
33 |
jpm |
53 |
}
|
|
|
54 |
}
|
|
|
55 |
?>
|