Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Ignore whitespace Rev 995 → Rev 996

/trunk/modules/resultat/Resultat.php
18,6 → 18,8
private $resultats = null;
private $donneesTpl = array();
private $i18n = array();
private $parametresAvancesGeneriques = array('gen','fam','nn','nt','sp','ssp','type','sto','sti','stc');
 
public function initialiser() {
spl_autoload_register(array($this, 'chargerClassesResultat'));
90,58 → 92,59
}
private function capturerParametresAvances() {
if (isset($_GET['gen']) && $_GET['gen'] != '') {
$this->param['gen'] = urldecode($_GET['gen']);
$this->capturerParametresAvancesGeneriques();
$this->capturerParametresAvancesDependantsLangage();
$this->capturerParametresAvancesPresenceSpecifiques();
}
private function capturerParametresAvancesGeneriques() {
foreach($this->parametresAvancesGeneriques as $param) {
if (isset($_GET[$param]) && $_GET[$param] != '') {
$this->param[$param] = urldecode($_GET[$param]);
}
}
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'])) {
}
private function capturerParametresAvancesDependantsLangage() {
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'])) {
&& $_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'])) {
&& $_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'])) {
&& $_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']);
}
private function capturerParametresAvancesPresenceSpecifiques() {
$champs_presence = $this->obtenirChampsPresence();
foreach($champs_presence as $champ) {
$param = $champ['param'];
if (isset($_GET[$param]) && $_GET[$param] != '') {
$this->param[$param] = urldecode($_GET[$param]);
}
}
if (isset($_GET['prco']) && $_GET['prco'] != '') {
$this->param['prco'] = urldecode($_GET['prco']);
}
private function obtenirChampsPresence() {
$tableau_champs_presence = array();
$referentiel = Registre::get('parametres.referentiel');
$champs_presence = Config::get($referentiel.'.champsPresence');
$champs_presence_spl = explode('|', $champs_presence);
foreach($champs_presence_spl as $champ) {
$label_param_champ = explode(':', $champ);
$tableau_champs_presence[] = array('param' => $label_param_champ[1],
'label' => $label_param_champ[0]);
}
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']);
}
return $tableau_champs_presence;
}