29,11 → 29,11 |
*@version 01 juillet 2002 |
// +-----------------------------------------------------------------------------------------------+ |
// |
// $Id: lib.carto.php,v 1.6 2006-12-12 10:37:45 alexandre_tb Exp $ |
// $Id: lib.carto.php,v 1.7 2007-04-06 08:35:46 neiluj Exp $ |
// FICHIER : $RCSfile: lib.carto.php,v $ |
// AUTEUR : $Author: alexandre_tb $ |
// VERSION : $Revision: 1.6 $ |
// DATE : $Date: 2006-12-12 10:37:45 $ |
// AUTEUR : $Author: neiluj $ |
// VERSION : $Revision: 1.7 $ |
// DATE : $Date: 2007-04-06 08:35:46 $ |
// |
// +-----------------------------------------------------------------------------------------------+ |
// A FAIRE : |
98,8 → 98,8 |
if (!empty($this->class_css)) { |
$res.='class="'.$this->class_css.'" '; |
} |
$GLOBALS['ins_url']->addQueryString('historique_cartes', $chemin); |
$res.='href="'.$GLOBALS['ins_url']->getURL().'"> '.$this->caractere_separation.' '.$tabnom[$key].'</a>'; |
|
$res.='href="'.$this->url.'&historique_cartes='.$chemin.'"> '.$this->caractere_separation.' '.$tabnom[$key].'</a>'; |
} |
$res.= '</div>'."\n"; |
return $res; |
202,8 → 202,6 |
$action['id_carte_destination'] = $ligne->$chp_id_carte_destination; |
|
return $action; |
} else { |
return array ('type_action' => 'Recharger'); |
} |
}//Fin de la méthode _consulterActionImage(). |
|
319,11 → 317,8 |
$this->chemin = $chemin; |
$this->_info_table_zg = $info_table; |
|
|
$this->_action = new Carto_Action($info_table['nom_table_zone'],$info_table['nom_chp_id_zone'], |
$info_table['nom_chp_rouge'], $info_table['nom_chp_vert'], $info_table['nom_chp_bleu'], |
'carto_ACTION', 'CA_ID_Carte', 'CA_ID_Zone_geo', 'CA_Type_zone', |
'CA_Action', 'CA_ID_Carte_destination'); |
$this->_action = new Carto_Action($info_table['nom_table_zone'],$info_table['nom_chp_id_zone'], $info_table['nom_chp_rouge'], $info_table['nom_chp_vert'], $info_table['nom_chp_bleu'], |
'carto_ACTION', 'CA_ID_Carte', 'CA_ID_Zone_geo', 'CA_Type_zone', 'CA_Action', 'CA_ID_Carte_destination'); |
$this->fils = array(); |
$this->filiation = $id; |
$this->historique_cartes = ''; |
405,6 → 400,7 |
|
function donnerFormulaireImage () |
{ |
global $GS_GLOBAL; |
$res = ''; |
|
// Nous commençons par tester tout d'abords si nous venons d'une autre carte. Pour cela nous vérifions, |
447,7 → 443,7 |
// on regarde qu'est-ce qu'on doit faire grace a la methode _consulterAction() de l'objet Carto_Action |
|
$action = $this->_action->_consulterActionImage($this->image_x, $this->image_y, $this->masque, $this->id); |
|
|
// Nous distinguons 2 cas : |
//le cas ou il faut afficher une nouvelle carte ... : |
if ($action['type_action'] == 'Aller_a') { |
454,9 → 450,7 |
|
$id_carte_destination = $action['id_carte_destination'] ; |
$this->fils[$id_carte_destination]->liste_zone_carte = $this->liste_zone_carte; |
if (INS_AFFICHE_ZONE_ROUGE) { |
$res .= ''.$this->fils[$id_carte_destination]->_donnerListeZoneCarte()."<br />\n"; |
} |
$res .= ''.$this->fils[$id_carte_destination]->_donnerListeZoneCarte()."<br />\n"; |
$res .= '<input type="image" src="'; |
$id_image = $this->_donnerIdUnique(); |
$this->fils[$id_carte_destination]->_lancerColoriage($id_image); |
471,9 → 465,7 |
//Cette possibilité peut se présenter quand on clique sur un zone blanche d'une carte (càd dans la mer) |
//Là, on recharge la carte précédente : |
elseif ($action['type_action'] == 'Recharger') { |
if (INS_AFFICHE_ZONE_ROUGE) { |
$res .= ''.$this->_donnerListeZoneCarte()."<br />\n"; |
} |
$res .= ''.$this->_donnerListeZoneCarte()."<br />\n"; |
$res .= '<input type="image" src="'; |
$id_image = $this->_donnerIdUnique(); |
$this->_lancerColoriage($id_image); |
499,9 → 491,8 |
} |
} |
$this->liste_zone_carte = $liste_zone_carte; |
if (INS_AFFICHE_ZONE_ROUGE) { |
$res .= ''.$this->_donnerListeZoneCarte($this->liste_zone_carte)."<br />\n"; |
} |
|
$res .= ''.$this->_donnerListeZoneCarte($this->liste_zone_carte)."<br />\n"; |
$res .= '<input type="image" src="'; |
$id_image = $this->_donnerIdUnique(); |
$this->_lancerColoriage($id_image, '', $this->liste_zone_carte); |
514,7 → 505,6 |
else if ($this->historique_cartes) { |
// Nous chargons alors l'ojet approprié en descendant grâce a la généalogie |
$historique_cartes = explode('*',$this->historique_cartes); |
|
foreach ($historique_cartes as $key => $value) { |
if ($key != 0) { |
$this = $this->fils[$value]; |
521,9 → 511,8 |
} |
} |
// une foit que l'on a charge le bon objet nous le colorions |
if (INS_AFFICHE_ZONE_ROUGE) { |
$res .= ''.$this->_donnerListeZoneCarte()."<br />\n"; |
} |
$res .= ''.$this->_donnerListeZoneCarte()."<br />\n"; |
|
$res .= '<input type="image" src="'; |
$id_image = $this->_donnerIdUnique(); |
$this->_lancerColoriage($id_image); |
535,9 → 524,8 |
// et on affiche alors la premiere carte |
else { |
unset ($_SESSION['carte']) ; |
if (INS_AFFICHE_ZONE_ROUGE) { |
$res .= ''.$this->_donnerListeZoneCarte()."<br />\n"; |
} |
$res .= ''.$this->_donnerListeZoneCarte()."<br />\n"; |
|
$res .= '<input type="image" src="'; |
$id_image = $this->_donnerIdUnique(); |
$this->_lancerColoriage($id_image); |
562,7 → 550,7 |
$requete = |
'SELECT '.$this->_info_table_zg['nom_chp_id_zone'].', '.$this->_info_table_zg['nom_chp_nom_zone']. |
' FROM '.$this->_info_table_zg['nom_table_zone']; |
if ($this->_info_table_zg['nom_chp_zone_sup'] != '' && $this->_id_zone_geo_carte != ''){ |
if ($this->_info_table_zg['nom_chp_zone_sup'] != ''){ |
if(ereg("[a-z]+",$this->_id_zone_geo_carte)){ |
$requete .= |
' WHERE '.$this->_info_table_zg['nom_chp_zone_sup'].' = "'.$this->_id_zone_geo_carte.'"'; |
574,11 → 562,11 |
} |
$requete .= |
' ORDER BY '.$this->_info_table_zg['nom_chp_nom_zone'].' ASC'; |
$resultat = $GLOBALS['ins_db']->query ($requete) ; |
if (DB::isError($resultat)) { |
echo BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete) ; |
} |
|
$resultat = mysql_query ($requete) or die(' |
<H2 style="text-align: center; font-weight: bold; font-size: 26px;">Erreur de requête</H2>'. |
'<b>Requete : </b>'.$requete. |
'<br/><br/><b>Erreur : </b>'.mysql_error()); |
|
$i=0; |
|
$retour = '<select name="liste_zone_carte" style="float:right;" onchange="javascript:this.form.submit();">'."\n"; |
587,7 → 575,7 |
$nom_chp_nom_zone = $this->_info_table_zg['nom_chp_nom_zone']; |
$nom_chp_id_zone = $this->_info_table_zg['nom_chp_id_zone']; |
|
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) { |
while ($ligne = mysql_fetch_object ($resultat)) { |
if ($zone_par_defaut == $ligne->$nom_chp_id_zone){ |
$retour .= '<option value="'.$ligne->$nom_chp_id_zone.'" selected="selected">'.$ligne->$nom_chp_nom_zone.'</option>'."\n"; |
} |
643,7 → 631,7 |
$requete_01 = |
'SELECT *'. |
' FROM '.$table_zone_geo; |
if ($chp_zone_sup != '' && $this->_id_zone_geo_carte != ''){ |
if ($chp_zone_sup != ''){ |
if(ereg("[a-z]+",$this->_id_zone_geo_carte)){ |
$requete_01 .= |
' WHERE '.$chp_zone_sup.' = "'.$this->_id_zone_geo_carte.'"'; |
1198,9 → 1186,6 |
//-- Fin du code source ------------------------------------------------------------ |
/* |
* $Log: not supported by cvs2svn $ |
* Revision 1.4 2006/04/04 12:23:05 florian |
* modifs affichage fiches, généricité de la carto, modification totale de l'appli annuaire |
* |
* Revision 1.3 2005/12/07 14:59:14 alexandre_tb |
* suppression d'un echo |
* |