Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 967 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 967 Rev 996
Line 17... Line 17...
17
	private $parametres = null;
17
	private $parametres = null;
18
	private $resultats = null;
18
	private $resultats = null;
19
	private $donneesTpl = array();
19
	private $donneesTpl = array();
20
	private $i18n =  array();
20
	private $i18n =  array();
Line -... Line 21...
-
 
21
	
-
 
22
	private $parametresAvancesGeneriques = array('gen','fam','nn','nt','sp','ssp','type','sto','sti','stc');
21
 
23
 
22
	public function initialiser() {
24
	public function initialiser() {
23
		spl_autoload_register(array($this, 'chargerClassesResultat'));
25
		spl_autoload_register(array($this, 'chargerClassesResultat'));
24
		$this->parametres = new ParametresResultats();
26
		$this->parametres = new ParametresResultats();
25
		$this->capturerParametres();
27
		$this->capturerParametres();
Line 88... Line 90...
88
			Registre::set('parametres.niveau', $_GET['niveau']);
90
			Registre::set('parametres.niveau', $_GET['niveau']);
89
		}
91
		}
90
	}
92
	}
Line 91... Line 93...
91
	
93
	
-
 
94
	private function capturerParametresAvances() {
-
 
95
		$this->capturerParametresAvancesGeneriques();
-
 
96
		$this->capturerParametresAvancesDependantsLangage();
-
 
97
		$this->capturerParametresAvancesPresenceSpecifiques();
-
 
98
	}
-
 
99
	
-
 
100
	private function capturerParametresAvancesGeneriques() {
92
	private function capturerParametresAvances() {
101
		foreach($this->parametresAvancesGeneriques as $param) {
93
		if (isset($_GET['gen']) && $_GET['gen'] != '') {
102
			if (isset($_GET[$param]) && $_GET[$param] != '') {
94
			$this->param['gen'] = urldecode($_GET['gen']);
103
				$this->param[$param] = urldecode($_GET[$param]);
95
		}
-
 
96
		if (isset($_GET['fam']) && $_GET['fam'] != '') {
-
 
97
			$this->param['fam'] = urldecode($_GET['fam']);
104
			}
-
 
105
		}
-
 
106
	}
-
 
107
	
98
		}
108
	private function capturerParametresAvancesDependantsLangage() {
99
		if (isset($_GET['au']) && $_GET['au'] != '' 
109
		if (isset($_GET['au']) && $_GET['au'] != ''
100
			&& $_GET['au'] != urlencode($this->i18n['valeur-form-auteur'])) {
110
		&& $_GET['au'] != urlencode($this->i18n['valeur-form-auteur'])) {
101
			$this->param['au'] = urldecode($_GET['au']);
111
			$this->param['au'] = urldecode($_GET['au']);
102
		}
112
		}
103
		if (isset($_GET['bib']) && $_GET['bib'] != ''
113
		if (isset($_GET['bib']) && $_GET['bib'] != ''
104
			&& $_GET['bib'] != urlencode($this->i18n['valeur-form-bib'])) {
114
		&& $_GET['bib'] != urlencode($this->i18n['valeur-form-bib'])) {
105
			$this->param['bib'] = urldecode($_GET['bib']);
115
			$this->param['bib'] = urldecode($_GET['bib']);
106
		}
-
 
107
		if (isset($_GET['nn']) && $_GET['nn'] != '') {
-
 
108
			$this->param['nn'] = urldecode($_GET['nn']);
-
 
109
		}
-
 
110
		if (isset($_GET['nt']) && $_GET['nt'] != '') {
-
 
111
			$this->param['nt'] = urldecode($_GET['nt']);
-
 
112
		}
-
 
113
		if (isset($_GET['sp']) && $_GET['sp'] != '') {
-
 
114
			$this->param['sp'] = urldecode($_GET['sp']);
-
 
115
		}
-
 
116
		if (isset($_GET['ssp']) && $_GET['ssp'] != '') {
-
 
117
			$this->param['ssp'] = urldecode($_GET['ssp']);
-
 
118
		}
-
 
119
		if (isset($_GET['type']) && $_GET['type'] != '') {
-
 
120
			$this->param['type'] = urldecode($_GET['type']);
-
 
121
		}
116
		}
122
		if (isset($_GET['and']) && $_GET['and'] != ''
117
		if (isset($_GET['and']) && $_GET['and'] != ''
123
			&& $_GET['and'] != urlencode($this->i18n['valeur-form-date'])) {
118
		&& $_GET['and'] != urlencode($this->i18n['valeur-form-date'])) {
124
			$this->param['and'] = urldecode($_GET['and']);
119
			$this->param['and'] = urldecode($_GET['and']);
125
		}
120
		}
126
		if (isset($_GET['anf']) && $_GET['anf'] != ''
121
		if (isset($_GET['anf']) && $_GET['anf'] != ''
127
			&& $_GET['anf'] != urlencode($this->i18n['valeur-form-date'])) {
122
		&& $_GET['anf'] != urlencode($this->i18n['valeur-form-date'])) {
128
			$this->param['anf'] = urldecode($_GET['anf']);
123
			$this->param['anf'] = urldecode($_GET['anf']);
129
		}
-
 
130
		if (isset($_GET['prga']) && $_GET['prga'] != '') {
-
 
131
			$this->param['prga'] = urldecode($_GET['prga']);
124
		}
-
 
125
	}
-
 
126
	
-
 
127
	private function capturerParametresAvancesPresenceSpecifiques()  {
-
 
128
		$champs_presence = $this->obtenirChampsPresence();
-
 
129
		foreach($champs_presence as $champ) {
132
		}
130
			$param = $champ['param'];
133
		if (isset($_GET['prco']) && $_GET['prco'] != '') {
131
			if (isset($_GET[$param]) && $_GET[$param] != '') {
134
			$this->param['prco'] = urldecode($_GET['prco']);
132
				$this->param[$param] = urldecode($_GET[$param]);
135
		}
-
 
136
		if (isset($_GET['sto']) && $_GET['sto'] != '') {
-
 
137
			$this->param['sto'] = urldecode($_GET['sto']);
133
			}
138
		}
-
 
139
		if (isset($_GET['sti']) && $_GET['sti'] != '') {
-
 
140
			$this->param['sti'] = urldecode($_GET['sti']);
134
		}
-
 
135
	}
-
 
136
	
-
 
137
	private function obtenirChampsPresence() {
-
 
138
		$tableau_champs_presence = array();
-
 
139
		$referentiel = Registre::get('parametres.referentiel');
-
 
140
		$champs_presence = Config::get($referentiel.'.champsPresence');
141
		}
141
		$champs_presence_spl = explode('|', $champs_presence);
142
		if (isset($_GET['stc']) && $_GET['stc'] != '') {
142
		foreach($champs_presence_spl as $champ) {
-
 
143
			$label_param_champ = explode(':', $champ);
-
 
144
			$tableau_champs_presence[] = array('param' => $label_param_champ[1],
143
			$this->param['stc'] = urldecode($_GET['stc']);
145
													'label' => $label_param_champ[0]);
-
 
146
		}
144
		}
147
		return $tableau_champs_presence;
Line 145... Line 148...
145
	}
148
	}
146
	
149