New file |
0,0 → 1,127 |
<?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.1 2005-02-17 10:58:00 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.1 $ $Date: 2005-02-17 10:58:00 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
|
|
// +------------------------------------------------------------------------------------------------------+ |
// | CORPS du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
|
//================================================================================================== |
// 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 |
{ |
var $historique; |
var $url; |
var $caractere_separation; |
var $class_css; |
var $nom; |
|
function Carto_HistoriqueCarte ($objet_carte, $caractere = '>', $class = '') |
{ |
global $GS_GLOBAL; |
|
$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_HistoriqueCarte(). |
|
function 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. |
|
|
// +------------------------------------------------------------------------------------------------------+ |
// | LISTE de FONCTIONS | |
// +------------------------------------------------------------------------------------------------------+ |
|
// +--------------------------------------------------------------------------------------------------+ |
|
|
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
|
|
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |