17,14 → 17,17 |
private $parametres = null; |
private $resultats = null; |
private $donneesTpl = array(); |
private $i18n = array(); |
|
public function initialiser() { |
spl_autoload_register(array($this, 'chargerClassesResultat')); |
$this->parametres = new ParametresResultats(); |
$this->capturerParametres(); |
$this->capturerParametresAvances(); |
$this->parametres->reftaxCourant = Registre::get('parametres.referentiel'); |
$this->parametres->projetImg = Config::get($this->parametres->reftaxCourant.'.referentielImages'); |
$this->resultats = Registre::get('resultats'); |
$this->i18n = I18n::get('Recherche-form-avancee'); |
} |
|
private function chargerClassesResultat($classe) { |
58,6 → 61,62 |
} |
} |
|
private function capturerParametresAvances() { |
if (isset($_GET['gen']) && $_GET['gen'] != '') { |
$this->param['gen'] = urldecode($_GET['gen']); |
} |
if (isset($_GET['fam']) && $_GET['fam'] != '') { |
$this->param['fam'] = urldecode($_GET['fam']); |
} |
if (isset($_GET['au']) && $_GET['au'] != '' |
&& $_GET['au'] != urlencode($this->i18n['valeur-form-auteur'])) { |
$this->param['au'] = urldecode($_GET['au']); |
} |
if (isset($_GET['bib']) && $_GET['bib'] != '' |
&& $_GET['bib'] != urlencode($this->i18n['valeur-form-bib'])) { |
$this->param['bib'] = urldecode($_GET['bib']); |
} |
if (isset($_GET['nn']) && $_GET['nn'] != '') { |
$this->param['nn'] = urldecode($_GET['nn']); |
} |
if (isset($_GET['nt']) && $_GET['nt'] != '') { |
$this->param['nt'] = urldecode($_GET['nt']); |
} |
if (isset($_GET['sp']) && $_GET['sp'] != '') { |
$this->param['sp'] = urldecode($_GET['sp']); |
} |
if (isset($_GET['ssp']) && $_GET['ssp'] != '') { |
$this->param['ssp'] = urldecode($_GET['ssp']); |
} |
if (isset($_GET['type']) && $_GET['type'] != '') { |
$this->param['type'] = urldecode($_GET['type']); |
} |
if (isset($_GET['and']) && $_GET['and'] != '' |
&& $_GET['and'] != urlencode($this->i18n['valeur-form-date'])) { |
$this->param['and'] = urldecode($_GET['and']); |
} |
if (isset($_GET['anf']) && $_GET['anf'] != '' |
&& $_GET['anf'] != urlencode($this->i18n['valeur-form-date'])) { |
$this->param['anf'] = urldecode($_GET['anf']); |
} |
if (isset($_GET['prga']) && $_GET['prga'] != '') { |
$this->param['prga'] = urldecode($_GET['prga']); |
} |
if (isset($_GET['prco']) && $_GET['prco'] != '') { |
$this->param['prco'] = urldecode($_GET['prco']); |
} |
if (isset($_GET['sto']) && $_GET['sto'] != '') { |
$this->param['sto'] = urldecode($_GET['sto']); |
} |
if (isset($_GET['sti']) && $_GET['sti'] != '') { |
$this->param['sti'] = urldecode($_GET['sti']); |
} |
if (isset($_GET['stc']) && $_GET['stc'] != '') { |
$this->param['stc'] = urldecode($_GET['stc']); |
} |
} |
|
|
public function executerActionParDefaut() { |
$this->executerResultat(); |
} |
66,20 → 125,27 |
$this->chargerOnglets(); |
$this->chargerNbreDeTaxons(); |
$this->chargerNomsFormates(); |
|
$this->setSortie(self::RENDU_CORPS, $this->getVue('resultat', $this->donneesTpl)); |
} |
|
|
private function chargerOnglets() { |
$donnees = array(); |
$donnees['typeResultat'] = $this->parametres->typeResultat; |
$donnees['typeNom'] = $this->parametres->typeNom; |
$donnees['ongletsNs'] = array('determination', 'alphab', 'retenu', 'decompo'); |
if (($_GET['action']) == 'rechercheAvancee') { |
$donnees['urls']['alphab'] = $this->urls->obtenirUrlResultatAvanceOnglets('alphab', $this->param); |
$donnees['urls']['retenu'] = $this->urls->obtenirUrlResultatAvanceOnglets('retenu', $this->param); |
$donnees['urls']['determination'] = $this->urls->obtenirUrlResultatAvanceOnglets('determination',$this->param); |
$donnees['urls']['decompo'] = $this->urls->obtenirUrlResultatAvanceOnglets('decompo',$this->param); |
} else { |
$donnees['ongletsNv'] = array('determination', 'alphab'); |
$donnees['urls']['alphab'] = $this->urls->obtenirUrlResultatAlphab(); |
$donnees['urls']['retenu'] = $this->urls->obtenirUrlResultatRetenu(); |
$donnees['urls']['determination'] = $this->urls->obtenirUrlResultatDetermination(); |
$donnees['urls']['decompo'] = $this->urls->obtenirUrlResultatDecompo(); |
} |
$donnees['i18n'] = I18n::get('Resultat-onglets'); |
$this->donneesTpl['ongletsHtml'] = $this->getVue('onglets', $donnees); |
} |