Subversion Repositories eFlore/Archives.chorologie

Rev

Rev 4 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4 Rev 9
1
<?php
1
<?php
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */ 
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */ 
3
// +------------------------------------------------------------------------------------------------------+
3
// +------------------------------------------------------------------------------------------------------+
4
// | PHP version 5.0.3                                                                                    |
4
// | PHP version 5.0.3                                                                                    |
5
// +------------------------------------------------------------------------------------------------------+
5
// +------------------------------------------------------------------------------------------------------+
6
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
6
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
7
// +------------------------------------------------------------------------------------------------------+
7
// +------------------------------------------------------------------------------------------------------+
8
// | This file is part of Cartographie.                                                                   |
8
// | This file is part of Cartographie.                                                                   |
9
// |                                                                                                      |
9
// |                                                                                                      |
10
// | Foobar is free software; you can redistribute it and/or modify                                       |
10
// | Foobar is free software; you can redistribute it and/or modify                                       |
11
// | it under the terms of the GNU General Public License as published by                                 |
11
// | it under the terms of the GNU General Public License as published by                                 |
12
// | the Free Software Foundation; either version 2 of the License, or                                    |
12
// | the Free Software Foundation; either version 2 of the License, or                                    |
13
// | (at your option) any later version.                                                                  |
13
// | (at your option) any later version.                                                                  |
14
// |                                                                                                      |
14
// |                                                                                                      |
15
// | Foobar is distributed in the hope that it will be useful,                                            |
15
// | Foobar is distributed in the hope that it will be useful,                                            |
16
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
16
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
17
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                        |
17
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                        |
18
// | GNU General Public License for more details.                                                         |
18
// | GNU General Public License for more details.                                                         |
19
// |                                                                                                      |
19
// |                                                                                                      |
20
// | You should have received a copy of the GNU General Public License                                    |
20
// | You should have received a copy of the GNU General Public License                                    |
21
// | along with Foobar; if not, write to the Free Software                                                |
21
// | along with Foobar; if not, write to the Free Software                                                |
22
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
22
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
23
// +------------------------------------------------------------------------------------------------------+
23
// +------------------------------------------------------------------------------------------------------+
24
// CVS : $Id: carto_historique.class.php,v 1.1 2005-02-22 12:02:57 jpm Exp $
24
// CVS : $Id: carto_historique.class.php,v 1.2 2005-02-22 16:35:16 jpm Exp $
25
/**
25
/**
26
* Classe Carto_Historique.
26
* Classe Carto_Historique.
27
*
27
*
28
* Classe permettant de réaliser des cartes.
28
* Classe permettant de réaliser des cartes.
29
*
29
*
30
*@package Cartographie
30
*@package Cartographie
31
//Auteur original :
31
//Auteur original :
32
*@author        Nicolas MATHIEU
32
*@author        Nicolas MATHIEU
33
//Autres auteurs :
33
//Autres auteurs :
34
*@author        Jean-Pascal MILCENT <jpm@tela-botanica.org>
34
*@author        Jean-Pascal MILCENT <jpm@tela-botanica.org>
35
*@author        Alexandre GRANIER <alexandre@tela-botanica.org>
35
*@author        Alexandre GRANIER <alexandre@tela-botanica.org>
36
*@copyright     Tela-Botanica 2000-2004
36
*@copyright     Tela-Botanica 2000-2004
37
*@version       $Revision: 1.1 $ $Date: 2005-02-22 12:02:57 $
37
*@version       $Revision: 1.2 $ $Date: 2005-02-22 16:35:16 $
38
// +------------------------------------------------------------------------------------------------------+
38
// +------------------------------------------------------------------------------------------------------+
39
*/
39
*/
40
 
40
 
41
// +------------------------------------------------------------------------------------------------------+
41
// +------------------------------------------------------------------------------------------------------+
42
// |                                            ENTETE du PROGRAMME                                       |
42
// |                                            ENTETE du PROGRAMME                                       |
43
// +------------------------------------------------------------------------------------------------------+
43
// +------------------------------------------------------------------------------------------------------+
44
 
44
 
45
 
45
 
46
// +------------------------------------------------------------------------------------------------------+
46
// +------------------------------------------------------------------------------------------------------+
47
// |                                            CORPS du PROGRAMME                                        |
47
// |                                            CORPS du PROGRAMME                                        |
48
// +------------------------------------------------------------------------------------------------------+
48
// +------------------------------------------------------------------------------------------------------+
-
 
49
 
49
 
50
/**
-
 
51
* Classe Carto_Historique() - Affiche les liens avec les carte précédentes.
50
//==================================================================================================
52
*
51
// La classe Carto_Historique sert à pouvoir afficher les liens avec les carte précédentes
53
* La classe Carto_Historique sert à pouvoir afficher les liens avec les carte précédentes
52
// On accède à cette fonctionnalité grâce à la méthode afficherHistoriqueCarte()
54
* On accède à cette fonctionnalité grâce à la méthode afficherHistoriqueCarte()
53
// L'objet Carto_HistoriqueCarte recoit en parametres : 
55
* L'objet Carto_HistoriqueCarte recoit en parametres : 
54
//      -la généalogie du niveau ou on en est (du type monde*europe*france )
56
*      - la généalogie du niveau ou on en est (du type monde*europe*france )
55
//      -l'url du document
57
*      - l'url du document
56
//      -en option :    *le caractere de separation (par defaut c'est >)
58
*      - en option :    - le caractere de separation (par defaut c'est >)
57
//                      *la classe css des liens
-
 
58
//===================================================================================================
59
*                      - la classe css des liens
59
 
60
*/
60
class Carto_Historique
61
class Carto_Historique
-
 
