Subversion Repositories Applications.papyrus

Rev

Rev 810 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 810 Rev 820
1
<?php
1
<?php
2
 
2
 
3
//vim: set expandtab tabstop=4 shiftwidth=4: 
3
//vim: set expandtab tabstop=4 shiftwidth=4: 
4
// +-----------------------------------------------------------------------------------------------+
4
// +-----------------------------------------------------------------------------------------------+
5
// | PHP version 4.0                                                                               |
5
// | PHP version 4.0                                                                               |
6
// +-----------------------------------------------------------------------------------------------+
6
// +-----------------------------------------------------------------------------------------------+
7
// | Copyright (c) 1997, 1998, 1999, 2000, 2001 The PHP Group                                      |
7
// | Copyright (c) 1997, 1998, 1999, 2000, 2001 The PHP Group                                      |
8
// +-----------------------------------------------------------------------------------------------+
8
// +-----------------------------------------------------------------------------------------------+
9
// | This source file is subject to version 2.0 of the PHP license,                                | 
9
// | This source file is subject to version 2.0 of the PHP license,                                | 
10
// | that is bundled with this package in the file LICENSE, and is                                 |
10
// | that is bundled with this package in the file LICENSE, and is                                 |
11
// | available at through the world-wide-web at                                                    |
11
// | available at through the world-wide-web at                                                    |
12
// | http://www.php.net/license/2_02.txt.                                                          |
12
// | http://www.php.net/license/2_02.txt.                                                          |
13
// | If you did not receive a copy of the PHP license and are unable to                            |
13
// | If you did not receive a copy of the PHP license and are unable to                            |
14
// | obtain it through the world-wide-web, please send a note to                                   |
14
// | obtain it through the world-wide-web, please send a note to                                   |
15
// | license@php.net so we can mail you a copy immediately.                                        |
15
// | license@php.net so we can mail you a copy immediately.                                        |
16
// +-----------------------------------------------------------------------------------------------+
16
// +-----------------------------------------------------------------------------------------------+
17
/**
17
/**
18
*
18
*
19
*Page permettant l'affichage des informations de cartographie des inscrits
19
*Page permettant l'affichage des informations de cartographie des inscrits
20
*
20
*
21
*@package cartographie
21
*@package cartographie
22
//Auteur original :
22
//Auteur original :
23
*@author                Alexandre GRANIER <alexandre@tela-botanica.org>
23
*@author                Alexandre GRANIER <alexandre@tela-botanica.org>
24
//Autres auteurs :
24
//Autres auteurs :
25
*@copyright         Tela-Botanica 2000-2004
25
*@copyright         Tela-Botanica 2000-2004
26
*@version             03 mai 2004
26
*@version             03 mai 2004
27
// +-----------------------------------------------------------------------------------------------+
27
// +-----------------------------------------------------------------------------------------------+
28
//
28
//
29
// $Id: cartographie.php,v 1.4 2006-04-10 14:01:36 florian Exp $
29
// $Id: cartographie.php,v 1.5 2006-04-19 13:49:04 alexandre_tb Exp $
30
// FICHIER : $RCSfile: cartographie.php,v $
30
// FICHIER : $RCSfile: cartographie.php,v $
31
// AUTEUR    : $Author: florian $
31
// AUTEUR    : $Author: alexandre_tb $
32
// VERSION : $Revision: 1.4 $
32
// VERSION : $Revision: 1.5 $
33
// DATE        : $Date: 2006-04-10 14:01:36 $
33
// DATE        : $Date: 2006-04-19 13:49:04 $
34
*/
34
*/
35
include_once PAP_CHEMIN_RACINE.'/client/bottin/configuration/bottin.config.inc.php';
35
include_once PAP_CHEMIN_RACINE.'/client/bottin/configuration/bottin.config.inc.php';
36
include_once INS_CHEMIN_APPLI.'configuration/cartographie.config.inc.php';
36
include_once INS_CHEMIN_APPLI.'configuration/cartographie.config.inc.php';
37
include_once INS_CHEMIN_APPLI.'bibliotheque/bottin.fonct.php';
37
include_once INS_CHEMIN_APPLI.'bibliotheque/bottin.fonct.php';
38
include_once INS_CHEMIN_APPLI.'bibliotheque/lib.carto.php';
38
include_once INS_CHEMIN_APPLI.'bibliotheque/lib.carto.php';
39
 
39
 
