Rev 4 | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?php/*vim: set expandtab tabstop=4 shiftwidth=4: */// +------------------------------------------------------------------------------------------------------+// | PHP version 5.0.3 |// +------------------------------------------------------------------------------------------------------+// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |// +------------------------------------------------------------------------------------------------------+// | This file is part of Cartographie. |// | |// | Foobar is free software; you can redistribute it and/or modify |// | it under the terms of the GNU General Public License as published by |// | the Free Software Foundation; either version 2 of the License, or |// | (at your option) any later version. |// | |// | Foobar is distributed in the hope that it will be useful, |// | but WITHOUT ANY WARRANTY; without even the implied warranty of |// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |// | GNU General Public License for more details. |// | |// | You should have received a copy of the GNU General Public License |// | along with Foobar; if not, write to the Free Software |// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |// +------------------------------------------------------------------------------------------------------+// CVS : $Id: carto_historique.class.php,v 1.2 2005-02-22 16:35:16 jpm Exp $/*** Classe Carto_Historique.** Classe permettant de réaliser des cartes.**@package Cartographie//Auteur original :*@author Nicolas MATHIEU//Autres auteurs :*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>*@author Alexandre GRANIER <alexandre@tela-botanica.org>*@copyright Tela-Botanica 2000-2004*@version $Revision: 1.2 $ $Date: 2005-02-22 16:35:16 $// +------------------------------------------------------------------------------------------------------+*/// +------------------------------------------------------------------------------------------------------+// | ENTETE du PROGRAMME |// +------------------------------------------------------------------------------------------------------+// +------------------------------------------------------------------------------------------------------+// | CORPS du PROGRAMME |// +------------------------------------------------------------------------------------------------------+/*** Classe Carto_Historique() - Affiche les liens avec les carte précédentes.** La classe Carto_Historique sert à pouvoir afficher les liens avec les carte précédentes* On accède à cette fonctionnalité grâce à la méthode afficherHistoriqueCarte()* L'objet Carto_HistoriqueCarte recoit en parametres :* - la généalogie du niveau ou on en est (du type monde*europe*france )* - l'url du document* - en option : - le caractere de separation (par defaut c'est >)* - la classe css des liens*/class Carto_Historique{// +--------------------------------------------------------------------------------------------------+// LES ATTRIBUTS DE LA CLASSEvar $historique;var $url;var $caractere_separation;var $class_css;var $nom;// +--------------------------------------------------------------------------------------------------+// LE CONSTRUCTEUR DE LA CLASSE/*** Constructeur Carto_Historique()** Constructeur initialisant les attributs de la classe Carto_Historique().*/function Carto_Historique($objet_carte, $caractere = '>', $class = ''){$this->historique = $objet_carte->historique;$this->url = $objet_carte->url;$this->nom = $objet_carte->nom;unset ($objet_carte);$this->caractere_separation = $caractere;$this->class_css = $class;}//Fin du constructeur Carto_Historique().// +--------------------------------------------------------------------------------------------------+// LES METHODES PUBLIQUESfunction afficherHistoriqueCarte(){$res='';$tabonglet = explode ('*', $this->historique);$tabnom = explode ('*', $this->nom);foreach ($tabonglet as $key=>$value) {if ($key == 0) {$chemin = $value;}else {$chemin .= '*'.$value;}$res.= '<a ';if (!empty($this->class_css)) {$res.='class="'.$this->class_css.'" ';}$res.='href="'.$this->url.'&historique_cartes='.$chemin.'"> '.$this->caractere_separation.' '.$tabnom[$key].'</a>';}return $res;}//Fin de la méthode afficherHistoriqueCarte().}//Fin de la classe Carto_Historique.// +------------------------------------------------------------------------------------------------------+// | PIED du PROGRAMME |// +------------------------------------------------------------------------------------------------------+/* +--Fin du code ----------------------------------------------------------------------------------------+** $Log: not supported by cvs2svn $* Revision 1.1 2005/02/22 12:02:57 jpm* Ajout des fichiers de la bibliothèque cartographique.** +-- Fin du code ----------------------------------------------------------------------------------------+*/?>