Line 24... |
Line 24... |
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.5 2006-04-19 13:49:04 alexandre_tb Exp $
|
29 |
// $Id: cartographie.php,v 1.6 2006-12-01 13:23:17 florian Exp $
|
30 |
// FICHIER : $RCSfile: cartographie.php,v $
|
30 |
// FICHIER : $RCSfile: cartographie.php,v $
|
31 |
// AUTEUR : $Author: alexandre_tb $
|
31 |
// AUTEUR : $Author: florian $
|
32 |
// VERSION : $Revision: 1.5 $
|
32 |
// VERSION : $Revision: 1.6 $
|
33 |
// DATE : $Date: 2006-04-19 13:49:04 $
|
33 |
// DATE : $Date: 2006-12-01 13:23:17 $
|
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';
|
Line 45... |
Line 45... |
45 |
return $res ;
|
45 |
return $res ;
|
46 |
}
|
46 |
}
|
47 |
}
|
47 |
}
|
Line 48... |
Line 48... |
48 |
|
48 |
|
- |
|
49 |
//================================================================================================
|
- |
|
50 |
function construit_hierarchie(&$info_zone, &$carto_config, $info_zone_hierarchie, &$monde) {
|
- |
|
51 |
static $i=0;
|
- |
|
52 |
$i++;
|
- |
|
53 |
|
- |
|
54 |
//on ajoute la carto en cours en tant que fils
|
- |
|
55 |
$monde->ajouterFils($info_zone_hierarchie->czh_code_alpha, $info_zone_hierarchie->czh_identifiant_table_info_couleur,
|
- |
|
56 |
$info_zone_hierarchie->czh_nom, $info_zone_hierarchie->czh_fichier_masque,
|
- |
|
57 |
$info_zone_hierarchie->czh_fichier_image, '');
|
- |
|
58 |
$monde->fils[$info_zone_hierarchie->czh_code_alpha]->definirCouleurs ('255', '255', '255','255', '250', '130','255', '204', '0','255', '153', '0') ;
|
- |
|
59 |
|
- |
|
60 |
//requete pour trouver les fils de la carte de depart voulue
|
- |
|
61 |
$requete_zone_fils = 'SELECT * FROM carto_zone_hierarchie '.
|
- |
|
62 |
'WHERE czh_id_zone_pere='.$info_zone_hierarchie->czh_id_zone;/*echo $requete_zone_fils;*/
|
- |
|
63 |
$resultat_zone_fils = $GLOBALS['ins_db']->query($requete_zone_fils) ;
|
- |
|
64 |
if (DB::isError($resultat_zone_fils )) {
|
- |
|
65 |
echo ($resultat_zone_fils->getMessage().'<br />'.$resultat_zone_fils->getDebugInfo()).'<br />'.$requete_zone_fils ;
|
- |
|
66 |
}
|
- |
|
67 |
|
- |
|
68 |
if ($resultat_zone_fils->numRows()!=0) {
|
- |
|
69 |
while ($ligne_zone_fils = $resultat_zone_fils ->fetchRow(DB_FETCHMODE_OBJECT)) {
|
- |
|
70 |
//requete pour obtenir toutes les infos (repartition par zones, nom des tables et champs pour les couleurs,.. ) pour la carte à afficher
|
- |
|
71 |
$requete_01 = 'SELECT '.$ligne_zone_fils->czh_nom_champs_id_pere.',count('.$ligne_zone_fils->czh_nom_champs_id_pere.') AS nbr'.
|
- |
|
72 |
' FROM '.$carto_config['cc_table1'].', '.$ligne_zone_fils->czh_nom_table_info_couleur;
|
- |
|
73 |
if ($carto_config['cc_table2']!=0) $requete_01 .= ', '.$carto_config['cc_table2'];
|
- |
|
74 |
$requete_01 .= ' WHERE '.$ligne_zone_fils->czh_champs_jointure_annuaire.' = '.$ligne_zone_fils->czh_nom_champs_id;
|
- |
|
75 |
if ($carto_config['cc_sql']!='') $requete_01 .= ' AND ('.$carto_config['cc_sql'].')';
|
- |
|
76 |
$requete_01 .= ' GROUP BY '.$ligne_zone_fils->czh_nom_champs_id_pere;
|
- |
|
77 |
$resultat_01 = $GLOBALS['ins_db']->query($requete_01) ;
|
- |
|
78 |
if (DB::isError($resultat_01)) {
|
- |
|
79 |
echo ($resultat_01->getMessage().'<br />'.$resultat_01->getDebugInfo()).'<br />'.$requete_01 ;
|
- |
|
80 |
}
|
- |
|
81 |
$tableau_repartition=array();
|
- |
|
82 |
while ($ligne_01 = $resultat_01->fetchRow(DB_FETCHMODE_OBJECT)) {
|
- |
|
83 |
$id=$ligne_zone_fils->czh_nom_champs_id_pere;
|
- |
|
84 |
$tableau_repartition[$ligne_01->$id] = $ligne_01->nbr;
|
- |
|
85 |
}
|
- |
|
86 |
$info_zone[$i]['nom_table_zone'] =$info_zone_hierarchie->czh_nom_table_info_couleur;
|
- |
|
87 |
$info_zone[$i]['nom_chp_id_zone'] =$info_zone_hierarchie->czh_nom_champs_id;
|
- |
|
88 |
$info_zone[$i]['nom_chp_nom_zone'] =$info_zone_hierarchie->czh_nom_champs_intitule;
|
- |
|
89 |
$info_zone[$i]['nom_chp_rouge'] =$info_zone_hierarchie->czh_nom_champs_couleur_R;
|
- |
|
90 |
$info_zone[$i]['nom_chp_vert'] =$info_zone_hierarchie->czh_nom_champs_couleur_V;
|
- |
|
91 |
$info_zone[$i]['nom_chp_bleu'] =$info_zone_hierarchie->czh_nom_champs_couleur_B;
|
- |
|
92 |
$info_zone[$i]['nom_chp_zone_sup'] =$info_zone_hierarchie->czh_nom_champs_id_pere;
|
- |
|
93 |
$info_zone[$i]['tableau_valeurs_zone'] = $tableau_repartition;
|
- |
|
94 |
if ($i == 1) {
|
- |
|
95 |
$monde->_info_table_zg = $info_zone[1];
|
- |
|
96 |
$monde->definirCouleurs('255', '255', '255','255', '250', '130','255', '204', '0','255', '153', '0') ;
|
- |
|
97 |
construit_hierarchie($info_zone, $carto_config, $ligne_zone_fils, $monde);
|
- |
|
98 |
} else {
|
- |
|
99 |
$monde->_info_table_zg = $info_zone[$i];
|
- |
|
100 |
construit_hierarchie($info_zone, $carto_config, $ligne_zone_fils, $monde->fils[$info_zone_hierarchie->czh_code_alpha]);
|
- |
|
101 |
}
|
- |
|
102 |
}
|
- |
|
103 |
}
|
Line 49... |
Line 104... |
49 |
//================================================================================================
|
104 |
}
|
50 |
|
- |
|
51 |
function afficherContenuCorps()
|
105 |
|
52 |
{
|
106 |
function afficherContenuCorps() {
|
53 |
global $image_x;
|
107 |
global $image_x;
|
54 |
global $image_y;
|
108 |
global $image_y;
|
55 |
global $historique_cartes;
|
109 |
global $historique_cartes;
|
Line 65... |
Line 119... |
65 |
$resultat = $GLOBALS['ins_db']->query($requete) ;
|
119 |
$resultat = $GLOBALS['ins_db']->query($requete) ;
|
66 |
if (DB::isError($resultat)) {
|
120 |
if (DB::isError($resultat)) {
|
67 |
die ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ;
|
121 |
die ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ;
|
68 |
}
|
122 |
}
|
69 |
if ($resultat->numRows()>0) {
|
123 |
if ($resultat->numRows()>0) {
|
70 |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
|
124 |
$carto_config = $resultat->fetchRow(DB_FETCHMODE_ASSOC);
|
71 |
//valeurs par defaut enregistrees dans la table
|
- |
|
72 |
$titre=$ligne['cc_titre_carto'];
|
- |
|
73 |
$nom_table1=$ligne['cc_table1'];
|
- |
|
74 |
$nom_table2=$ligne['cc_table2'];
|
- |
|
75 |
$nom_champs_pays=$ligne['cc_pays'];
|
- |
|
76 |
$nom_champs_cp=$ligne['cc_cp'];
|
- |
|
77 |
$requete_sql=$ligne['cc_sql'];
|
- |
|
78 |
}
|
125 |
|
79 |
//on affiche les infos lorsqu'on regarde une fiche
|
126 |
//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']) ) {
|
127 |
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();
|
128 |
$res = affiche_onglet_info();
|
82 |
} else {
|
129 |
} else {
|
83 |
//=================================================================================================
|
- |
|
84 |
$requete_01 = 'SELECT CP_ID_Continent,count(cp_id_continent) AS nbr'.
|
130 |
//requete pour afficher la carte de depart voulue dans la conf.
|
85 |
' FROM '.$nom_table1.', carto_PAYS';
|
- |
|
86 |
if ($nom_table2!=0) $requete_01 .= ', '.$nom_table2;
|
- |
|
87 |
$requete_01 .= ' WHERE '.$nom_champs_pays.' = cp_id_pays';
|
131 |
$requete_zone_hierarchie = 'SELECT * FROM carto_zone_hierarchie WHERE czh_id_zone='.$carto_config['cc_ce_premiere_carte'];
|
88 |
if ($requete_sql!='') $requete_01 .= ' AND ('.$requete_sql.')';
|
- |
|
89 |
$requete_01 .= ' GROUP BY cp_id_continent';
|
- |
|
90 |
$resultat_01 = $GLOBALS['ins_db']->query($requete_01) ;
|
132 |
$resultat_zone_hierarchie = $GLOBALS['ins_db']->query($requete_zone_hierarchie) ;
|
91 |
if (DB::isError($resultat_01)) {
|
133 |
if (DB::isError($resultat_zone_hierarchie )) {
|
92 |
die ($resultat_01->getMessage().'<br />'.$resultat_01->getDebugInfo()) ;
|
134 |
echo ($resultat_zone_hierarchie->getMessage().'<br />'.$resultat_zone_hierarchie->getDebugInfo()) ;
|
93 |
}
|
135 |
}
|
94 |
$tableau_ad_continent=array();
|
- |
|
95 |
while ($ligne_01 = $resultat_01->fetchRow(DB_FETCHMODE_OBJECT)) {
|
136 |
$ligne_zone_hierarchie = $resultat_zone_hierarchie ->fetchRow(DB_FETCHMODE_OBJECT);
|
96 |
$tableau_ad_continent[$ligne_01->CP_ID_Continent] = $ligne_01->nbr;
|
- |
|
97 |
|
137 |
|
98 |
}
|
- |
|
99 |
$info_continent['nom_table_zone'] = 'carto_CONTINENT';
|
138 |
//initialisation de la variable 2 dimensions, contenant les infos specifiques a chaque echelle de territoire
|
100 |
$info_continent['nom_chp_id_zone'] = 'CC_ID_Continent';
|
139 |
$info_zone= array();
|
101 |
$info_continent['nom_chp_nom_zone'] = 'CC_Intitule_continent';
|
140 |
$monde = new Carto_Carte($ligne_zone_hierarchie->czh_code_alpha, '', $ligne_zone_hierarchie->czh_nom,
|
102 |
$info_continent['nom_chp_rouge'] = 'CC_Couleur_R';
|
141 |
$ligne_zone_hierarchie->czh_fichier_masque, $ligne_zone_hierarchie->czh_fichier_image,
|
103 |
$info_continent['nom_chp_vert'] = 'CC_Couleur_V';
|
142 |
INS_CHEMIN_APPLI.'presentations/fonds/', '');
|
104 |
$info_continent['nom_chp_bleu'] = 'CC_Couleur_B';
|
143 |
construit_hierarchie($info_zone, $carto_config, $ligne_zone_hierarchie, $monde);
|
105 |
$info_continent['nom_chp_zone_sup'] = '';
|
144 |
echo '<pre>'.var_dump($monde).'</pre>';
|
106 |
$info_continent['tableau_valeurs_zone'] = $tableau_ad_continent;
|
- |
|
107 |
|
- |
|
108 |
//============================================================================================================
|
- |
|
Line -... |
Line 145... |
- |
|
145 |
|
109 |
|
146 |
//requete
|
110 |
$requete_02 = 'SELECT CC_ID_Continent FROM carto_CONTINENT';
|
- |
|
111 |
|
- |
|
112 |
$resultat_02 = $GLOBALS['ins_db']->query($requete_02) ;
|
- |
|
113 |
if (DB::isError($resultat_02)) {
|
- |
|
114 |
die ($resultat_02->getMessage().'<br />'.$resultat_02->getDebugInfo()) ;
|
147 |
// $requete_02 = 'SELECT CC_ID_Continent FROM carto_CONTINENT';
|
115 |
}
|
- |
|
116 |
|
- |
|
117 |
while ($ligne_02 = $resultat_02->fetchRow(DB_FETCHMODE_OBJECT)) {
|
- |
|
118 |
$requete_03 = 'SELECT CP_ID_Pays, count(cp_id_pays) as nbr '.
|
- |
|
119 |
' FROM '.$nom_table1.', carto_PAYS';
|
- |
|
120 |
if ($nom_table2!=0) $requete_03 .= ', '.$nom_table2;
|
- |
|
121 |
$requete_03 .= ' WHERE '.$nom_champs_pays.'= cp_id_pays';
|
- |
|
122 |
if ($requete_sql!='') $requete_03 .= ' AND ('.$requete_sql.')';
|
- |
|
123 |
$requete_03 .= ' AND cp_id_continent = "'.$ligne_02->CC_ID_Continent.'"'.
|
- |
|
124 |
' GROUP BY cp_id_pays';
|
148 |
//
|
125 |
$resultat_03 = $GLOBALS['ins_db']->query($requete_03) ;
|
149 |
// $resultat_02 = $GLOBALS['ins_db']->query($requete_02) ;
|
126 |
if (DB::isError($resultat_03)) {
|
150 |
// if (DB::isError($resultat_02)) {
|
127 |
die ($resultat_03->getMessage().'<br />'.$resultat_03->getDebugInfo()) ;
|
- |
|
128 |
}
|
- |
|
129 |
|
- |
|
130 |
$tableau_ad_pays = array();
|
- |
|
131 |
while ($ligne_03 = $resultat_03->fetchRow(DB_FETCHMODE_OBJECT)) {
|
- |
|
132 |
$tableau_ad_pays[$ligne_03->CP_ID_Pays] = $ligne_03->nbr;
|
- |
|
133 |
}
|
- |
|
134 |
|
- |
|
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';
|
- |
|
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';
|
- |
|
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';
|
- |
|
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;
|
- |
|
143 |
}
|
- |
|
144 |
//============================================================================================================
|
- |
|
145 |
//if (!isset($_POST['historique_cartes']) && INS_ECHELLE_DEPART!='france') {
|
- |
|
146 |
$requete_04 = 'SELECT CD_ID_Departement, count(cd_id_departement) as nbr'.
|
- |
|
147 |
' FROM '.$nom_table1.', carto_DEPARTEMENT'.
|
- |
|
148 |
' WHERE '.$nom_champs_pays.' = "fr"'.
|
- |
|
149 |
' AND SUBSTRING('.$nom_champs_cp.' FROM 1 FOR 2) = cd_id_Departement'.
|
- |
|
150 |
' GROUP BY cd_id_Departement';
|
- |
|
151 |
$resultat_04 = $GLOBALS['ins_db']->query ($requete_04) ;
|
- |
|
152 |
$tableau_ad_dpt_france = array();
|
- |
|
153 |
while ($ligne_04 = $resultat_04->fetchRow(DB_FETCHMODE_OBJECT)) {
|
- |
|
154 |
$tableau_ad_dpt_france[$ligne_04->CD_ID_Departement] = $ligne_04->nbr;
|
- |
|
155 |
}
|
- |
|
156 |
$info_dpt_france['nom_table_zone'] = 'carto_DEPARTEMENT';
|
- |
|
157 |
$info_dpt_france['nom_chp_id_zone'] = 'CD_ID_Departement';
|
- |
|
158 |
$info_dpt_france['nom_chp_nom_zone'] = 'CD_Intitule_departement';
|
- |
|
159 |
$info_dpt_france['nom_chp_rouge'] = 'CD_Couleur_R';
|
- |
|
160 |
$info_dpt_france['nom_chp_vert'] = 'CD_Couleur_V';
|
- |
|
161 |
$info_dpt_france['nom_chp_bleu'] = 'CD_Couleur_B';
|
- |
|
162 |
$info_dpt_france['nom_chp_zone_sup'] = 'CD_ID_Pays';
|
- |
|
163 |
$info_dpt_france['tableau_valeurs_zone'] = $tableau_ad_dpt_france;
|
151 |
// die ($resultat_02->getMessage().'<br />'.$resultat_02->getDebugInfo()) ;
|
- |
|
152 |
// }
|
- |
|
153 |
//
|
- |
|
154 |
// while ($ligne_02 = $resultat_02->fetchRow(DB_FETCHMODE_OBJECT)) {
|
- |
|
155 |
// $requete_03 = 'SELECT CP_ID_Pays, count(cp_id_pays) as nbr '.
|
- |
|
156 |
// ' FROM '.$nom_table1.', carto_PAYS';
|
- |
|
157 |
// if ($nom_table2!=0) $requete_03 .= ', '.$nom_table2;
|
- |
|
158 |
// $requete_03 .= ' WHERE '.$nom_champs_pays.'= cp_id_pays';
|
- |
|
159 |
// if ($requete_sql!='') $requete_03 .= ' AND ('.$requete_sql.')';
|
- |
|
160 |
// $requete_03 .= ' AND cp_id_continent = "'.$ligne_02->CC_ID_Continent.'"'.
|
- |
|
161 |
// ' GROUP BY cp_id_pays';
|
- |
|
162 |
// $resultat_03 = $GLOBALS['ins_db']->query($requete_03) ;
|
- |
|
163 |
// if (DB::isError($resultat_03)) {
|
- |
|
164 |
// die ($resultat_03->getMessage().'<br />'.$resultat_03->getDebugInfo()) ;
|
- |
|
165 |
// }
|
- |
|
166 |
//
|
- |
|
167 |
// $tableau_ad_pays = array();
|
- |
|
168 |
// while ($ligne_03 = $resultat_03->fetchRow(DB_FETCHMODE_OBJECT)) {
|
- |
|
169 |
// $tableau_ad_pays[$ligne_03->CP_ID_Pays] = $ligne_03->nbr;
|
- |
|
170 |
// }
|
- |
|
171 |
//
|
- |
|
172 |
// $info_pays[$ligne_02->CC_ID_Continent]['nom_table_zone'] = 'carto_PAYS';
|
- |
|
173 |
// $info_pays[$ligne_02->CC_ID_Continent]['nom_chp_id_zone'] = 'CP_ID_Pays';
|
- |
|
174 |
// $info_pays[$ligne_02->CC_ID_Continent]['nom_chp_nom_zone'] = 'CP_Intitule_pays';
|
- |
|
175 |
// $info_pays[$ligne_02->CC_ID_Continent]['nom_chp_rouge'] = 'CP_Couleur_R';
|
- |
|
176 |
// $info_pays[$ligne_02->CC_ID_Continent]['nom_chp_vert'] = 'CP_Couleur_V';
|
- |
|
177 |
// $info_pays[$ligne_02->CC_ID_Continent]['nom_chp_bleu'] = 'CP_Couleur_B';
|
- |
|
178 |
// $info_pays[$ligne_02->CC_ID_Continent]['nom_chp_zone_sup'] = 'CP_ID_Continent';
|
- |
|
179 |
// $info_pays[$ligne_02->CC_ID_Continent]['tableau_valeurs_zone'] = $tableau_ad_pays;
|
- |
|
180 |
}
|
- |
|
181 |
// //============================================================================================================
|
- |
|
182 |
// //if (!isset($_POST['historique_cartes']) && INS_ECHELLE_DEPART!='france') {
|
- |
|
183 |
// $requete_04 = 'SELECT CD_ID_Departement, count(cd_id_departement) as nbr'.
|
- |
|
184 |
// ' FROM '.$nom_table1.', carto_DEPARTEMENT'.
|
- |
|
185 |
// ' WHERE '.$nom_champs_pays.' = "fr"'.
|
- |
|
186 |
// ' AND SUBSTRING('.$nom_champs_cp.' FROM 1 FOR 2) = cd_id_Departement'.
|
- |
|
187 |
// ' GROUP BY cd_id_Departement';
|
- |
|
188 |
// $resultat_04 = $GLOBALS['ins_db']->query ($requete_04) ;
|
- |
|
189 |
// $tableau_ad_dpt_france = array();
|
- |
|
190 |
// while ($ligne_04 = $resultat_04->fetchRow(DB_FETCHMODE_OBJECT)) {
|
- |
|
191 |
// $tableau_ad_dpt_france[$ligne_04->CD_ID_Departement] = $ligne_04->nbr;
|
- |
|
192 |
// }
|
- |
|
193 |
// $info_dpt_france['nom_table_zone'] = 'carto_DEPARTEMENT';
|
- |
|
194 |
// $info_dpt_france['nom_chp_id_zone'] = 'CD_ID_Departement';
|
- |
|
195 |
// $info_dpt_france['nom_chp_nom_zone'] = 'CD_Intitule_departement';
|
- |
|
196 |
// $info_dpt_france['nom_chp_rouge'] = 'CD_Couleur_R';
|
- |
|
197 |
// $info_dpt_france['nom_chp_vert'] = 'CD_Couleur_V';
|
- |
|
198 |
// $info_dpt_france['nom_chp_bleu'] = 'CD_Couleur_B';
|
- |
|
199 |
// $info_dpt_france['nom_chp_zone_sup'] = 'CD_ID_Pays';
|
- |
|
200 |
// $info_dpt_france['tableau_valeurs_zone'] = $tableau_ad_dpt_france;
|
164 |
//}
|
201 |
// //}
|
165 |
|
202 |
//
|
Line 166... |
Line 203... |
166 |
//============================================================================================================
|
203 |
//============================================================================================================
|
167 |
|
204 |
|
168 |
|
205 |
|
169 |
//============================================================================================================
|
206 |
//============================================================================================================
|
- |
|
207 |
// On cree tout d'abord l'arborescence
|
170 |
// On cree tout d'abord l'arborescence
|
208 |
/*
|
171 |
|
209 |
$monde = new Carto_Carte('continent', '', 'Monde', 'monde_masque5c.png', 'monde5c.png',
|
172 |
$monde = new Carto_Carte('continent', '', 'Monde', 'monde_masque5c.png', 'monde5c.png', INS_CHEMIN_APPLI.'presentations/fonds/', $info_continent);
|
210 |
INS_CHEMIN_APPLI.'presentations/fonds/', $info_zone[1]);
|
173 |
$monde->definirCouleurs('255', '255', '255','255', '250', '130','255', '204', '0','255', '153', '0') ;
|
211 |
$monde->definirCouleurs('255', '255', '255','255', '250', '130','255', '204', '0','255', '153', '0') ;*/
|
174 |
if (isset($_POST['historique_cartes'])) {
|
212 |
if (isset($_POST['historique_cartes'])) {
|
175 |
$monde->historique_cartes = $_POST['historique_cartes'];
|
213 |
$monde->historique_cartes = $_POST['historique_cartes'];
|
176 |
} else {
|
214 |
} else {
|
177 |
$monde->historique_cartes = INS_ECHELLE_DEPART;
|
215 |
$monde->historique_cartes = INS_ECHELLE_DEPART;
|
178 |
}
|
216 |
}
|
179 |
$monde->image_x = $image_x;
|
217 |
$monde->image_x = $image_x;
|
180 |
$monde->image_y = $image_y;
|
218 |
$monde->image_y = $image_y;
|
181 |
$monde->liste_zone_carte = $liste_zone_carte;
|
219 |
$monde->liste_zone_carte = $liste_zone_carte;
|
182 |
$monde->url = $GLOBALS['ins_url']->getURL();
|
220 |
$monde->url = $GLOBALS['ins_url']->getURL();
|
183 |
|
221 |
/*
|
184 |
foreach ($info_pays as $cle => $valeur) {
|
222 |
foreach ($info_zone[2] as $cle => $valeur) {
|
185 |
$requete_05 =
|
223 |
$requete_05 =
|
186 |
"SELECT CDC_Titre_carte, CDC_ID_Carte, CDC_Carte_fond, CDC_Carte_masque, CDC_ID_Zone_geo_carte".
|
224 |
"SELECT CDC_Titre_carte, CDC_ID_Carte, CDC_Carte_fond, CDC_Carte_masque, CDC_ID_Zone_geo_carte".
|
Line 196... |
Line 234... |
196 |
$ligne_05 = $resultat_05->fetchRow(DB_FETCHMODE_OBJECT);
|
234 |
$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,
|
235 |
$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);
|
236 |
$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') ;
|
237 |
$monde->fils[$ligne_05->CDC_ID_Carte]->definirCouleurs ('255', '255', '255','255', '250', '130','255', '204', '0','255', '153', '0') ;
|
200 |
}
|
238 |
}
|
201 |
|
239 |
*/
|
202 |
$monde->fils['europe']->ajouterFils('france', 'fr', 'France' ,'france_masque.png', 'france.png', $info_dpt_france);
|
240 |
//$monde->fils['europe']->ajouterFils('france', 'fr', 'France' ,'france_masque.png', 'france.png', $info_zone[3]);
|
203 |
$monde->fils['europe']->fils['france']->definirCouleurs ('255', '255', '255','255', '250', '130','255', '204', '0','255', '153', '0') ;
|
241 |
//$monde->fils['europe']->fils['france']->definirCouleurs ('255', '255', '255','255', '250', '130','255', '204', '0','255', '153', '0') ;
|
Line 204... |
Line 242... |
204 |
|
242 |
|
205 |
// Une fois l'arborescence créée on lance la methode donnerFormulaireImage() pour recuperer la carte
|
243 |
// 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
|
244 |
// (dans $img). S'il n'y a pas de carte a afficher donnerFormulaireImage() renvoi false. On peut alors recuperer
|
Line 213... |
Line 251... |
213 |
else {
|
251 |
else {
|
214 |
$img = $monde->donnerFormulaireImage();
|
252 |
$img = $monde->donnerFormulaireImage();
|
215 |
}
|
253 |
}
|
Line 216... |
Line 254... |
216 |
|
254 |
|
217 |
// Quoi qu'il arrive, on ouvre la balise formulaire
|
255 |
// Quoi qu'il arrive, on ouvre la balise formulaire
|
218 |
if ($titre!='') $res = '<h1>'.$titre.'</h1>'."\n";
|
256 |
if ($carto_config['cc_titre_carto']!='') $res = '<h1>'.$carto_config['cc_titre_carto'].'</h1>'."\n";
|
219 |
else $res = '<h1>'.INS_CARTOGRAPHIE.'</h1>'."\n";
|
257 |
else $res = '<h1>'.INS_CARTOGRAPHIE.'</h1>'."\n";
|
220 |
$res .= '<form name="formmail" action="'.$monde->url.'" method="post">'."\n";
|
258 |
$res .= '<form name="formmail" action="'.$monde->url.'" method="post">'."\n";
|
221 |
if ((INS_AFFICHE_ECHELLE)and($img)) {
|
259 |
if ((INS_AFFICHE_ECHELLE)and($img)) {
|
222 |
$historique_carte = new Carto_HistoriqueCarte ($monde, '>', 'chemin_carto');
|
260 |
$historique_carte = new Carto_HistoriqueCarte ($monde, '>', 'chemin_carto');
|
223 |
$res .= $historique_carte->afficherHistoriqueCarte()."\n" ;
|
261 |
$res .= $historique_carte->afficherHistoriqueCarte()."\n" ;
|
224 |
}
|
262 |
}
|
225 |
if (!$img ) {
|
263 |
if (!$img ) {
|
226 |
//include 'bibliotheque/cartographie.fonct.liste_inscrit.php';
|
264 |
//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);
|
265 |
$res .= carto_liste_fiches($monde, $carto_config['cc_table1'], $carto_config['cc_table2'], $carto_config['cc_pays'],$carto_config['cc_cp'], $carto_config['cc_sql']);
|
228 |
return $res;
|
266 |
return $res;
|
229 |
} else {
|
267 |
} else {
|
230 |
$res .= $img;
|
268 |
$res .= $img;
|
231 |
$res .= '<p class="zone_info">'."\n";
|
269 |
$res .= '<p class="zone_info">'."\n";
|
232 |
$res .= '<strong>'.INS_CLIQUER_ACCEDER.'</strong><br />'."\n";
|
270 |
$res .= '<strong>'.INS_CLIQUER_ACCEDER.'</strong><br />'."\n";
|
233 |
$res .= INS_COULEUR."\n".'</p>'."\n";
|
271 |
$res .= INS_COULEUR."\n".'</p>'."\n";
|
234 |
}
|
272 |
}
|
235 |
$res .= '</form>'."\n";
|
- |
|
236 |
}
|
273 |
$res .= '</form>'."\n";
|
Line 237... |
Line 274... |
237 |
return $res;
|
274 |
return $res;
|
238 |
|
275 |
|
239 |
//----------------------------------------------------------------------------------------------------------------------
|
276 |
//----------------------------------------------------------------------------------------------------------------------
|
Line 245... |
Line 282... |
245 |
|
282 |
|
246 |
|
283 |
|
247 |
//-- Fin du code source ------------------------------------------------------------
|
284 |
//-- Fin du code source ------------------------------------------------------------
|
- |
|
285 |
/*
|
- |
|
286 |
* $Log: not supported by cvs2svn $
|
- |
|
287 |
* Revision 1.5 2006/04/19 13:49:04 alexandre_tb
|
248 |
/*
|
288 |
* correction de bug sur l'utilisation de l'id_menu de papyrus
|
249 |
* $Log: not supported by cvs2svn $
|
289 |
*
|
250 |
* Revision 1.4 2006/04/10 14:01:36 florian
|
290 |
* Revision 1.4 2006/04/10 14:01:36 florian
|
251 |
* uniformisation de l'appli bottin: plus qu'un fichier de fonctions
|
291 |
* uniformisation de l'appli bottin: plus qu'un fichier de fonctions
|
252 |
*
|
292 |
*
|