| Line 43... |
Line 43... |
| 43 |
}
|
43 |
}
|
| Line 44... |
Line 44... |
| 44 |
|
44 |
|
| 45 |
|
45 |
|
| - |
|
46 |
//+---------------------------------------------recherche avancee-------------------------------------+
|
| 46 |
//+---------------------------------------------recherche avancee-------------------------------------+
|
47 |
public function executerRechercheAvancee() {
|
| 47 |
public function executerRechercheAvancee() {
|
48 |
$this->param = $this->nettoyerParametresDefautRechercheAvancee($this->param);
|
| 48 |
$donnees['param'] = $this->param;
|
49 |
$donnees['param'] = $this->param;
|
| 49 |
$presence = $this->rechercherCriteresDemandes();
|
50 |
$presence = $this->rechercherCriteresDemandes();
|
| 50 |
if (empty($presence) && !empty($this->param)) {
|
51 |
if (empty($presence) && !empty($this->param)) {
|
| 51 |
$donnees['message_av']['attention'] = 'info_res_vide';
|
52 |
$donnees['message_av']['attention'] = 'info_res_vide';
|
| 52 |
}
|
53 |
}
|
| 53 |
$this->executerAccueil($donnees);
|
54 |
$this->executerAccueil($donnees);
|
| 54 |
if (Registre::get('resultats')) {
|
55 |
if (Registre::get('resultats')) {
|
| 55 |
$_GET['resultat'] = $this->type_resultat;
|
56 |
$_GET['resultat'] = $this->type_resultat;
|
| 56 |
$this->executerAction('Resultat', 'executerResultat');
|
57 |
$this->executerAction('Resultat', 'executerResultat');
|
| - |
|
58 |
}
|
| - |
|
59 |
}
|
| - |
|
60 |
|
| - |
|
61 |
private function nettoyerParametresDefautRechercheAvancee($params) {
|
| - |
|
62 |
$params_nettoyes = array();
|
| - |
|
63 |
foreach ($params as $cle => $param) {
|
| - |
|
64 |
if(!preg_match("#^\(.*\)$#", $param)) {
|
| - |
|
65 |
$params_nettoyes[$cle] = $param;
|
| - |
|
66 |
}
|
| - |
|
67 |
}
|
| Line 57... |
Line 68... |
| 57 |
}
|
68 |
return $params_nettoyes;
|
| 58 |
}
|
69 |
}
|
| 59 |
|
70 |
|
| 60 |
public function rechercherCriteresDemandes() {
|
71 |
public function rechercherCriteresDemandes() {
|
| Line 165... |
Line 176... |
| 165 |
|
176 |
|
| Line 166... |
Line 177... |
| 166 |
//+-----------------------------------------------méthodes utiles---------------------------------+
|
177 |
//+-----------------------------------------------méthodes utiles---------------------------------+
|
| 167 |
|
178 |
|
| 168 |
private function capturerParametres() {
|
179 |
private function capturerParametres() {
|
| 169 |
if (isset($_REQUEST['nom'])) {
|
180 |
if (isset($_REQUEST['nom'])) {
|
| 170 |
$this->nom = trim($_REQUEST['nom']);
|
181 |
$this->nom = $this->convertirEncodageEntree(urldecode($_REQUEST['nom']));
|
| 171 |
}
|
182 |
}
|
| 172 |
if (isset($_GET['type_nom'])) {
|
183 |
if (isset($_GET['type_nom'])) {
|
| 173 |
$this->type_nom = $_GET['type_nom'];
|
184 |
$this->type_nom = $this->convertirEncodageEntree(urldecode($_GET['type_nom']));
|
| 174 |
}
|
185 |
}
|
| 175 |
if (isset($_GET['submit'])) {
|
186 |
if (isset($_GET['submit'])) {
|
| 176 |
$this->submit = urldecode($_GET['submit']);
|
187 |
$this->submit = $this->convertirEncodageEntree(urldecode($_GET['submit']));
|
| 177 |
}
|
188 |
}
|
| 178 |
if(isset($_GET['acces_fiche'])) {
|
189 |
if(isset($_GET['acces_fiche'])) {
|
| 179 |
$this->acces_fiche = true;
|
190 |
$this->acces_fiche = true;
|
| 180 |
}
|
191 |
}
|
| 181 |
if (isset($_GET['niveau'])) {
|
192 |
if (isset($_GET['niveau'])) {
|
| 182 |
Registre::set('parametres.niveau', $_GET['niveau']);
|
193 |
Registre::set('parametres.niveau', $this->convertirEncodageEntree($_GET['niveau']));
|
| 183 |
}
|
194 |
}
|
| 184 |
if (isset($_GET['resultat'])) {
|
195 |
if (isset($_GET['resultat'])) {
|
| 185 |
$this->type_resultat = urldecode($_GET['resultat']);
|
196 |
$this->type_resultat = $this->convertirEncodageEntree(urldecode($_GET['resultat']));
|
| 186 |
} else {
|
197 |
} else {
|
| 187 |
$onglet_resultat = $this->recupererTableauConfig('affich_resultats');
|
198 |
$onglet_resultat = $this->recupererTableauConfig('affich_resultats');
|
| 188 |
$this->type_resultat = $onglet_resultat[Registre::get('parametres.niveau').'_'.$this->type_nom];
|
199 |
$this->type_resultat = $onglet_resultat[Registre::get('parametres.niveau').'_'.$this->type_nom];
|
| Line 189... |
Line 200... |
| 189 |
}
|
200 |
}
|
| 190 |
}
|
201 |
}
|
| 191 |
|
202 |
|
| 192 |
private function capturerParametresAvances() {
|
203 |
private function capturerParametresAvances() {
|
| 193 |
if (isset($_GET['gen']) && $_GET['gen'] != '') {
|
204 |
if (isset($_GET['gen']) && $_GET['gen'] != '') {
|
| 194 |
$this->param['gen'] = urldecode($_GET['gen']);
|
205 |
$this->param['gen'] = $this->convertirEncodageEntree(urldecode($_GET['gen']));
|
| 195 |
}
|
206 |
}
|
| 196 |
if (isset($_GET['fam']) && $_GET['fam'] != '') {
|
207 |
if (isset($_GET['fam']) && $_GET['fam'] != '') {
|
| 197 |
$this->param['fam'] = urldecode($_GET['fam']);
|
208 |
$this->param['fam'] = $this->convertirEncodageEntree(urldecode($_GET['fam']));
|
| 198 |
}
|
209 |
}
|
| 199 |
if (isset($_GET['au']) && $_GET['au'] != ''
|
210 |
if (isset($_GET['au']) && $_GET['au'] != ''
|
| 200 |
&& $_GET['au'] != urlencode($this->i18n['valeur-form-auteur'])) {
|
211 |
&& $_GET['au'] != $this->convertirEncodageEntree(urlencode($this->i18n['valeur-form-auteur']))) {
|
| 201 |
$this->param['au'] = urldecode($_GET['au']);
|
212 |
$this->param['au'] = $this->convertirEncodageEntree(urldecode($_GET['au']));
|
| 202 |
}
|
213 |
}
|
| 203 |
if (isset($_GET['bib']) && $_GET['bib'] != ''
|
214 |
if (isset($_GET['bib']) && $_GET['bib'] != ''
|
| 204 |
&& $_GET['bib'] != urlencode($this->i18n['valeur-form-bib'])) {
|
215 |
&& $_GET['bib'] != $this->convertirEncodageEntree(urlencode($this->i18n['valeur-form-bib']))) {
|
| 205 |
$this->param['bib'] = urldecode($_GET['bib']);
|
216 |
$this->param['bib'] = $this->convertirEncodageEntree(urldecode($_GET['bib']));
|
| 206 |
}
|
217 |
}
|
| 207 |
if (isset($_GET['nn']) && $_GET['nn'] != '') {
|
218 |
if (isset($_GET['nn']) && $_GET['nn'] != '') {
|
| 208 |
$this->param['nn'] = urldecode($_GET['nn']);
|
219 |
$this->param['nn'] = $this->convertirEncodageEntree(urldecode($_GET['nn']));
|
| 209 |
}
|
220 |
}
|
| 210 |
if (isset($_GET['nt']) && $_GET['nt'] != '') {
|
221 |
if (isset($_GET['nt']) && $_GET['nt'] != '') {
|
| 211 |
$this->param['nt'] = urldecode($_GET['nt']);
|
222 |
$this->param['nt'] = $this->convertirEncodageEntree(urldecode($_GET['nt']));
|
| 212 |
}
|
223 |
}
|
| 213 |
if (isset($_GET['sp']) && $_GET['sp'] != '') {
|
224 |
if (isset($_GET['sp']) && $_GET['sp'] != '') {
|
| 214 |
$this->param['sp'] = urldecode($_GET['sp']);
|
225 |
$this->param['sp'] = $this->convertirEncodageEntree(urldecode($_GET['sp']));
|
| 215 |
}
|
226 |
}
|
| 216 |
if (isset($_GET['ssp']) && $_GET['ssp'] != '') {
|
227 |
if (isset($_GET['ssp']) && $_GET['ssp'] != '') {
|
| 217 |
$this->param['ssp'] = urldecode($_GET['ssp']);
|
228 |
$this->param['ssp'] = $this->convertirEncodageEntree(urldecode($_GET['ssp']));
|
| 218 |
}
|
229 |
}
|
| 219 |
if (isset($_GET['type']) && $_GET['type'] != '') {
|
230 |
if (isset($_GET['type']) && $_GET['type'] != '') {
|
| 220 |
$this->param['type'] = urldecode($_GET['type']);
|
231 |
$this->param['type'] = $this->convertirEncodageEntree(urldecode($_GET['type']));
|
| 221 |
}
|
232 |
}
|
| 222 |
if (isset($_GET['and']) && $_GET['and'] != ''
|
233 |
if (isset($_GET['and']) && $_GET['and'] != ''
|
| 223 |
&& $_GET['and'] != urlencode($this->i18n['valeur-form-date'])) {
|
234 |
&& $_GET['and'] != $this->convertirEncodageEntree(urlencode($this->i18n['valeur-form-date']))) {
|
| 224 |
$this->param['and'] = urldecode($_GET['and']);
|
235 |
$this->param['and'] = $this->convertirEncodageEntree(urldecode($_GET['and']));
|
| 225 |
}
|
236 |
}
|
| 226 |
if (isset($_GET['anf']) && $_GET['anf'] != ''
|
237 |
if (isset($_GET['anf']) && $_GET['anf'] != ''
|
| 227 |
&& $_GET['anf'] != urlencode($this->i18n['valeur-form-date'])) {
|
238 |
&& $_GET['anf'] != $this->convertirEncodageEntree(urlencode($this->i18n['valeur-form-date']))) {
|
| 228 |
$this->param['anf'] = urldecode($_GET['anf']);
|
239 |
$this->param['anf'] = $this->convertirEncodageEntree(urldecode($_GET['anf']));
|
| 229 |
}
|
240 |
}
|
| 230 |
if (isset($_GET['prga']) && $_GET['prga'] != '') {
|
241 |
if (isset($_GET['prga']) && $_GET['prga'] != '') {
|
| 231 |
$this->param['prga'] = urldecode($_GET['prga']);
|
242 |
$this->param['prga'] = $this->convertirEncodageEntree(urldecode($_GET['prga']));
|
| 232 |
}
|
243 |
}
|
| 233 |
if (isset($_GET['prco']) && $_GET['prco'] != '') {
|
244 |
if (isset($_GET['prco']) && $_GET['prco'] != '') {
|
| 234 |
$this->param['prco'] = urldecode($_GET['prco']);
|
245 |
$this->param['prco'] = $this->convertirEncodageEntree(urldecode($_GET['prco']));
|
| 235 |
}
|
246 |
}
|
| 236 |
if (isset($_GET['sto']) && $_GET['sto'] != '') {
|
247 |
if (isset($_GET['sto']) && $_GET['sto'] != '') {
|
| 237 |
$this->param['sto'] = urldecode($_GET['sto']);
|
248 |
$this->param['sto'] = $this->convertirEncodageEntree(urldecode($_GET['sto']));
|
| 238 |
}
|
249 |
}
|
| 239 |
if (isset($_GET['sti']) && $_GET['sti'] != '') {
|
250 |
if (isset($_GET['sti']) && $_GET['sti'] != '') {
|
| 240 |
$this->param['sti'] = urldecode($_GET['sti']);
|
251 |
$this->param['sti'] = $this->convertirEncodageEntree(urldecode($_GET['sti']));
|
| 241 |
}
|
252 |
}
|
| 242 |
if (isset($_GET['stc']) && $_GET['stc'] != '') {
|
253 |
if (isset($_GET['stc']) && $_GET['stc'] != '') {
|
| Line 243... |
Line 254... |
| 243 |
$this->param['stc'] = urldecode($_GET['stc']);
|
254 |
$this->param['stc'] = $this->convertirEncodageEntree(urldecode($_GET['stc']));
|
| 244 |
}
|
255 |
}
|
| Line 256... |
Line 267... |
| 256 |
$tableau[$cle] = $val;
|
267 |
$tableau[$cle] = $val;
|
| 257 |
}
|
268 |
}
|
| 258 |
}
|
269 |
}
|
| 259 |
return $tableau;
|
270 |
return $tableau;
|
| 260 |
}
|
271 |
}
|
| - |
|
272 |
|
| - |
|
273 |
|
| - |
|
274 |
/**
|
| - |
|
275 |
* Convertion des valeurs de requête dans l'encodage de l'application (voir fichier config.ini : appli_encodage),
|
| - |
|
276 |
* A cause d'un bug en cours d'investigation, celle ci utilise des paramètres différents de la fonction de conversion
|
| - |
|
277 |
* D'encodage de sortie
|
| - |
|
278 |
* Cette convertion a lieu seulement si les formats sont différents.
|
| - |
|
279 |
*/
|
| - |
|
280 |
private function convertirEncodageEntree($contenu) {
|
| - |
|
281 |
if (Config::get('sortie_encodage') != Config::get('appli_encodage')) {
|
| - |
|
282 |
$contenu = mb_convert_encoding($contenu, Config::get('appli_encodage'), Config::get('sortie_encodage'));
|
| - |
|
283 |
}
|
| - |
|
284 |
return $contenu;
|
| - |
|
285 |
}
|
| Line 261... |
Line 286... |
| 261 |
|
286 |
|
| 262 |
}
|
287 |
}
|
| 263 |
?>
|
288 |
?>
|