Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 104 | Rev 133 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 104 Rev 112
Line 302... Line 302...
302
	// Fonction de formatage pour les services /#id/
302
	// Fonction de formatage pour les services /#id/
Line 303... Line 303...
303
 
303
 
304
	public function formaterId($resultat) {
304
	public function formaterId($resultat) {
305
		$this->recupererTableSignification('correspondance_champs,champs_api,champs_comp');
305
		$this->recupererTableSignification('correspondance_champs,champs_api,champs_comp');
306
		$this->resultat_req = $resultat;
306
		$this->resultat_req = $resultat;
307
		
307
 
308
		foreach ($resultat as $cle => $valeur) {
308
		foreach ($resultat as $cle => $valeur) {
309
			if ($valeur != '') {
309
			if ($valeur != '') {
310
				$this->afficherDonnees($cle, $valeur);
310
				$this->afficherDonnees($cle, $valeur);
311
			}
311
			}
Line 702... Line 702...
702
	/** Permet de retourner une chaine de caractère composée des parametres du nom (ns.structure : annnée, auteur,
702
	/** Permet de retourner une chaine de caractère composée des parametres du nom (ns.structure : annnée, auteur,
703
	 * bibilio et addendum). A ajouter au nom scientifique */
703
	 * bibilio et addendum). A ajouter au nom scientifique */
704
	public function ajouterCompositionNom($tab_res) {
704
	public function ajouterCompositionNom($tab_res) {
705
		$nom = '';
705
		$nom = '';
706
		if (isset($this->compo_nom)) {
706
		if (isset($this->compo_nom)) {
707
			$compo_nom = null;
-
 
708
			$nom_complet = null;
-
 
-
 
707
 
-
 
708
 
709
			if ($this->parametres['ns.format'] == 'htm') {
709
			if ($this->parametres['ns.format'] == 'htm') {
710
				$format = array(
710
				$format = array(
711
					'au' => '<span class="auteur">%s</span>',
711
					'au' => '<span class="auteur">%s</span>',
712
					'an' => '[<span class="annee">%s</span>]',
712
					'an' => '[<span class="annee">%s</span>]',
713
					'an_bib' => '[<span class="annee">%s</span>, <span class="biblio">%s</span>]',
713
					'an_bib' => '[<span class="annee">%s</span>, <span class="biblio">%s</span>]',
Line 719... Line 719...
719
					'an' => '[%s]',
719
					'an' => '[%s]',
720
					'an_bib' => '[%s, %s]',
720
					'an_bib' => '[%s, %s]',
721
					'bib' => '[%s]',
721
					'bib' => '[%s]',
722
					'ad' => '[%s]');
722
					'ad' => '[%s]');
723
			}
723
			}
-
 
724
			$compo_nom = array();
724
			foreach ($this->compo_nom as $key => $champ) {
725
			foreach ($this->compo_nom as $key => $champ) {
725
				if (isset($tab_res[$champ]) && !empty($tab_res[$champ])) {
726
				if (isset($tab_res[$champ]) && !empty($tab_res[$champ])) {
726
					$compo_nom[$key] = $tab_res[$champ];
727
					$compo_nom[$key] = $tab_res[$champ];
727
				}
728
				}
728
			}
729
			}
729
			$this->formerNomComplet($compo_nom, $nom_complet, $format);
730
			$nom_complet = $this->formerNomComplet($compo_nom, $format);
730
			$nom = ' '.implode(' ', $nom_complet);
731
			$nom = ' '.implode(' ', $nom_complet);
731
		}
732
		}
732
		return rtrim($nom, ' ');
733
		return rtrim($nom, ' ');
733
	}
734
	}
Line 734... Line 735...
734
 
735
 
-
 
736
 
735
 
737
	public function formerNomComplet($compo_nom, $format) {
736
	public function formerNomComplet(&$compo_nom, &$nom_complet, $format) {
738
		$nom_complet = array();
737
		extract($compo_nom);
739
		extract($compo_nom);
738
		if (isset($au)) $nom_complet[] = sprintf($format['au'], $au);
740
		if (isset($au)) $nom_complet[] = sprintf($format['au'], $au);
739
		if (isset($an)) {
741
		if (isset($an)) {