62
{
-
 
63
    // +--------------------------------------------------------------------------------------------------+
61
{
64
    //                                      LES ATTRIBUTS DE LA CLASSE                                    
62
    var $historique;
65
    var $historique;
63
    var $url;
66
    var $url;
64
    var $caractere_separation;
67
    var $caractere_separation;
65
    var $class_css;
68
    var $class_css;
66
    var $nom;
69
    var $nom;
67
 
70
    
-
 
71
    // +--------------------------------------------------------------------------------------------------+
-
 
72
    //                                     LE CONSTRUCTEUR DE LA CLASSE                                    
-
 
73
    /**
-
 
74
    * Constructeur Carto_Historique()
-
 
75
    *
-
 
76
    * Constructeur initialisant les attributs de la classe Carto_Historique().
-
 
77
    */
68
    function Carto_HistoriqueCarte ($objet_carte, $caractere = '&gt;', $class = '')
78
    function Carto_Historique($objet_carte, $caractere = '&gt;', $class = '')
69
    {
79
    {
70
        global $GS_GLOBAL;
-
 
71
 
-
 
72
        $this->historique = $objet_carte->historique;
80
        $this->historique = $objet_carte->historique;
73
        $this->url = $objet_carte->url;
81
        $this->url = $objet_carte->url;
74
        $this->nom = $objet_carte->nom;
82
        $this->nom = $objet_carte->nom;
75
        unset ($objet_carte);
83
        unset ($objet_carte);
76
        $this->caractere_separation = $caractere;
84
        $this->caractere_separation = $caractere;
77
        $this->class_css = $class;
85
        $this->class_css = $class;
78
    }//Fin du constructeur Carto_HistoriqueCarte().
86
    }//Fin du constructeur Carto_Historique().
-
 
87
    
-
 
88
    // +--------------------------------------------------------------------------------------------------+
79
    
89
    //                                       LES METHODES PUBLIQUES                                       
80
    function afficherHistoriqueCarte () 
90
    function afficherHistoriqueCarte()
81
    {
91
    {
82
        $res='';
92
        $res='';
83
        $tabonglet = explode ('*', $this->historique);
93
        $tabonglet = explode ('*', $this->historique);
84
        $tabnom = explode ('*', $this->nom);
94
        $tabnom = explode ('*', $this->nom);
85
        foreach ($tabonglet as $key=>$value) {
95
        foreach ($tabonglet as $key=>$value) {
86
            if ($key == 0) {
96
            if ($key == 0) {
87
                $chemin = $value;
97
                $chemin = $value;
88
            }
98
            }
89
            else {
99
            else {
90
                $chemin .= '*'.$value;
100
                $chemin .= '*'.$value;
91
            }
101
            }
92
            
102
            
93
            $res.= '<a ';
103
            $res.= '<a ';
94
            
104
            
95
            if (!empty($this->class_css)) {
105
            if (!empty($this->class_css)) {
96
                $res.='class="'.$this->class_css.'" ';
106
                $res.='class="'.$this->class_css.'" ';
97
            }
107
            }
98
            
108
            
99
            $res.='href="'.$this->url.'&amp;historique_cartes='.$chemin.'">&nbsp;'.$this->caractere_separation.'&nbsp;'.$tabnom[$key].'</a>';
109
            $res.='href="'.$this->url.'&amp;historique_cartes='.$chemin.'">&nbsp;'.$this->caractere_separation.'&nbsp;'.$tabnom[$key].'</a>';
100
        }
110
        }
101
        
111
        
102
        return $res;
112
        return $res;
103
        
113
        
104
    }//Fin de la méthode afficherHistoriqueCarte().
114
    }//Fin de la méthode afficherHistoriqueCarte().
105
 
115
 
106
}//Fin de la classe Carto_Historique.
116
}//Fin de la classe Carto_Historique.
107
 
-
 
108
 
-
 
109
// +------------------------------------------------------------------------------------------------------+
-
 
110
// |                                           LISTE de FONCTIONS                                         |
-
 
111
// +------------------------------------------------------------------------------------------------------+
-
 
112
 
-
 
113
    // +--------------------------------------------------------------------------------------------------+
-
 
114
 
-
 
115
 
117
 
116
// +------------------------------------------------------------------------------------------------------+
118
// +------------------------------------------------------------------------------------------------------+
117
// |                                            PIED du PROGRAMME                                         |
119
// |                                            PIED du PROGRAMME                                         |
118
// +------------------------------------------------------------------------------------------------------+
120
// +------------------------------------------------------------------------------------------------------+
119
 
121
 
120
 
122
 
121
/* +--Fin du code ----------------------------------------------------------------------------------------+
123
/* +--Fin du code ----------------------------------------------------------------------------------------+
122
*
124
*
123
* $Log: not supported by cvs2svn $
125
* $Log: not supported by cvs2svn $
124
* Revision 1.1  2005/02/17 10:58:00  jpm
126
* Revision 1.1  2005/02/22 12:02:57  jpm
125
* Ajout des fichiers pour permettre au serveur de réaliser des cartes. Ils sont à revoir complétement!
127
* Ajout des fichiers de la bibliothèque cartographique.
126
*
-
 
127
*
128
*
128
* +-- Fin du code ----------------------------------------------------------------------------------------+
129
* +-- Fin du code ----------------------------------------------------------------------------------------+
129
*/
130
*/
130
?>
131
?>