Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Ignore whitespace Rev 995 → Rev 996

/trunk/configurations/bdtxa.ini
6,4 → 6,15
nom = "Base de données des Trachéophytes des Antilles"
baseImages = "cel"
baseStatuts = "sptba"
baseRepartition = "bdtxa"
baseRepartition = "bdtxa"
 
; à voir si l'on crée un fichier spécifique pour l'i18n de chaque référentiel
champsPresence = "statut de présence en Guadeloupe:prgua|
statut de présence en Martinique:prmar|
statut de présence à Saint-Martin:prstm|
statut de présence à La désirade:prdes|
statut de présence à Saint-Barthélémy:prstb|
statut de présence à Marie-Galante:prmga|
statut de présence aux Saintes:prsai"
/trunk/configurations/bdtfx.ini
16,4 → 16,7
baseDescription = "coste,baseflor"
baseEcologie = "baseflor"
basePhytosocio = "baseveg"
baseStatuts = "sptb"
baseStatuts = "sptb"
 
; à voir si l'on crée un fichier spécifique pour l'i18n de chaque référentiel
champsPresence = "statut de présence en France (hors Corse):prga|statut de présence en Corse:prco"
/trunk/modules/recherche_avancee/squelettes/form_recherche_av.tpl.html
96,84 → 96,48
<fieldset class="presence_form">
<legend> Présence </legend>
<br/>
<? $prga = ''; if (isset($param['prga'])){ $prga = $param['prga']; }?>
<label for="prga">statut de présence en France (hors Corse)</label>
<select name="prga">
<option value="" <?=($prga == '') ? 'selected="selected"' : '' ?> >
</option>
<option value="0" <?=($prga == '0') ? 'selected="selected"' : '' ?> >
pas d'information
</option>
<option value="P" <?=($prga == 'P') ? 'selected="selected"' : '' ?> >
présent
</option>
<option value="S" <?=($prga == 'S') ? 'selected="selected"' : '' ?> >
supposé présent
</option>
<option value="D" <?=($prga == 'D') ? 'selected="selected"' : '' ?>>
présence douteuse
</option>
<option value="E" <?=($prga == 'E') ? 'selected="selected"' : '' ?>>
éteint </option>
<option value="F" <?=($prga == 'F') ? 'selected="selected"' : '' ?>>
cité par erreur comme présent
</option>
<option value="A" <?=($prga == 'A') ? 'selected="selected"' : '' ?>>
absent
</option>
<option value="-" <?=($prga == '-') ? 'selected="selected"' : '' ?>>
autre statut de présence
</option>
<option value="E-W" <?=($prga == 'E-W') ? 'selected="selected"' : '' ?>>
disparu
</option>
<option value="P-B" <?=($prga == 'P-B') ? 'selected="selected"' : '' ?>>
présence accidentelle
</option>
<option value="E-F" <?=($prga == 'E-F') ? 'selected="selected"' : '' ?>>
trouvé en fouille
</option>
</select>
<br/> <br/>
<? $prco = ''; if (isset($param['prco'])){ $prco = $param['prco']; }?>
<label for="prco">statut de présence en Corse </label>
<select name="prco">
<option value="" <?=($prco == '') ? 'selected="selected"' : '' ?> >
</option>
<option value="0" <?=($prco == '0') ? 'selected="selected"' : '' ?> >
pas d'information
</option>
<option value="P" <?=($prco == 'P') ? 'selected="selected"' : '' ?>>
présent
</option>
<option value="S" <?=($prco == 'S') ? 'selected="selected"' : '' ?>>
supposé présent
</option>
<option value="D" <?=($prco == 'D') ? 'selected="selected"' : '' ?>>
présence douteuse
</option>
<option value="E" <?=($prco == 'E') ? 'selected="selected"' : '' ?>>
éteint
</option>
<option value="F" <?=($prco == 'F') ? 'selected="selected"' : '' ?>>
cité par erreur comme présent
</option>
<option value="A" <?=($prco == 'A') ? 'selected="selected"' : '' ?>>
absent
</option>
<option value="-" <?=($prco == '-') ? 'selected="selected"' : '' ?>>
autre statut de présence
</option>
<option value="E-W" <?=($prco == 'E-W') ? 'selected="selected"' : '' ?>>
disparu
</option>
<option value="P-B" <?=($prco == 'P-B') ? 'selected="selected"' : '' ?>>
présence accidentelle
</option>
<option value="E-F" <?=($prco == 'E-F') ? 'selected="selected"' : '' ?>>
trouvé en fouille
</option>
</select>
<? foreach($champs_presence as $presence) : ?>
<? $nom_param_presence = $presence['param'] ?>
<? $param_presence = ''; if (isset($param[$nom_param_presence])){ $param_presence = $param[$nom_param_presence]; }?>
<label for="<?= $nom_param_presence ?>"><?= $presence['label'] ?></label>
<select name="<?= $nom_param_presence ?>">
<option value="" <?=($param_presence == '') ? 'selected="selected"' : '' ?> >
</option>
<option value="0" <?=($param_presence == '0') ? 'selected="selected"' : '' ?> >
pas d'information
</option>
<option value="P" <?=($param_presence == 'P') ? 'selected="selected"' : '' ?> >
présent
</option>
<option value="S" <?=($param_presence == 'S') ? 'selected="selected"' : '' ?> >
supposé présent
</option>
<option value="D" <?=($param_presence == 'D') ? 'selected="selected"' : '' ?>>
présence douteuse
</option>
<option value="E" <?=($param_presence == 'E') ? 'selected="selected"' : '' ?>>
éteint </option>
<option value="F" <?=($param_presence == 'F') ? 'selected="selected"' : '' ?>>
cité par erreur comme présent
</option>
<option value="A" <?=($param_presence == 'A') ? 'selected="selected"' : '' ?>>
absent
</option>
<option value="-" <?=($param_presence == '-') ? 'selected="selected"' : '' ?>>
autre statut de présence
</option>
<option value="E-W" <?=($param_presence == 'E-W') ? 'selected="selected"' : '' ?>>
disparu
</option>
<option value="P-B" <?=($param_presence == 'P-B') ? 'selected="selected"' : '' ?>>
présence accidentelle
</option>
<option value="E-F" <?=($param_presence == 'E-F') ? 'selected="selected"' : '' ?>>
trouvé en fouille
</option>
</select>
<br/> <br/>
<? endforeach; ?>
</fieldset>
<fieldset class="statuts_form">
<legend> Statuts </legend>
/trunk/modules/recherche_avancee/RechercheAvancee.php
7,8 → 7,23
$donnees['i18n'] = I18n::get('Recherche-form-avancee');
$donnees['referentiel'] = Registre::get('parametres.referentiel');
$donnees['url_base_completion_noms_sci'] = str_replace('{projet}', $donnees['referentiel'], Config::get('nomsTpl'));
$donnees['champs_presence'] = $this->obtenirChampsPresence();
$donnees['url_form'] = $this->urls->obtenirUrlBase();
return $this->getVue('form_recherche_av', $donnees);
}
private function obtenirChampsPresence() {
$tableau_champs_presence = array();
$referentiel = Registre::get('parametres.referentiel');
$champs_presence = Config::get($referentiel.'.champsPresence');
//echo '<pre>'.print_r($champs_presence,true).'</pre>';exit;
$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]);
}
return $tableau_champs_presence;
}
}
?>
/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;
}
 
/trunk/modules/recherche/Recherche.php
12,6 → 12,8
private $param;
private $i18n = array();
private $parametresAvancesGeneriques = array('gen','fam','nn','nt','sp','ssp','type','sto','sti','stc');
public function initialiser() {
$this->capturerParametres();
$this->capturerParametresAvances();
201,58 → 203,59
}
private function capturerParametresAvances() {
if (isset($_GET['gen']) && $_GET['gen'] != '') {
$this->param['gen'] = $this->convertirEncodageEntree(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] = $this->convertirEncodageEntree(urldecode($_GET[$param]));
}
}
if (isset($_GET['fam']) && $_GET['fam'] != '') {
$this->param['fam'] = $this->convertirEncodageEntree(urldecode($_GET['fam']));
}
if (isset($_GET['au']) && $_GET['au'] != ''
&& $_GET['au'] != $this->convertirEncodageEntree(urlencode($this->i18n['valeur-form-auteur']))) {
}
private function capturerParametresAvancesDependantsLangage() {
if (isset($_GET['au']) && $_GET['au'] != ''
&& $_GET['au'] != $this->convertirEncodageEntree(urlencode($this->i18n['valeur-form-auteur']))) {
$this->param['au'] = $this->convertirEncodageEntree(urldecode($_GET['au']));
}
if (isset($_GET['bib']) && $_GET['bib'] != ''
&& $_GET['bib'] != $this->convertirEncodageEntree(urlencode($this->i18n['valeur-form-bib']))) {
&& $_GET['bib'] != $this->convertirEncodageEntree(urlencode($this->i18n['valeur-form-bib']))) {
$this->param['bib'] = $this->convertirEncodageEntree(urldecode($_GET['bib']));
}
if (isset($_GET['nn']) && $_GET['nn'] != '') {
$this->param['nn'] = $this->convertirEncodageEntree(urldecode($_GET['nn']));
}
if (isset($_GET['nt']) && $_GET['nt'] != '') {
$this->param['nt'] = $this->convertirEncodageEntree(urldecode($_GET['nt']));
}
if (isset($_GET['sp']) && $_GET['sp'] != '') {
$this->param['sp'] = $this->convertirEncodageEntree(urldecode($_GET['sp']));
}
if (isset($_GET['ssp']) && $_GET['ssp'] != '') {
$this->param['ssp'] = $this->convertirEncodageEntree(urldecode($_GET['ssp']));
}
if (isset($_GET['type']) && $_GET['type'] != '') {
$this->param['type'] = $this->convertirEncodageEntree(urldecode($_GET['type']));
}
if (isset($_GET['and']) && $_GET['and'] != ''
&& $_GET['and'] != $this->convertirEncodageEntree(urlencode($this->i18n['valeur-form-date']))) {
&& $_GET['and'] != $this->convertirEncodageEntree(urlencode($this->i18n['valeur-form-date']))) {
$this->param['and'] = $this->convertirEncodageEntree(urldecode($_GET['and']));
}
if (isset($_GET['anf']) && $_GET['anf'] != ''
&& $_GET['anf'] != $this->convertirEncodageEntree(urlencode($this->i18n['valeur-form-date']))) {
&& $_GET['anf'] != urlencode($this->i18n['valeur-form-date'])) {
$this->param['anf'] = $this->convertirEncodageEntree(urldecode($_GET['anf']));
}
if (isset($_GET['prga']) && $_GET['prga'] != '') {
$this->param['prga'] = $this->convertirEncodageEntree(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] = $this->convertirEncodageEntree(urldecode($_GET[$param]));
}
}
if (isset($_GET['prco']) && $_GET['prco'] != '') {
$this->param['prco'] = $this->convertirEncodageEntree(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'] = $this->convertirEncodageEntree(urldecode($_GET['sto']));
}
if (isset($_GET['sti']) && $_GET['sti'] != '') {
$this->param['sti'] = $this->convertirEncodageEntree(urldecode($_GET['sti']));
}
if (isset($_GET['stc']) && $_GET['stc'] != '') {
$this->param['stc'] = $this->convertirEncodageEntree(urldecode($_GET['stc']));
}
return $tableau_champs_presence;
}
protected function recupererTableauConfig($param) {