40
//================================================================================================
40
//================================================================================================
41
if ( isset($_GET['voir_fiche']) or isset($_GET['voir_abonnement']) or isset($_GET['voir_actus']) or isset($_GET['voir_ressources']) or isset($_GET['voir_competences']) ) {
41
if ( isset($_GET['voir_fiche']) or isset($_GET['voir_abonnement']) or isset($_GET['voir_actus']) or isset($_GET['voir_ressources']) or isset($_GET['voir_competences']) ) {
42
	//---------------le menu de l'appli-----------
42
	//---------------le menu de l'appli-----------
43
	function afficherContenuNavigation () {
43
	function afficherContenuNavigation () {
44
		$res =inscription_onglets();
44
		$res =inscription_onglets();
45
		return $res ;
45
		return $res ;
46
	}
46
	}
47
}
47
}
48
 
48
 
49
//================================================================================================
49
//================================================================================================
50
 
50
 
51
function afficherContenuCorps() 
51
function afficherContenuCorps() 
52
{
52
{
53
    global $image_x;
53
    global $image_x;
54
    global $image_y;
54
    global $image_y;
55
    global $historique_cartes;
55
    global $historique_cartes;
56
    global $mailer;
56
    global $mailer;
57
    global $fin;
57
    global $fin;
58
    global $sendpwd;//utilisé dans liste_inscrit.php
58
    global $sendpwd;//utilisé dans liste_inscrit.php
59
    global $select;//utilisé dans liste_inscrit.php
59
    global $select;//utilisé dans liste_inscrit.php
60
    global $liste_zone_carte;
60
    global $liste_zone_carte;
61
    
61
    
62
	//=================================================================================================
62
	//=================================================================================================
63
	//Gestion de la configuration    
63
	//Gestion de la configuration    
64
    $requete = 'SELECT * FROM carto_config WHERE cc_menu_id='.$_GET['menu'];
64
    $requete = 'SELECT * FROM carto_config WHERE cc_menu_id='.$GLOBALS['_GEN_commun']['info_menu']->gm_id_menu;
65
    $resultat = $GLOBALS['ins_db']->query($requete) ;
65
    $resultat = $GLOBALS['ins_db']->query($requete) ;
66
    if (DB::isError($resultat)) {
66
    if (DB::isError($resultat)) {
67
       	die ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ;
67
       	die ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ;
68
    }
68
    }
69
    if ($resultat->numRows()>0) {
69
    if ($resultat->numRows()>0) {
70
       	while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
70
       	while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
71
        	//valeurs par defaut enregistrees dans la table
71
        	//valeurs par defaut enregistrees dans la table
72
        	$titre=$ligne['cc_titre_carto'];
72
        	$titre=$ligne['cc_titre_carto'];
73
        	$nom_table1=$ligne['cc_table1'];
73
        	$nom_table1=$ligne['cc_table1'];
74
        	$nom_table2=$ligne['cc_table2'];
74
        	$nom_table2=$ligne['cc_table2'];
75
        	$nom_champs_pays=$ligne['cc_pays'];
75
        	$nom_champs_pays=$ligne['cc_pays'];
76
        	$nom_champs_cp=$ligne['cc_cp'];
76
        	$nom_champs_cp=$ligne['cc_cp'];
77
        	$requete_sql=$ligne['cc_sql'];
77
        	$requete_sql=$ligne['cc_sql'];
78
        }
78
        }
79
    	//on affiche les infos lorsqu'on regarde une fiche
79
    	//on affiche les infos lorsqu'on regarde une fiche
80
    	if ( isset($_GET['voir_fiche']) or isset($_GET['voir_abonnement']) or isset($_GET['voir_actus']) or isset($_GET['voir_ressources']) or isset($_GET['voir_competences']) ) {
80
    	if ( isset($_GET['voir_fiche']) or isset($_GET['voir_abonnement']) or isset($_GET['voir_actus']) or isset($_GET['voir_ressources']) or isset($_GET['voir_competences']) ) {
81
    		$res = affiche_onglet_info();
81
    		$res = affiche_onglet_info();
82
    	} else {        
82
    	} else {        
83
		//=================================================================================================
83
		//=================================================================================================
84
		$requete_01 = 'SELECT CP_ID_Continent,count(cp_id_continent) AS nbr'.
84
		$requete_01 = 'SELECT CP_ID_Continent,count(cp_id_continent) AS nbr'.
85
		    		  ' FROM '.$nom_table1.', carto_PAYS';
85
		    		  ' FROM '.$nom_table1.', carto_PAYS';
86
		if ($nom_table2!=0) $requete_01 .=  ', '.$nom_table2;     
86
		if ($nom_table2!=0) $requete_01 .=  ', '.$nom_table2;     
87
		$requete_01 .= ' WHERE '.$nom_champs_pays.' = cp_id_pays';
87
		$requete_01 .= ' WHERE '.$nom_champs_pays.' = cp_id_pays';
88
		if ($requete_sql!='') $requete_01 .=  ' AND ('.$requete_sql.')';
88
		if ($requete_sql!='') $requete_01 .=  ' AND ('.$requete_sql.')';
89
		$requete_01 .= ' GROUP BY cp_id_continent';
89
		$requete_01 .= ' GROUP BY cp_id_continent';
90
		$resultat_01 = $GLOBALS['ins_db']->query($requete_01) ;
90
		$resultat_01 = $GLOBALS['ins_db']->query($requete_01) ;
91
		if (DB::isError($resultat_01)) {
91
		if (DB::isError($resultat_01)) {
92
		    die ($resultat_01->getMessage().'<br />'.$resultat_01->getDebugInfo()) ;
92
		    die ($resultat_01->getMessage().'<br />'.$resultat_01->getDebugInfo()) ;
93
		}    
93
		}    
94
		$tableau_ad_continent=array();    
94
		$tableau_ad_continent=array();    
95
		while ($ligne_01 = $resultat_01->fetchRow(DB_FETCHMODE_OBJECT)) {
95
		while ($ligne_01 = $resultat_01->fetchRow(DB_FETCHMODE_OBJECT)) {
96
		    $tableau_ad_continent[$ligne_01->CP_ID_Continent] = $ligne_01->nbr; 
96
		    $tableau_ad_continent[$ligne_01->CP_ID_Continent] = $ligne_01->nbr; 
97
		
97
		
98
		}
98
		}
99
		$info_continent['nom_table_zone'] = 'carto_CONTINENT';
99
		$info_continent['nom_table_zone'] = 'carto_CONTINENT';
100
		$info_continent['nom_chp_id_zone'] = 'CC_ID_Continent';
100
		$info_continent['nom_chp_id_zone'] = 'CC_ID_Continent';
101
		$info_continent['nom_chp_nom_zone'] = 'CC_Intitule_continent';
101
		$info_continent['nom_chp_nom_zone'] = 'CC_Intitule_continent';
102
		$info_continent['nom_chp_rouge'] = 'CC_Couleur_R';
102
		$info_continent['nom_chp_rouge'] = 'CC_Couleur_R';
103
		$info_continent['nom_chp_vert'] = 'CC_Couleur_V';
103
		$info_continent['nom_chp_vert'] = 'CC_Couleur_V';
104
		$info_continent['nom_chp_bleu'] = 'CC_Couleur_B';
104
		$info_continent['nom_chp_bleu'] = 'CC_Couleur_B';
105
		$info_continent['nom_chp_zone_sup'] = '';
105
		$info_continent['nom_chp_zone_sup'] = '';
106
		$info_continent['tableau_valeurs_zone'] = $tableau_ad_continent;
106
		$info_continent['tableau_valeurs_zone'] = $tableau_ad_continent;
107
		
107
		
108
		//============================================================================================================
108
		//============================================================================================================
109
		
109
		
110
		$requete_02 = 'SELECT CC_ID_Continent FROM carto_CONTINENT';
110
		$requete_02 = 'SELECT CC_ID_Continent FROM carto_CONTINENT';
111
		
111
		
112
		$resultat_02 = $GLOBALS['ins_db']->query($requete_02) ;
112
		$resultat_02 = $GLOBALS['ins_db']->query($requete_02) ;
113
		if (DB::isError($resultat_02)) {
113
		if (DB::isError($resultat_02)) {
114
		    die ($resultat_02->getMessage().'<br />'.$resultat_02->getDebugInfo()) ;
114
		    die ($resultat_02->getMessage().'<br />'.$resultat_02->getDebugInfo()) ;
115
		}
115
		}
116
		
116
		
117
		while ($ligne_02 = $resultat_02->fetchRow(DB_FETCHMODE_OBJECT)) {
117
		while ($ligne_02 = $resultat_02->fetchRow(DB_FETCHMODE_OBJECT)) {
118
		    $requete_03 = 'SELECT CP_ID_Pays, count(cp_id_pays) as nbr '.
118
		    $requete_03 = 'SELECT CP_ID_Pays, count(cp_id_pays) as nbr '.
119
		                  ' FROM '.$nom_table1.', carto_PAYS';
119
		                  ' FROM '.$nom_table1.', carto_PAYS';
120
		    if ($nom_table2!=0) $requete_03 .=  ', '.$nom_table2;
120
		    if ($nom_table2!=0) $requete_03 .=  ', '.$nom_table2;
121
		    $requete_03 .= ' WHERE '.$nom_champs_pays.'= cp_id_pays';
121
		    $requete_03 .= ' WHERE '.$nom_champs_pays.'= cp_id_pays';
122
		    if ($requete_sql!='') $requete_03 .=  ' AND ('.$requete_sql.')';
122
		    if ($requete_sql!='') $requete_03 .=  ' AND ('.$requete_sql.')';
123
		    $requete_03 .= ' AND cp_id_continent = "'.$ligne_02->CC_ID_Continent.'"'.
123
		    $requete_03 .= ' AND cp_id_continent = "'.$ligne_02->CC_ID_Continent.'"'.
124
		                   ' GROUP BY cp_id_pays';
124
		                   ' GROUP BY cp_id_pays';
125
		    $resultat_03 = $GLOBALS['ins_db']->query($requete_03) ;
125
		    $resultat_03 = $GLOBALS['ins_db']->query($requete_03) ;
126
		    if (DB::isError($resultat_03)) {
126
		    if (DB::isError($resultat_03)) {
127
		        die ($resultat_03->getMessage().'<br />'.$resultat_03->getDebugInfo()) ;
127
		        die ($resultat_03->getMessage().'<br />'.$resultat_03->getDebugInfo()) ;
128
		    }
128
		    }
129
		    
129
		    
130
		    $tableau_ad_pays = array();
130
		    $tableau_ad_pays = array();
131
		    while ($ligne_03 = $resultat_03->fetchRow(DB_FETCHMODE_OBJECT)) {
131
		    while ($ligne_03 = $resultat_03->fetchRow(DB_FETCHMODE_OBJECT)) {
132
		        $tableau_ad_pays[$ligne_03->CP_ID_Pays] = $ligne_03->nbr; 
132
		        $tableau_ad_pays[$ligne_03->CP_ID_Pays] = $ligne_03->nbr; 
133
		    }
133
		    }
134
		    
134
		    
135
		    $info_pays[$ligne_02->CC_ID_Continent]['nom_table_zone'] = 'carto_PAYS';
135
		    $info_pays[$ligne_02->CC_ID_Continent]['nom_table_zone'] = 'carto_PAYS';
136
		    $info_pays[$ligne_02->CC_ID_Continent]['nom_chp_id_zone'] = 'CP_ID_Pays';
136
		    $info_pays[$ligne_02->CC_ID_Continent]['nom_chp_id_zone'] = 'CP_ID_Pays';
137
		    $info_pays[$ligne_02->CC_ID_Continent]['nom_chp_nom_zone'] = 'CP_Intitule_pays';
137
		    $info_pays[$ligne_02->CC_ID_Continent]['nom_chp_nom_zone'] = 'CP_Intitule_pays';
138
		    $info_pays[$ligne_02->CC_ID_Continent]['nom_chp_rouge'] = 'CP_Couleur_R';
138
		    $info_pays[$ligne_02->CC_ID_Continent]['nom_chp_rouge'] = 'CP_Couleur_R';
139
		    $info_pays[$ligne_02->CC_ID_Continent]['nom_chp_vert'] = 'CP_Couleur_V';
139
		    $info_pays[$ligne_02->CC_ID_Continent]['nom_chp_vert'] = 'CP_Couleur_V';
140
		    $info_pays[$ligne_02->CC_ID_Continent]['nom_chp_bleu'] = 'CP_Couleur_B';
140
		    $info_pays[$ligne_02->CC_ID_Continent]['nom_chp_bleu'] = 'CP_Couleur_B';
141
		    $info_pays[$ligne_02->CC_ID_Continent]['nom_chp_zone_sup'] = 'CP_ID_Continent';
141
		    $info_pays[$ligne_02->CC_ID_Continent]['nom_chp_zone_sup'] = 'CP_ID_Continent';
142
		    $info_pays[$ligne_02->CC_ID_Continent]['tableau_valeurs_zone'] = $tableau_ad_pays;
142
		    $info_pays[$ligne_02->CC_ID_Continent]['tableau_valeurs_zone'] = $tableau_ad_pays;
143
		}
143
		}
144
		//============================================================================================================
144
		//============================================================================================================
145
			//if (!isset($_POST['historique_cartes']) && INS_ECHELLE_DEPART!='france') {
145
			//if (!isset($_POST['historique_cartes']) && INS_ECHELLE_DEPART!='france') {
146
				$requete_04 = 'SELECT CD_ID_Departement, count(cd_id_departement) as nbr'.
146
				$requete_04 = 'SELECT CD_ID_Departement, count(cd_id_departement) as nbr'.
147
		    	    	      ' FROM '.$nom_table1.', carto_DEPARTEMENT'.
147
		    	    	      ' FROM '.$nom_table1.', carto_DEPARTEMENT'.
148
		        			  ' WHERE '.$nom_champs_pays.' = "fr"'.
148
		        			  ' WHERE '.$nom_champs_pays.' = "fr"'.
149
							  ' AND SUBSTRING('.$nom_champs_cp.' FROM 1 FOR 2) = cd_id_Departement'.
149
							  ' AND SUBSTRING('.$nom_champs_cp.' FROM 1 FOR 2) = cd_id_Departement'.
150
		        			  ' GROUP BY cd_id_Departement';
150
		        			  ' GROUP BY cd_id_Departement';
151
		    	$resultat_04 = $GLOBALS['ins_db']->query ($requete_04) ;
151
		    	$resultat_04 = $GLOBALS['ins_db']->query ($requete_04) ;
152
		    	$tableau_ad_dpt_france = array();
152
		    	$tableau_ad_dpt_france = array();
153
		    	while ($ligne_04 = $resultat_04->fetchRow(DB_FETCHMODE_OBJECT)) {
153
		    	while ($ligne_04 = $resultat_04->fetchRow(DB_FETCHMODE_OBJECT)) {
154
		    		$tableau_ad_dpt_france[$ligne_04->CD_ID_Departement] = $ligne_04->nbr;
154
		    		$tableau_ad_dpt_france[$ligne_04->CD_ID_Departement] = $ligne_04->nbr;
155
		    	}
155
		    	}
156
		    	$info_dpt_france['nom_table_zone'] = 'carto_DEPARTEMENT';
156
		    	$info_dpt_france['nom_table_zone'] = 'carto_DEPARTEMENT';
157
		    	$info_dpt_france['nom_chp_id_zone'] = 'CD_ID_Departement';
157
		    	$info_dpt_france['nom_chp_id_zone'] = 'CD_ID_Departement';
158
		    	$info_dpt_france['nom_chp_nom_zone'] = 'CD_Intitule_departement';
158
		    	$info_dpt_france['nom_chp_nom_zone'] = 'CD_Intitule_departement';
159
		    	$info_dpt_france['nom_chp_rouge'] = 'CD_Couleur_R';
159
		    	$info_dpt_france['nom_chp_rouge'] = 'CD_Couleur_R';
160
		    	$info_dpt_france['nom_chp_vert'] = 'CD_Couleur_V';
160
		    	$info_dpt_france['nom_chp_vert'] = 'CD_Couleur_V';
161
		    	$info_dpt_france['nom_chp_bleu'] = 'CD_Couleur_B';
161
		    	$info_dpt_france['nom_chp_bleu'] = 'CD_Couleur_B';
162
		    	$info_dpt_france['nom_chp_zone_sup'] = 'CD_ID_Pays';
162
		    	$info_dpt_france['nom_chp_zone_sup'] = 'CD_ID_Pays';
163
		    	$info_dpt_france['tableau_valeurs_zone'] = $tableau_ad_dpt_france;
163
		    	$info_dpt_france['tableau_valeurs_zone'] = $tableau_ad_dpt_france;
164
		    //}    
164
		    //}    
165
		
165
		
166
		//============================================================================================================
166
		//============================================================================================================
167
		
167
		
168
		
168
		
169
		//============================================================================================================
169
		//============================================================================================================
170
		// On cree tout d'abord l'arborescence
170
		// On cree tout d'abord l'arborescence
171
		
171
		
172
		$monde = new Carto_Carte('continent', '', 'Monde', 'monde_masque5c.png', 'monde5c.png', INS_CHEMIN_APPLI.'presentations/fonds/', $info_continent);    
172
		$monde = new Carto_Carte('continent', '', 'Monde', 'monde_masque5c.png', 'monde5c.png', INS_CHEMIN_APPLI.'presentations/fonds/', $info_continent);    
173
		$monde->definirCouleurs('255', '255', '255','255', '250', '130','255', '204', '0','255', '153', '0') ;    
173
		$monde->definirCouleurs('255', '255', '255','255', '250', '130','255', '204', '0','255', '153', '0') ;    
174
		if (isset($_POST['historique_cartes'])) {
174
		if (isset($_POST['historique_cartes'])) {
175
			$monde->historique_cartes = $_POST['historique_cartes'];
175
			$monde->historique_cartes = $_POST['historique_cartes'];
176
		} else {
176
		} else {
177
			$monde->historique_cartes = INS_ECHELLE_DEPART;
177
			$monde->historique_cartes = INS_ECHELLE_DEPART;
178
		}
178
		}
179
		$monde->image_x = $image_x;
179
		$monde->image_x = $image_x;
180
		$monde->image_y = $image_y;
180
		$monde->image_y = $image_y;
181
		$monde->liste_zone_carte = $liste_zone_carte;
181
		$monde->liste_zone_carte = $liste_zone_carte;
182
		$monde->url = $GLOBALS['ins_url']->getURL();
182
		$monde->url = $GLOBALS['ins_url']->getURL();
183
		
183
		
184
		foreach ($info_pays as $cle => $valeur) {
184
		foreach ($info_pays as $cle => $valeur) {
185
		    $requete_05 = 
185
		    $requete_05 = 
186
		        "SELECT CDC_Titre_carte, CDC_ID_Carte, CDC_Carte_fond, CDC_Carte_masque, CDC_ID_Zone_geo_carte".
186
		        "SELECT CDC_Titre_carte, CDC_ID_Carte, CDC_Carte_fond, CDC_Carte_masque, CDC_ID_Zone_geo_carte".
187
		        " FROM carto_DESCRIPTION_CARTE, carto_ACTION ".
187
		        " FROM carto_DESCRIPTION_CARTE, carto_ACTION ".
188
		        " WHERE CA_ID_Zone_geo = '$cle'".
188
		        " WHERE CA_ID_Zone_geo = '$cle'".
189
		        " AND CA_Type_zone = 1".
189
		        " AND CA_Type_zone = 1".
190
		        " AND CA_ID_Carte_destination = CDC_ID_Carte";
190
		        " AND CA_ID_Carte_destination = CDC_ID_Carte";
191
		    
191
		    
192
		    $resultat_05 = $GLOBALS['ins_db']->query ($requete_05) ;
192
		    $resultat_05 = $GLOBALS['ins_db']->query ($requete_05) ;
193
		    if (DB::isError($resultat_05)) {
193
		    if (DB::isError($resultat_05)) {
194
		        die ($resultat_05->getMessage().'<br />'.$resultat_05->getDebugInfo()) ;
194
		        die ($resultat_05->getMessage().'<br />'.$resultat_05->getDebugInfo()) ;
195
		    }        
195
		    }        
196
		    $ligne_05 = $resultat_05->fetchRow(DB_FETCHMODE_OBJECT);        
196
		    $ligne_05 = $resultat_05->fetchRow(DB_FETCHMODE_OBJECT);        
197
		    $monde->ajouterFils($ligne_05->CDC_ID_Carte, $ligne_05->CDC_ID_Zone_geo_carte, $ligne_05->CDC_Titre_carte, 
197
		    $monde->ajouterFils($ligne_05->CDC_ID_Carte, $ligne_05->CDC_ID_Zone_geo_carte, $ligne_05->CDC_Titre_carte, 
198
		                                    $ligne_05->CDC_Carte_masque, $ligne_05->CDC_Carte_fond, $valeur);
198
		                                    $ligne_05->CDC_Carte_masque, $ligne_05->CDC_Carte_fond, $valeur);
199
		    $monde->fils[$ligne_05->CDC_ID_Carte]->definirCouleurs ('255', '255', '255','255', '250', '130','255', '204', '0','255', '153', '0') ;
199
		    $monde->fils[$ligne_05->CDC_ID_Carte]->definirCouleurs ('255', '255', '255','255', '250', '130','255', '204', '0','255', '153', '0') ;
200
		}
200
		}
201
		
201
		
202
		$monde->fils['europe']->ajouterFils('france', 'fr', 'France' ,'france_masque.png', 'france.png', $info_dpt_france);
202
		$monde->fils['europe']->ajouterFils('france', 'fr', 'France' ,'france_masque.png', 'france.png', $info_dpt_france);
203
		$monde->fils['europe']->fils['france']->definirCouleurs ('255', '255', '255','255', '250', '130','255', '204', '0','255', '153', '0') ;
203
		$monde->fils['europe']->fils['france']->definirCouleurs ('255', '255', '255','255', '250', '130','255', '204', '0','255', '153', '0') ;
204
		
204
		
205
		// Une fois l'arborescence créée on lance la methode donnerFormulaireImage() pour recuperer la carte
205
		// Une fois l'arborescence créée on lance la methode donnerFormulaireImage() pour recuperer la carte
206
		// (dans $img). S'il n'y a pas de carte a afficher donnerFormulaireImage() renvoi false. On peut alors recuperer
206
		// (dans $img). S'il n'y a pas de carte a afficher donnerFormulaireImage() renvoi false. On peut alors recuperer
207
		// le niveau ou on en est grace a $monde->historique (du type continent*namerique*ca).
207
		// le niveau ou on en est grace a $monde->historique (du type continent*namerique*ca).
208
		    
208
		    
209
		$img = false;
209
		$img = false;
210
		if ($mailer == 1 || $fin == true) {
210
		if ($mailer == 1 || $fin == true) {
211
		    $objet_carte = $_SESSION['carte'] ;
211
		    $objet_carte = $_SESSION['carte'] ;
212
		    $monde = unserialize($objet_carte);}
212
		    $monde = unserialize($objet_carte);}
213
		else {
213
		else {
214
		    $img = $monde->donnerFormulaireImage();
214
		    $img = $monde->donnerFormulaireImage();
215
		}
215
		}
216
		       
216
		       
217
		// Quoi qu'il arrive, on ouvre la balise formulaire
217
		// Quoi qu'il arrive, on ouvre la balise formulaire
218
		if ($titre!='') $res = '<h1>'.$titre.'</h1>'."\n";
218
		if ($titre!='') $res = '<h1>'.$titre.'</h1>'."\n";
219
		else $res = '<h1>'.INS_CARTOGRAPHIE.'</h1>'."\n";
219
		else $res = '<h1>'.INS_CARTOGRAPHIE.'</h1>'."\n";
220
		$res .= '<form name="formmail" action="'.$monde->url.'" method="post">'."\n";
220
		$res .= '<form name="formmail" action="'.$monde->url.'" method="post">'."\n";
221
		if ((INS_AFFICHE_ECHELLE)and($img)) {
221
		if ((INS_AFFICHE_ECHELLE)and($img)) {
222
		   	$historique_carte = new Carto_HistoriqueCarte ($monde, '&gt;', 'chemin_carto');
222
		   	$historique_carte = new Carto_HistoriqueCarte ($monde, '&gt;', 'chemin_carto');
223
		   	$res .= $historique_carte->afficherHistoriqueCarte()."\n" ;
223
		   	$res .= $historique_carte->afficherHistoriqueCarte()."\n" ;
224
		}
224
		}
225
		if (!$img ) {
225
		if (!$img ) {
226
			//include 'bibliotheque/cartographie.fonct.liste_inscrit.php';
226
			//include 'bibliotheque/cartographie.fonct.liste_inscrit.php';
227
		    $res .= carto_liste_fiches($monde, $nom_table1, $nom_table2, $nom_champs_pays, $nom_champs_cp, $requete_sql);
227
		    $res .= carto_liste_fiches($monde, $nom_table1, $nom_table2, $nom_champs_pays, $nom_champs_cp, $requete_sql);
228
		    return $res;
228
		    return $res;
229
		} else {
229
		} else {
230
			$res .= $img;
230
			$res .= $img;
231
		    $res .= '<p class="zone_info">'."\n";
231
		    $res .= '<p class="zone_info">'."\n";
232
			$res .= '<strong>'.INS_CLIQUER_ACCEDER.'</strong><br />'."\n";
232
			$res .= '<strong>'.INS_CLIQUER_ACCEDER.'</strong><br />'."\n";
233
		    $res .= INS_COULEUR."\n".'</p>'."\n";                
233
		    $res .= INS_COULEUR."\n".'</p>'."\n";                
234
		}
234
		}
235
		$res .= '</form>'."\n";
235
		$res .= '</form>'."\n";
236
    }
236
    }
237
    return $res;
237
    return $res;
238
    
238
    
239
//----------------------------------------------------------------------------------------------------------------------
239
//----------------------------------------------------------------------------------------------------------------------
240
// Cas ou la carto n'a pas encore ete configuree        
240
// Cas ou la carto n'a pas encore ete configuree        
241
    } else {
241
    } else {
242
    	return '<p class="zone_alert">'.INS_FAUT_CONFIGURER_CARTO.'</p>'."\n";
242
    	return '<p class="zone_alert">'.INS_FAUT_CONFIGURER_CARTO.'</p>'."\n";
243
    }
243
    }
