Line 15... |
Line 15... |
15 |
class Resultat extends aControleur {
|
15 |
class Resultat extends aControleur {
|
Line 16... |
Line 16... |
16 |
|
16 |
|
17 |
private $parametres = null;
|
17 |
private $parametres = null;
|
18 |
private $resultats = null;
|
18 |
private $resultats = null;
|
- |
|
19 |
private $donneesTpl = array();
|
Line 19... |
Line 20... |
19 |
private $donneesTpl = array();
|
20 |
private $i18n = array();
|
20 |
|
21 |
|
21 |
public function initialiser() {
|
22 |
public function initialiser() {
|
22 |
spl_autoload_register(array($this, 'chargerClassesResultat'));
|
23 |
spl_autoload_register(array($this, 'chargerClassesResultat'));
|
- |
|
24 |
$this->parametres = new ParametresResultats();
|
23 |
$this->parametres = new ParametresResultats();
|
25 |
$this->capturerParametres();
|
24 |
$this->capturerParametres();
|
26 |
$this->capturerParametresAvances();
|
25 |
$this->parametres->reftaxCourant = Registre::get('parametres.referentiel');
|
27 |
$this->parametres->reftaxCourant = Registre::get('parametres.referentiel');
|
- |
|
28 |
$this->parametres->projetImg = Config::get($this->parametres->reftaxCourant.'.referentielImages');
|
26 |
$this->parametres->projetImg = Config::get($this->parametres->reftaxCourant.'.referentielImages');
|
29 |
$this->resultats = Registre::get('resultats');
|
Line 27... |
Line 30... |
27 |
$this->resultats = Registre::get('resultats');
|
30 |
$this->i18n = I18n::get('Recherche-form-avancee');
|
28 |
}
|
31 |
}
|
29 |
|
32 |
|
Line 55... |
Line 58... |
55 |
|
58 |
|
56 |
if (isset($_GET['niveau'])) {
|
59 |
if (isset($_GET['niveau'])) {
|
57 |
Registre::set('parametres.niveau', $_GET['niveau']);
|
60 |
Registre::set('parametres.niveau', $_GET['niveau']);
|
58 |
}
|
61 |
}
|
- |
|
62 |
}
|
- |
|
63 |
|
- |
|
64 |
private function capturerParametresAvances() {
|
- |
|
65 |
if (isset($_GET['gen']) && $_GET['gen'] != '') {
|
- |
|
66 |
$this->param['gen'] = urldecode($_GET['gen']);
|
- |
|
67 |
}
|
- |
|
68 |
if (isset($_GET['fam']) && $_GET['fam'] != '') {
|
- |
|
69 |
$this->param['fam'] = urldecode($_GET['fam']);
|
- |
|
70 |
}
|
- |
|
71 |
if (isset($_GET['au']) && $_GET['au'] != ''
|
- |
|
72 |
&& $_GET['au'] != urlencode($this->i18n['valeur-form-auteur'])) {
|
- |
|
73 |
$this->param['au'] = urldecode($_GET['au']);
|
- |
|
74 |
}
|
- |
|
75 |
if (isset($_GET['bib']) && $_GET['bib'] != ''
|
- |
|
76 |
&& $_GET['bib'] != urlencode($this->i18n['valeur-form-bib'])) {
|
- |
|
77 |
$this->param['bib'] = urldecode($_GET['bib']);
|
- |
|
78 |
}
|
- |
|
79 |
if (isset($_GET['nn']) && $_GET['nn'] != '') {
|
- |
|
80 |
$this->param['nn'] = urldecode($_GET['nn']);
|
- |
|
81 |
}
|
- |
|
82 |
if (isset($_GET['nt']) && $_GET['nt'] != '') {
|
- |
|
83 |
$this->param['nt'] = urldecode($_GET['nt']);
|
- |
|
84 |
}
|
- |
|
85 |
if (isset($_GET['sp']) && $_GET['sp'] != '') {
|
- |
|
86 |
$this->param['sp'] = urldecode($_GET['sp']);
|
- |
|
87 |
}
|
- |
|
88 |
if (isset($_GET['ssp']) && $_GET['ssp'] != '') {
|
- |
|
89 |
$this->param['ssp'] = urldecode($_GET['ssp']);
|
- |
|
90 |
}
|
- |
|
91 |
if (isset($_GET['type']) && $_GET['type'] != '') {
|
- |
|
92 |
$this->param['type'] = urldecode($_GET['type']);
|
- |
|
93 |
}
|
- |
|
94 |
if (isset($_GET['and']) && $_GET['and'] != ''
|
- |
|
95 |
&& $_GET['and'] != urlencode($this->i18n['valeur-form-date'])) {
|
- |
|
96 |
$this->param['and'] = urldecode($_GET['and']);
|
- |
|
97 |
}
|
- |
|
98 |
if (isset($_GET['anf']) && $_GET['anf'] != ''
|
- |
|
99 |
&& $_GET['anf'] != urlencode($this->i18n['valeur-form-date'])) {
|
- |
|
100 |
$this->param['anf'] = urldecode($_GET['anf']);
|
- |
|
101 |
}
|
- |
|
102 |
if (isset($_GET['prga']) && $_GET['prga'] != '') {
|
- |
|
103 |
$this->param['prga'] = urldecode($_GET['prga']);
|
- |
|
104 |
}
|
- |
|
105 |
if (isset($_GET['prco']) && $_GET['prco'] != '') {
|
- |
|
106 |
$this->param['prco'] = urldecode($_GET['prco']);
|
- |
|
107 |
}
|
- |
|
108 |
if (isset($_GET['sto']) && $_GET['sto'] != '') {
|
- |
|
109 |
$this->param['sto'] = urldecode($_GET['sto']);
|
- |
|
110 |
}
|
- |
|
111 |
if (isset($_GET['sti']) && $_GET['sti'] != '') {
|
- |
|
112 |
$this->param['sti'] = urldecode($_GET['sti']);
|
- |
|
113 |
}
|
- |
|
114 |
if (isset($_GET['stc']) && $_GET['stc'] != '') {
|
- |
|
115 |
$this->param['stc'] = urldecode($_GET['stc']);
|
- |
|
116 |
}
|
- |
|
117 |
}
|
Line 59... |
Line 118... |
59 |
}
|
118 |
|
60 |
|
119 |
|
61 |
public function executerActionParDefaut() {
|
120 |
public function executerActionParDefaut() {
|
Line 62... |
Line 121... |
62 |
$this->executerResultat();
|
121 |
$this->executerResultat();
|
63 |
}
|
122 |
}
|
64 |
|
123 |
|
65 |
public function executerResultat() {
|
124 |
public function executerResultat() {
|
66 |
$this->chargerOnglets();
|
- |
|
67 |
$this->chargerNbreDeTaxons();
|
125 |
$this->chargerOnglets();
|
68 |
$this->chargerNomsFormates();
|
126 |
$this->chargerNbreDeTaxons();
|
- |
|
127 |
$this->chargerNomsFormates();
|
Line 69... |
Line 128... |
69 |
|
128 |
$this->setSortie(self::RENDU_CORPS, $this->getVue('resultat', $this->donneesTpl));
|
70 |
$this->setSortie(self::RENDU_CORPS, $this->getVue('resultat', $this->donneesTpl));
|
129 |
}
|
71 |
}
|
130 |
|
72 |
|
131 |
|
73 |
private function chargerOnglets() {
|
132 |
private function chargerOnglets() {
|
- |
|
133 |
$donnees = array();
|
- |
|
134 |
$donnees['typeResultat'] = $this->parametres->typeResultat;
|
- |
|
135 |
$donnees['typeNom'] = $this->parametres->typeNom;
|
- |
|
136 |
$donnees['ongletsNs'] = array('determination', 'alphab', 'retenu', 'decompo');
|
- |
|
137 |
if (($_GET['action']) == 'rechercheAvancee') {
|
- |
|
138 |
$donnees['urls']['alphab'] = $this->urls->obtenirUrlResultatAvanceOnglets('alphab', $this->param);
|
74 |
$donnees = array();
|
139 |
$donnees['urls']['retenu'] = $this->urls->obtenirUrlResultatAvanceOnglets('retenu', $this->param);
|
75 |
$donnees['typeResultat'] = $this->parametres->typeResultat;
|
140 |
$donnees['urls']['determination'] = $this->urls->obtenirUrlResultatAvanceOnglets('determination',$this->param);
|
76 |
$donnees['typeNom'] = $this->parametres->typeNom;
|
141 |
$donnees['urls']['decompo'] = $this->urls->obtenirUrlResultatAvanceOnglets('decompo',$this->param);
|
77 |
$donnees['ongletsNs'] = array('determination', 'alphab', 'retenu', 'decompo');
|
142 |
} else {
|
78 |
$donnees['ongletsNv'] = array('determination', 'alphab');
|
143 |
$donnees['ongletsNv'] = array('determination', 'alphab');
|
- |
|
144 |
$donnees['urls']['alphab'] = $this->urls->obtenirUrlResultatAlphab();
|
79 |
$donnees['urls']['alphab'] = $this->urls->obtenirUrlResultatAlphab();
|
145 |
$donnees['urls']['retenu'] = $this->urls->obtenirUrlResultatRetenu();
|
80 |
$donnees['urls']['retenu'] = $this->urls->obtenirUrlResultatRetenu();
|
146 |
$donnees['urls']['determination'] = $this->urls->obtenirUrlResultatDetermination();
|
81 |
$donnees['urls']['determination'] = $this->urls->obtenirUrlResultatDetermination();
|
147 |
$donnees['urls']['decompo'] = $this->urls->obtenirUrlResultatDecompo();
|
Line 82... |
Line 148... |
82 |
$donnees['urls']['decompo'] = $this->urls->obtenirUrlResultatDecompo();
|
148 |
}
|