244
}
244
}
245
 
245
 
246
 
246
 
247
//-- Fin du code source    ------------------------------------------------------------
247
//-- Fin du code source    ------------------------------------------------------------
248
/*
248
/*
249
* $Log: not supported by cvs2svn $
249
* $Log: not supported by cvs2svn $
-
 
250
* Revision 1.4  2006/04/10 14:01:36  florian
-
 
251
* uniformisation de l'appli bottin: plus qu'un fichier de fonctions
-
 
252
*
250
* Revision 1.3  2006/04/04 12:23:05  florian
253
* Revision 1.3  2006/04/04 12:23:05  florian
251
* modifs affichage fiches, généricité de la carto, modification totale de l'appli annuaire
254
* modifs affichage fiches, généricité de la carto, modification totale de l'appli annuaire
252
*
255
*
253
* Revision 1.2  2005/11/24 16:17:52  florian
256
* Revision 1.2  2005/11/24 16:17:52  florian
254
* changement template inscription + modifs carto
257
* changement template inscription + modifs carto
255
*
258
*
256
* Revision 1.1  2005/09/22 14:02:49  ddelon
259
* Revision 1.1  2005/09/22 14:02:49  ddelon
257
* nettoyage annuaire et php5
260
* nettoyage annuaire et php5
258
*
261
*
259
* Revision 1.2  2005/09/22 13:30:49  florian
262
* Revision 1.2  2005/09/22 13:30:49  florian
260
* modifs pour compatibilité XHTML Strict + corrections de bugs (mais ya encore du boulot!!)
263
* modifs pour compatibilité XHTML Strict + corrections de bugs (mais ya encore du boulot!!)
261
*
264
*
262
* Revision 1.1  2004/12/15 13:33:03  alex
265
* Revision 1.1  2004/12/15 13:33:03  alex
263
* version initiale
266
* version initiale
264
*
267
*
265
* Revision 1.2  2004/06/18 08:48:03  alex
268
* Revision 1.2  2004/06/18 08:48:03  alex
266
* améliorations diverses
269
* améliorations diverses
267
*
270
*
268
* Revision 1.1  2004/06/09 13:56:47  alex
271
* Revision 1.1  2004/06/09 13:56:47  alex
269
* corrections diverses
272
* corrections diverses
270
*
273
*
271
* Revision 1.9  2003/05/06 12:49:27  alex
274
* Revision 1.9  2003/05/06 12:49:27  alex
272
* remplacement include par include_once
275
* remplacement include par include_once
273
*
276
*
274
* Revision 1.8  2003/03/07 15:20:32  jpm
277
* Revision 1.8  2003/03/07 15:20:32  jpm
275
* Correction d'une erreur de texte.
278
* Correction d'une erreur de texte.
276
*
279
*
277
* Revision 1.7  2003/02/28 08:43:33  jpm
280
* Revision 1.7  2003/02/28 08:43:33  jpm
278
* Gestion des nouvelles tables MySql carto.
281
* Gestion des nouvelles tables MySql carto.
279
*
282
*
280
* Revision 1.6  2003/02/21 13:50:19  jpm
283
* Revision 1.6  2003/02/21 13:50:19  jpm
281
* Mise à jour nouvel objet Carto_Carte.
284
* Mise à jour nouvel objet Carto_Carte.
282
*
285
*
283
* Revision 1.5  2003/02/17 14:33:52  jpm
286
* Revision 1.5  2003/02/17 14:33:52  jpm
284
* Modification pour être compatible avec la nouvelle classe carte.
287
* Modification pour être compatible avec la nouvelle classe carte.
285
*
288
*
286
*
289
*
287
*/
290
*/
288
?>
291
?>