Affiche une page statique

@return string HTML
426405
function affichePresseMediaPublicite()
    {
        $html = '';

        $t = new Template('modules/archi/templates/');
        $t->set_filenames(array('publicite'=>'staticArticleDNA.tpl'));
        
        
        if (isset($this->variablesGet['archiAncre']) && $this->variablesGet['archiAncre']==1) {
            $t->assign_vars(
                array('jsToExecute'=>"
            
                <script  >
                    document.getElementById('blocDNA').style.display='block';
                    document.getElementById('blocAfficher').style.display='none';
                    location.href='#dna';
                </script>
                
                ")
            );
        } elseif (isset($this->variablesGet['archiAncre']) && $this->variablesGet['archiAncre']==2) {
            $t->assign_vars(
                array('jsToExecute'=>"
                <script  >
                    location.href='#france3';
                </script>
                ")
            );
        
        }
        
        
        $t->assign_vars(
            array(
                'cheminPhoto'=>$this->getUrlImage()."/publicite/photoArticleDNA.jpg", 
                'htmlPhoto'=>"", 
                'cheminLogoDNA'=>$this->getUrlImage()."/publicite/logoDNA.jpg", 
                'cheminLogoFrance3'=>$this->getUrlImage()."/publicite/logoFrance3Alsace.jpg", 
                'lienPDF'=>$this->getUrlImage()."/publicite/LOFST.11.0051DNAwww.archi-strasbourg.org.pdf", 
                'urlVideo'=>$this->getUrlImage()."/publicite/reportageFrance3.wmv"
            )
        );
        
        ob_start();
        $t->pparse('publicite');
        $html .= ob_get_contents();
        ob_end_clean();
        
        return $html;
    
    }
682009
public function _info()
    {
        $inf = array();
        $ar  = array();
        foreach ($this->attribs as $i => $a) {
            $ar[$i] = self::html_attr2str($a);
        }

        $inf['attribs']   = $ar;
        $inf['attrs']     = $this->attrs;
        $inf['idx_attr']  = $this->idx_attr;
        $inf['tag_idx']   = $this->tag_idx;
        $inf['attr_idx']  = $this->attr_idx;
        $inf['class_idx'] = $this->class_idx;

        $lev = array();
        $nm  = array();
        $st  = array();
        $pb  = -1;
        $pe  = PHP_INT_MAX;
        $l   = 0;
        foreach ($this->ids as $b => $e) {
            if ($pb < $b && $b < $pe) {
                $st[]          = array($pb, $pe);
                list($pb, $pe) = array($b, $e);
            } else {
                while ($pe < $b && $st) {
                    list($pb, $pe) = array_pop($st);
                }
            }

            $nm[$b]  = $this->tags[$b];
            $lev[$b] = count($st);
        }
        foreach ($nm as $b => &$n) {
            $n = str_repeat(' -', $lev[$b]) . ' < ' . $n . ' ' . $this->get_attr_byId($b, null, true) . ' >';
        }
        $nm           = implode("\n", $nm);
        $inf['struc'] = $nm;
        unset($lev, $st, $nm);
        return $inf;
    }
296051
public function pager() {
        global $OUTPUT;

        if (!$this->supports_paging()) {
            return '';
        }

        return $OUTPUT->paging_bar(
            count($this->items), $this->page, $this->perpage,
            new moodle_url('/grade/report/singleview/index.php', array(
                'perpage' => $this->perpage,
                'id' => $this->courseid,
                'group' => $this->groupid,
                'itemid' => $this->itemid,
                'item' => 'user'
            ))
        );
    }
875867
public function display() {
		$path = func_get_args();

		$count = count($path);
		if (!$count) {
			return $this->redirect('/');
		}
		$page = $subpage = $title_for_layout = null;
        if (!empty($path[0])) {
			$page = $path[0];
		}
		if (!empty($path[1])) {
			$subpage = $path[1];
		}
		if (!empty($path[$count - 1])) {
			$title_for_layout = Inflector::humanize($path[$count - 1]);
		}
        $this->set(compact('page', 'subpage', 'title_for_layout'));
		try {

			$this->render(implode('/', $path));
		} catch (MissingViewException $e) {
			if (Configure::read('debug')) {
				throw $e;
			}
			throw new NotFoundException();
		}
	}
1226623
public function afficheStatistiques()
	{
		$t = new Template($this->getCheminPhysique().$this->cheminTemplates);
		$t->set_filenames(array('statsAccueil'=>'statistiquesAccueil.tpl'));

		// recherche du nombre d'evenements
		$reqEvenements = "SELECT DISTINCT idEvenement as nbEvenements FROM evenements;";
		$resEvenements = $this->connexionBdd->requete($reqEvenements);

		// recherche du nombre d'adresses
		$reqAdresses = "SELECT DISTINCT idAdresse as nbAdresses FROM historiqueAdresse;";
		$resAdresses = $this->connexionBdd->requete($reqAdresses);

		// recherche du nombre de photos
		$reqPhotos = "SELECT DISTINCT idImage as nbImages FROM historiqueImage;";
		$resPhotos = $this->connexionBdd->requete($reqPhotos);

		$t->assign_vars(array('architectes'=>$this->getListeArchitectesProductifs(array('sqlLimit'=>"LIMIT 10", "noPagination"=>true))));
		$t->assign_vars(array('rues'=>$this->getListeRuesCompletes(array('sqlLimit'=>"LIMIT 10", "noPagination"=>true))));

		$t->assign_vars(array('voirTousLesArchitectes'=>"<a href='".$this->creerUrl('', 'tousLesArchitectesClasses')."'>"._("Voir tous les architectes classés")."</a>"));

		$t->assign_vars(array('voirToutesLesRues'=>"<a href='".$this->creerUrl('', 'toutesLesRuesCompletesClassees')."'>"._("Voir toutes les rues classées")."</a>"));

		$t->assign_vars(array('nbAdresses'=>mysql_num_rows($resAdresses)));
		$t->assign_vars(array('nbEvenements'=>mysql_num_rows($resEvenements)));
		$t->assign_vars(array('nbPhotos'=>mysql_num_rows($resPhotos)));

		ob_start();
		$t->pparse('statsAccueil');
		$html .= ob_get_contents();
		ob_end_clean();

		return $html;
	}
282135
public function afficheListeRegroupee()
    {
        $html="";
        $t=new Template($this->getCheminPhysique().$this->cheminTemplates);
        $t->set_filenames((array('listeRegroupee'=>'listeRegroupee.tpl')));

        $r = new archiRecherche();


        if (isset($this->variablesGet['modeAffichageListe'])) {
            $modeAffichageListe = $this->variablesGet['modeAffichageListe'];
        } else {
            $modeAffichageListe = 'default';
        }
        $idVilleGeneral = 1;  // strasbourg par defaut
        $s = new objetSession();

        if ($s->isInSession('archiIdVilleGeneral') && $s->getFromSession('archiIdVilleGeneral')!='') {
            $idVilleGeneral = $s->getFromSession('archiIdVilleGeneral');
        } elseif (isset($this->variablesGet['archiIdVilleGeneral'])) {
            $idVilleGeneral = $this->variablesGet['archiIdVilleGeneral'];
            $s->addToSession('archiIdVilleGeneral', $idVilleGeneral);
        }

        $fetchInfosVille = $this->getInfosVille($idVilleGeneral, array('fieldList'=>'v.nom as nomVille'));

        $nomVilleGeneral = $fetchInfosVille['nomVille'];

        $t->assign_vars(array('liens'=>"<a href='".$this->creerUrl('', 'listeDossiers', array('modeAffichageListe'=>'parRues','archiIdVilleGeneral'=>$idVilleGeneral))."'>"._("Par rues de")." ".$nomVilleGeneral."</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href='".$this->creerUrl('', 'listeDossiers', array('modeAffichageListe'=>'parQuartiers','archiIdVilleGeneral'=>$idVilleGeneral))."'>"._("Par quartiers de")." ".$nomVilleGeneral."</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href='".$this->creerUrl('', 'listeDossiers', array('modeAffichageListe'=>'parVilles'))."'>"._("Par villes")."</a>",

        ));

        switch ($modeAffichageListe) {
            case 'parQuartiers':
                $pagination = new paginationObject();

                $arrayQuartiers = $this->getIdQuartiersFrom($idVilleGeneral, 'ville');

                $arrayQuartiersNotEmpty = $r->getIdQuartiersNotEmpty();


                $arrayListeQuartiersNotEmpty = array();
                $arrayListeAlphabetique = array();
                foreach ($arrayQuartiers as $indice => $idQuartier) {
                    if (in_array($idQuartier, $arrayQuartiersNotEmpty['arrayListeQuartiersNonVides'])) {
                        $arrayListeQuartiersNotEmpty[] = $idQuartier;
                    }
                }


                // pagination
                $nbEnregistrementTotaux = count($arrayListeQuartiersNotEmpty);

                // nombre d'images affichées sur une page
                $nbEnregistrementsParPage = 12;
                $arrayPagination=$pagination->pagination(array(
                        'nomParamPageCourante'=>'archiPageCouranteVille',
                        'nbEnregistrementsParPage'=>$nbEnregistrementsParPage,
                        'nbEnregistrementsTotaux'=>$nbEnregistrementTotaux,
                        'typeLiens'=>'noformulaire'
                ));

                $t->assign_vars(array('pagination'=>$arrayPagination['html']));

                $req = "SELECT idQuartier, nom
						FROM quartier
						WHERE idQuartier in ('".implode("','", $arrayListeQuartiersNotEmpty)."')
								and nom<>'autre'
								ORDER BY nom ASC
								LIMIT ".$arrayPagination['limitSqlDebut'].",".$nbEnregistrementsParPage."
										";

                $tableau = new tableau();

                $res = $this->connexionBdd->requete($req);
                while ($fetch = mysql_fetch_assoc($res)) {
                // pour chaque ville on va regarder s'il y a des adresses qui correspondent et on les compte
                    /*$reqCount = "
					 SELECT distinct ha.idAdresse
					FROM historiqueAdresse ha2, historiqueAdresse ha
					LEFT JOIN sousQuartier sq ON sq.idQuartier = '".$fetch['idQuartier']."'
					LEFT JOIN rue r ON r.idSousQuartier = sq.idSousQuartier
					WHERE
					(ha.idRue = IFNULL(r.idRue , 0)
							OR  ha.idQuartier = '".$fetch['idQuartier']."'
							OR  ha.idSousQuartier = IFNULL(sq.idSousQuartier,0))
					AND ha2.idHistoriqueAdresse = ha.idHistoriqueAdresse
					GROUP BY ha.idAdresse, ha.idHistoriqueAdresse
					HAVING ha.idHistoriqueAdresse = max(ha2.idHistoriqueAdresse)
					";*/



                    $reqRuesQuartier = "SELECT idRue FROM rue WHERE idSousQuartier IN (SELECT idSousQuartier FROM sousQuartier WHERE idQuartier=".$fetch['idQuartier'].")";
                    $reqSousQuartier = "SELECT idSousQuartier FROM sousQuartier WHERE idQuartier = ".$fetch['idQuartier'];

                    $nbAdressesTotales=0;
                    $nbAdressesRues =0;
                    $nbAdressesSousQuartiers=0;
                    $nbAdressesQuartiers=0;

                    $resRuesQuartier = $this->connexionBdd->requete($reqRuesQuartier);
                    while ($fetchRuesQuartier = mysql_fetch_assoc($resRuesQuartier)) {
                        $reqCountRuesQuartier = "SELECT count(distinct idAdresse) as nbAdressesRues from historiqueAdresse WHERE idRue='".$fetchRuesQuartier['idRue']."'";
                        $resCountRuesQuartier = $this->connexionBdd->requete($reqCountRuesQuartier);
                        $fetchAdressesRues = mysql_fetch_assoc($resCountRuesQuartier);
                        $nbAdressesRues += $fetchAdressesRues['nbAdressesRues'];
                    }

                    $resSousQuartier = $this->connexionBdd->requete($reqSousQuartier);
                    while ($fetchSousQuartier = mysql_fetch_assoc($resSousQuartier)) {
                        $reqCountSousQuartierQuartier = "SELECT count(distinct idAdresse) as nbAdressesSousQuartiers FROM historiqueAdresse WHERE idSousQuartier='".$fetchSousQuartier['idSousQuartier']."'";
                        $resCountSousQuartierQuartier = $this->connexionBdd->requete($reqCountSousQuartierQuartier);
                        $fetchAdressesSousQuartiers = mysql_fetch_assoc($resCountSousQuartierQuartier);
                        $nbAdressesSousQuartiers += $fetchAdressesSousQuartiers['nbAdressesSousQuartiers'];
                    }

                    $reqCountQuartiers = "SELECT count(distinct idAdresse) as nbAdressesQuartier FROM historiqueAdresse WHERE idQuartier = '".$fetch['idQuartier']."'";
                    $resCountQuartiers = $this->connexionBdd->requete($reqCountQuartiers);
                    $fetchCountQuartiers = mysql_fetch_assoc($resCountQuartiers);
                    $nbAdressesQuartiers += $fetchCountQuartiers['nbAdressesQuartier'];


                    $nbAdressesTotales = $nbAdressesRues + $nbAdressesSousQuartiers + $nbAdressesQuartiers;

                    $nbResultats = "(".$nbAdressesTotales.")";


                    $htmlPhoto='';
                    $urlPhoto = $this->getUrlImageFromQuartier($fetch['idQuartier'], 'moyen');
                    if (!pia_ereg("transparent.gif", $urlPhoto)) {  // la fonction renvoi le lien vers une photo transparente si elle ne trouve pas de photo de du quartier
                        $htmlPhoto = "<a href='".$this->creerUrl('', 'adresseListe', array('recherche_quartier'=>$fetch['idQuartier']))."'><img src='".$urlPhoto."' border=0></a>";
                    } else {
                        // pas de photo
                        $htmlPhoto = "<span style='float:right;margin:0px;padding:0px;'><a href='".$this->creerUrl('', 'adresseListe', array('recherche_quartier'=>$fetch['idQuartier']))."'><table border='' style='margin:0px;padding:0px;border:1px solid #000000;font-size:11px;background-image:url(".$this->getUrlImage()."imageDefautArchiv2.jpg);' width=200 height=150><tr><td align=center valign=center style='padding-top:100px;'>Pas de photo</td></tr></table></a></span>";
                    }


                    $lien = "<a href='".$this->creerUrl('', 'adresseListe', array('recherche_quartier'=>$fetch['idQuartier']))."'>".stripslashes($fetch['nom'])."</a>".$nbResultats;
                    if ($nbAdressesTotales>0) {
                        $tableau->addValue($htmlPhoto."<br>".$lien);
                    }
                }

                $t->assign_vars(array('elements'=>$tableau->createHtmlTableFromArray(3)));
                break;

            case "parVilles":
                $arrayVillesNotEmpty = $r->getIdVillesNotEmpty();
                $arrayListeVillesAvecAdresses = $arrayVillesNotEmpty["arrayIdVilles"];
                $listeVilleAvecAdresses = implode(",", $arrayListeVillesAvecAdresses);
                //pagination
                $reqNbVilles = "
						SELECT 0
						FROM ville
						where (idPays = '1' or idPays='2')
						AND idVille in (".$listeVilleAvecAdresses.")
								and nom <>'autre'
								";
                $resNbVilles = $this->connexionBdd->requete($reqNbVilles);
                $nbEnregistrementTotaux = mysql_num_rows($resNbVilles);
                // nombre d'images affichées sur une page
                $nbEnregistrementsParPage = 12;
                $arrayPagination=$this->pagination(array(
                        'nomParamPageCourante'=>'archiPageCouranteVille',
                        'nbEnregistrementsParPage'=>$nbEnregistrementsParPage,
                        'nbEnregistrementsTotaux'=>$nbEnregistrementTotaux,
                        'typeLiens'=>'noformulaire'
                ));



                $t->assign_vars(array('pagination'=>$arrayPagination['html']));

                $req = "
						SELECT v.nom,v.idVille, lower(substr(v.nom,1,1)) as lettre
						FROM ville v

						WHERE (v.idPays = '1' or v.idPays='2')
						AND v.nom<>'autre'
						AND idVille in (".$listeVilleAvecAdresses.")
								ORDER BY v.nom
								LIMIT ".$arrayPagination['limitSqlDebut'].",".$nbEnregistrementsParPage;

                $tableau = new tableau();

                $res = $this->connexionBdd->requete($req);

                while ($fetch = mysql_fetch_assoc($res)) {
                    $listeRuesVille = "SELECT idRue FROM rue WHERE idSousQuartier IN (SELECT idSousQuartier FROM sousQuartier WHERE idQuartier IN (SELECT idQuartier FROM quartier WHERE idVille='".$fetch['idVille']."'))";
                    $listeSousQuartiersVille = "SELECT idSousQuartier FROM sousQuartier WHERE idQuartier IN (SELECT idQuartier FROM quartier WHERE idVille='".$fetch['idVille']."')";
                    $listeQuartiersVille = "SELECT idQuartier FROM quartier WHERE idVille='".$fetch['idVille']."'";


                    // comptage du nombre d'adresse liés a ces elements d'adresses
                    $resRuesVille = $this->connexionBdd->requete($listeRuesVille);
                    $nbRues = 0;
                    while ($fetchRuesVilles = mysql_fetch_assoc($resRuesVille)) {
                        $reqNbAdressesRue = "SELECT count(distinct idAdresse) as nbAdressesRue FROM historiqueAdresse WHERE idRue='".$fetchRuesVilles['idRue']."'";
                        $resNbAdressesRue = $this->connexionBdd->requete($reqNbAdressesRue);
                        $fetchNbAdressesRue = mysql_fetch_assoc($resNbAdressesRue);
                        $nbRues += $fetchNbAdressesRue['nbAdressesRue'];
                    }

                    $resSousQuartiersVille = $this->connexionBdd->requete($listeSousQuartiersVille);
                    $nbSousQuartiers = 0;
                    while ($fetchSousQuartiersVille = mysql_fetch_assoc($resSousQuartiersVille)) {
                        $reqNbAdressesSousQuartier = "SELECT count(distinct idAdresse) as nbAdressesSousQuartiers FROM historiqueAdresse WHERE idSousQuartier='".$fetchSousQuartiersVille['idSousQuartier']."'";
                        $resNbAdressesSousQuartier = $this->connexionBdd->requete($reqNbAdressesSousQuartier);
                        $fetchNbAdressesSousQuartier = mysql_fetch_assoc($resNbAdressesSousQuartier);
                        $nbSousQuartiers += $fetchNbAdressesSousQuartier['nbAdressesSousQuartiers'];
                    }

                    $resQuartiersVille = $this->connexionBdd->requete($listeQuartiersVille);
                    $nbQuartiers = 0;
                    while ($fetchQuartiersVille = mysql_fetch_assoc($resQuartiersVille)) {
                        $reqNbAdressesQuartier = "SELECT count(distinct idAdresse) as nbAdressesQuartiers FROM historiqueAdresse WHERE idQuartier='".$fetchQuartiersVille['idQuartier']."'";
                        $resNbAdressesQuartier = $this->connexionBdd->requete($reqNbAdressesQuartier);
                        $fetchNbAdressesQuartier = mysql_fetch_assoc($resNbAdressesQuartier);
                        $nbQuartiers += $fetchNbAdressesQuartier['nbAdressesQuartiers'];
                    }

                    $nbVilles = 0;
                    $reqNbAdressesVilles = "SELECT count(distinct idAdresse) as nbAdressesVilles FROM historiqueAdresse WHERE idVille='".$fetch['idVille']."'";
                    $resNbAdressesVilles = $this->connexionBdd->requete($reqNbAdressesVilles);
                    $fetchNbAdressesVilles = mysql_fetch_assoc($resNbAdressesVilles);
                    $nbVilles = $fetchNbAdressesVilles['nbAdressesVilles'];


                    $totalAdresses = $nbRues + $nbQuartiers + $nbVilles;

                    $recherche = new archiRecherche();

                    $nbResult = $recherche->getNumberOfAdresse(array('ville' => $fetch['idVille']));

                    $nbResultats = " (".$nbResult.")";

                    $htmlPhoto="";
                    $urlPhoto = $this->getUrlImageFromVille($fetch['idVille'], 'moyen');
                    if ($urlPhoto!='') {
                        $htmlPhoto = "<a href='".$this->creerUrl('', 'adresseListe', array('recherche_ville'=>$fetch['idVille']))."'><img src='".$urlPhoto."' border=0></a>";
                    }

                    $lien = "<a href='".$this->creerUrl('', 'adresseListe', array('recherche_ville'=>$fetch['idVille']))."'>".stripslashes($fetch['nom'])."</a>".$nbResultats."<br>";
                    if ($totalAdresses>0) {
                        $tableau->addValue($htmlPhoto."<br>".$lien);
                    }
                }

                $t->assign_vars(array('elements'=>$tableau->createHtmlTableFromArray(3)));

                break;
            case "parRuesDeQuartier":
            default:
                // DEFAULT : affichage parRues
                // s'il n'y a pas de criteres on affiche les dossiers des rues de strasbourg
                $r = new archiRecherche();
                $s = new stringObject();

                if (isset($this->variablesGet['archiIdQuartier']) && $this->variablesGet['archiIdQuartier']!='') {
                    $arrayRues = $this->getIdRuesFrom($this->variablesGet['archiIdQuartier'], 'quartier');
                } else {
                    $arrayRues = $this->getIdRuesFrom($idVilleGeneral, 'ville');
                }

                $arrayRuesNotEmpty = $r->getIdRuesNotEmpty();
                $arrayIdRuesNotEmpty=array();
                $arrayListeAlphabetique = array();

                foreach ($arrayRues as $indice => $idRue) {
                    if (in_array($idRue, $arrayRuesNotEmpty['arrayIdRues'])) {
                        $arrayIdRuesNotEmpty[] = $idRue;
                        $reqInitiales = "SELECT lower(substring(nom,1,1)) as initiale FROM rue WHERE idRue='".$idRue."'";
                        $resInitiales = $this->connexionBdd->requete($reqInitiales);
                        $fetchInitiales = mysql_fetch_assoc($resInitiales);
                        $initiale = $fetchInitiales['initiale'];
                        $arrayListeAlphabetique[] = $s->sansAccents($initiale);// enleve les accents

                        if (!isset($this->variablesGet['lettreCourante']) || isset($this->variablesGet['lettreCourante']) && $s->sansAccents($initiale)==$this->variablesGet['lettreCourante']) {
                            $arrayIdRuesNotEmptyWithSelection[] = $idRue; // prend en compte le nombre de rue selectionnée ou non par leur initiales
                        }
                    }
                }

                $sqlCritere = "";
                if (isset($this->variablesGet['lettreCourante']) && $this->variablesGet['lettreCourante']!='') {
                    $sqlCritere = " AND lower(SUBSTRING(nom,1,1))=lower('".$this->variablesGet['lettreCourante']."') ";
                }

                $nbEnregistrementTotaux = count($arrayIdRuesNotEmptyWithSelection);

                // nombre d'images affichées sur une page
                $nbEnregistrementsParPage = 40;
                $pagination = new paginationObject();

                if (isset($this->variablesGet['archiIdQuartier'])) {
                    $arrayPagination=$pagination->pagination(array(
                            'nomParamPageCourante'=>'archiPageRuesQuartier',
                            'nbEnregistrementsParPage'=>$nbEnregistrementsParPage,
                            'nbEnregistrementsTotaux'=>$nbEnregistrementTotaux,
                            'typeLiens'=>'freeLink',
                            'urlFreeLink'=>$this->creerUrl('', 'listeDossiers', array('archiIdQuartier'=>$this->variablesGet['archiIdQuartier'],'modeAffichageListe'=>'parRuesDeQuartier','archiPageRuesQuartier'=>'##numPage##'))

                    ));
                } else {
                    $arrayPagination=$pagination->pagination(array(
                            'nomParamPageCourante'=>'archiPageCouranteVille',
                            'nbEnregistrementsParPage'=>$nbEnregistrementsParPage,
                            'nbEnregistrementsTotaux'=>$nbEnregistrementTotaux,
                            'typeLiens'=>'noformulaire',
                            'arrayListeAlphabetique'=>$arrayListeAlphabetique
                    ));
                }


                $t->assign_vars(array('pagination'=>$arrayPagination['html']));

                $req = "
						SELECT nom,idRue,prefixe, lower(substr(nom,1,1)) as lettre
						FROM rue
						WHERE
						idRue in ('".implode("','", $arrayIdRuesNotEmpty)."')
						$sqlCritere
						ORDER BY lettre
						LIMIT ".$arrayPagination['limitSqlDebut'].",".$nbEnregistrementsParPage;


                $res = $this->connexionBdd->requete($req);

                $tableau = new tableau();

                while ($fetch = mysql_fetch_assoc($res)) {
                // pour chaque rue on va regarder s'il y a des adresses qui correspondent et on les compte (affichage du nombre de resultats)
                    $reqCount = "SELECT count(distinct idAdresse) as nbAdresses FROM historiqueAdresse WHERE idRue='".$fetch['idRue']."'";

                    $resCount = $this->connexionBdd->requete($reqCount);
                    $fetchCount = mysql_fetch_assoc($resCount);
                    $valCount = $fetchCount['nbAdresses'];
                    $nbResultats = " (".$valCount.")";


                    $htmlPhoto='';
                    //$urlPhoto = $this->getUrlImageFromRue($fetch['idRue'],'moyen');
                    $urlPhoto="resizeImage.php?id=".$this->getIdImageFromRue($fetch['idRue']);
                    if (!pia_ereg("transparent.gif", $urlPhoto)) {  // la fonction renvoi le lien vers une photo transparente si elle ne trouve pas de photo de la rue
                        $htmlPhoto = "<a href='".$this->creerUrl('', 'adresseListe', array('recherche_rue'=>$fetch['idRue']))."'><img src='".$urlPhoto."' border=0></a><br>";
                    } else {
                        // pas de photo
                        $htmlPhoto = "<a style='margin:0px;padding:0px;' href='".$this->creerUrl('', 'adresseListe', array('recherche_rue'=>$fetch['idRue']))."'><table border='' style='margin:0px;padding:0px;border:1px solid #000000;font-size:11px;background-image:url(".$this->getUrlImage()."imageDefautArchiv2.jpg);' width=200 height=150><tr><td align=center valign=center style='padding-top:100px;'>Pas de photo</td></tr></table></a>";
                    }

                    $lien = "<a href='".$this->creerUrl('', 'adresseListe', array('recherche_rue'=>$fetch['idRue']))."'>".stripslashes($fetch['prefixe']." ".$fetch['nom'])."</a>".$nbResultats;
                    if ($valCount>0) {
                        $tableau->addValue($htmlPhoto.$lien);
                    }
                }

                $t->assign_vars(array('elements'=>$tableau->createHtmlTableFromArray(5)));

                break;
        }


        ob_start();
        $t->pparse('listeRegroupee');
        $html=ob_get_contents();
        ob_end_clean();

        return $html;
    }
1117681
protected function next_page()
    {
        $style = @$this->span_class['next'];
        if ($this->page < $this->totalpage) {
            return $this->_get_link($this->_get_url($this->page + 1), $this->next_page, $style);
        }
        return '<span class="' . $style . '">' . $this->next_page . '</span>';
    }
155164
public function drawPage()
    {
        $this->preFlight();
        if ($this->preprocess()) {

            if ($this->window_dressing) {
                echo $this->getHeader();
            }
            
            if ($this->readinessCheck() !== false) {
                $body = $this->bodyContent();
            } else {
                $body = $this->errorContent();
            }

            if ($this->window_dressing) {
                echo $body;
                echo $this->getFooter();
            } else {
                $body = str_ireplace('</html>','',$body);
                $body = str_ireplace('</body>','',$body);
                echo $body;
            }

            $this->writeJS();
            
            echo array_reduce($this->css_files,
                function ($carry, $css_url) {
                    return $carry . sprintf('<link rel="stylesheet" type="text/css" href="%s">' . "\n",
                                    $css_url);
                },
                ''
            );
            
            $page_css = $this->css_content();
            if (!empty($page_css)) {
                echo '<style type="text/css">';
                echo $page_css;
                echo '</style>';
            }

            $this->postFlight();

            echo '</body></html>';
        } else {
            $this->postFlight();
        }
    }
259726
public function afficher($id)
    {
        $html = '';
        $formulaire = new formGenerator();
        if ($formulaire->estChiffre($id) == 1) {
            $sql = 'SELECT p.nom as nom, p.prenom as prenom,  m.nom as metier,  p.idPersonne as idPersonne,  p.dateNaissance as dateNaissance,  p.dateDeces as dateDeces,  p.description as description
                    FROM personne p
                    LEFT JOIN metier m ON m.idMetier = p.idMetier
                    WHERE p.idPersonne='.$id.' LIMIT 1';
            $rep = $this->connexionBdd->requete($sql);
            if (mysql_num_rows($rep) == 1) {
                $res = mysql_fetch_object($rep);

                $t = new Template('modules/archi/templates/');
                $t->set_filenames((array('pe'=>'personne.tpl')));

                $e = new archiEvenement();

                $t->assign_vars(
                    array(
                        'prenom' => $res->prenom,
                        'nom'    => $res->nom,
                        'metier' => $res->metier,
                        'dateNaissance'=> $this->date->toFrench($res->dateNaissance),
                        'dateDeces'    => $this->date->toFrench($res->dateDeces),
                        'description'  => $res->description,
                        'urlAjout'     => $this->creerUrl('ajouterPersonne'),
                        'evenementLies'=> $e->afficherListe(array( 'selection' => 'personne',  'id' => $res->idPersonne))
                    )
                );

                ob_start();
                $t->pparse('pe');
                $html .= ob_get_contents();
                ob_end_clean();
            } else {
                $html .= 'ERREUR aucun résultat !';
            }
        } else {
            $html .= 'ERREUR mauvais ID!';
        }
        return $html;
    }
1374916
public function getPageFavicon()
    {
        if (!$this->parser) {
            return;
        }

        $node = $this->parser->find('link[rel=shortcut], link[rel=icon], link[rel=shortcut icon]', 0);

        if ($node) {
            return $node->getAttribute('href');
        }
    }
1370487
public function getEasyMarkup(){

        $markup = '';

        if($this->prevUrl){
            $markup .= "<li class='pagination-previous' title='View previous page'><a href='{$this->prevUrl}'>prev</a></li>";
        }//if

        $pages = $this->getPrevUrls(5);

        foreach($pages as $i => $page){
            $markup .= "<li><a href='{$page}' title='View page {$i} of {$this->totalPages}'>{$i}</a></li>";
        }//foreach

        if($this->totalPages){
            $markup .= "<li class='current' title='Your viewing page {$this->currentPage} of {$this->totalPages}'><a>{$this->currentPage}</a></li>";
        }//if

        $pages = $this->getNextUrls(5);

        foreach($pages as $i => $page){
            $markup .= "<li><a href='{$page}' title='View page {$i} of {$this->totalPages}'>{$i}</a></li>";
        }//foreach

        if($this->nextUrl){
            $markup .= "<li class='pagination-next' title='View next page'><a href='{$this->nextUrl}'>next</a></li>";
        }//if

        return "<ul class='pagination'>{$markup}</ul>";

    }
1313653
public function hPrintFooter() {
	    $wt_tree = Globals::getTree();
	    $html = '';
	    if($this->getSetting('MAJ_DISPLAY_CNIL', 0) == 1){
	        $html .= '<br/>';
	        $html .= '<div class="center">';
	        $cnil_ref = $this->getSetting('MAJ_CNIL_REFERENCE', '');
	        if($cnil_ref != ''){
	            $html .= I18N::translate('This site has been notified to the French National Commission for Data protection (CNIL) and registered under number %s. ', $cnil_ref);
	        }
	        $html .= I18N::translate('In accordance with the French Data protection Act (<em>Loi Informatique et Libertés</em>) of January 6th, 1978, you have the right to access, modify, rectify and delete personal information that pertains to you. To exercice this right, please contact %s, and provide your name, address and a proof of your identity.',
	            Theme::theme()->contactLink(User::find($wt_tree->getPreference('WEBMASTER_USER_ID'))));
	        $html .= '</div>';
	    }
	    
	    if($this->getSetting('MAJ_ADD_HTML_FOOTER', 0) == 1){
	        if(Auth::accessLevel($wt_tree) >= $this->getSetting('MAJ_SHOW_HTML_FOOTER', Auth::PRIV_HIDE)  && !Filter::getBool('nofooter')){
	            $html .= $this->getSetting('MAJ_HTML_FOOTER', '');
	        }
	    }
	    return $html;
	}
1117067
public function displayMyInterest(){
		$auth = new archiAuthentification();
		if($auth->estConnecte()){
			
		
			$html ="";
			$formulaire = new formGenerator();
			$utils = new archiUtils();
			$ajax = new ajaxObject();
			$html.=$ajax->getAjaxFunctions();
	
			$t = new Template($this->getCheminPhysique().$this->cheminTemplates."interest/");
			$t->set_filenames(array('myinterests'=>'myinterests.tpl'));
	
	
			$a = new archiAdresse();
	
			//Generate address form
			$formParam = array(
					'afficheNombreResultat' => 1,
					'modeAffichage_rue'=>1,
					'modeAffichage_sousQuartier'=>1,
					'modeAffichage_quartier'=>1,
					'modeAffichage_ville'=>1,
					'modeAffichage_pays='>1
			);
			
			$formAddressAddInterest=$a->afficheChoixAdresse(array('afficheNombreResultat' => 1,'affichageInteret'=>1));
			$paramsFields= array();
			$paramsFields[] = array('table' => 'pays' ,'value' => 'idPays','title'=>'nom');
			$paramsFields[] = array('table' => 'ville' ,'value' => 'idVille','title'=>'nom');
			$paramsFields[] = array('table' => 'quartier' ,'value' => 'idQuartier','title'=>'nom');
			$paramsFields[] = array('table' => 'sousQuartier' ,'value' => 'idSousQuartier','title'=>'nom');
			$paramsFields[] = array('table' => 'rue' ,'value' => 'idRue','title'=>'nom');
	
	
	
			$formActionUrl = $this->creerUrl('','saveInterest',array());
	
			foreach ($paramsFields as $params){
				$options[] = $this->getAllField($params);
			}
	
	
			$paramsRequest[]=array('table'=> '_interetRue','field' =>'idRue' , 'associateTable' => 'rue');
			$paramsRequest[]=array('table'=> '_interetSousQuartier','field' =>'idSousQuartier', 'associateTable' => 'sousQuartier');
			$paramsRequest[]=array('table'=> '_interetQuartier','field' =>'idQuartier', 'associateTable' => 'quartier');
			$paramsRequest[]=array('table'=> '_interetVille','field' =>'idVille', 'associateTable' => 'ville');
			$paramsRequest[]=array('table'=> '_interetPays','field' =>'idPays', 'associateTable' => 'pays');
	
			$userInterest = $this->getAllInterest($paramsRequest);
			/*
			 * Array of EVERY interest  by categories : street country address etc..
			 */
			foreach ($userInterest as $interestByCat){
				if(!isset($interestByCat[0]['vide'])){
					$t->assign_block_vars('interestList',array('title'=>'Liste des '.$interestByCat[0]['titre'].' dans les centres d\'intérêt','CSSclass'=>'interestList'));
					/*
					 * Interest of each category
					 */
					foreach ($interestByCat as $interest){
						/*
						 * Process fields for delete link
						 */
						$table = $interest['table'];
						$fieldId = $interest['field'];
						$userId = $interest['idUtilisateur'];
						$interestId = $interest[$fieldId];
						
						
						$paramsDelete = array(
							$table,
							$fieldId,
							$userId,
							$interestId
						);
						
						$deleteUrl = $this->creerUrl('', 'deleteInterest', array('params' => $paramsDelete));
						switch ($interest['associateTable']){
							case 'personne':
								$t->assign_block_vars('interestList.interests',array(
								'name'=>$interest['nom']." ".$interest['prenom'],
								'deleteUrl' => $deleteUrl
								));
								break;
							default:
								$t->assign_block_vars('interestList.interests',array(
								'name'=>$interest['nom'],
								'deleteUrl' => $deleteUrl
								));
						}
					}
				}
				else{
					$t->assign_block_vars('interestList',array('vide'=>'Aucun résultat','title'=>'Liste des '.$interestByCat[0]['titre'].' dans les centres d\'intérêt','CSSclass'=>'interestList'));
				}
					
			}
	
			$t->assign_vars(array(
					'formAddInterest' => $formAddressAddInterest,
					'formActionUrl' => $formActionUrl,
					'nameForm'=>'saveInterest'
			));
	
			ob_start();
			$t->pparse('myinterests');
			$html .= ob_get_contents();
			ob_end_clean();
		return $html;
		}
		else{
			$this->messages->addError("Veuillez vous connecter pour personnaliser votre flux");
			$this->messages->display();
			$auth = new ArchiAuthentification();
			return $auth->afficheFormulaireAuthentification();
		}
	}
1122163
protected function getInput() {

        @set_time_limit(120);
        @ini_set('max_execution_time', 120);

        // Initialisation.
        $html = array();
        $text = $this->getText();

        // JS
        (new RequireJSUtility())
            ->addDomReadyJS("$('[data-toggle=\"tooltip\"], .hasTooltip').tooltip({container:'body',html:true});", false, "bootstrap");

        if (!empty($this->value)) {
            $value = new Registry($this->value);
        }

        $class = $this->element['class'] ? ' ' . (string)$this->element['class'] : '';

        // On récupère l'instance de gestion ACL.
        $acl    = Acl::getInstance($this->form->getDb());
	    $simple = $acl->getSimpleAcl();

        // On récupère les sections et les actions.
        $actions = $this->getActions();

        // On charge les groupes utilisateurs.
        $groups = $this->getUserGroups();

	    // On charge les rôles.
	    $roles = $acl->getRoles();

        // Building tab nav
        $html[] = '<div role="tabpanel" class="nav-tabs-left">';

        $html[] = '<ul class="nav nav-tabs" role="tablist">';

        foreach ($groups as $i => $group) {
            $tab_class = $i == 0 ? ' class="active"' : '';
            $html[] = '<li role="presentation"' . $tab_class . '><a href="#group-' . $group->id . '" aria-controls="group-' . $group->id . '" role="tab" data-toggle="tab">';
            $html[] = str_repeat('<span class="level">&ndash;</span> ', $curLevel = $group->level) . $group->title;
            $html[] = '</a></li>';
        }

        $html[] = '</ul>';
        $html[] = '<div class="tab-content">';

        foreach ($groups as $i => $group) {

            $tab_class = $i == 0 ? ' active' : '';

            $html[] = '<div role="tabpanel" class="tab-pane' . $tab_class .'" id="group-' . $group->id . '">';

            $html[] = '<table class="rights table table-condensed' . $class . '">';

            $html[] = '<thead>';
            $html[] = '<tr>';
            $html[] = '<th>' . $text->translate('APP_GLOBAL_RIGHTS_HEADING_SECTION') . '</th>';
            $html[] = '<th>' . $text->translate('APP_GLOBAL_RIGHTS_HEADING_ACTION') . '</th>';
            $html[] = '<th>' . $text->translate('APP_GLOBAL_RIGHTS_HEADING_RIGHT') . '</th>';

            if ($group->parent_id) {
                $html[] = '<th id="aclactionth' . $group->id . '">';
                $html[] = '<span class="acl-action">' . $text->translate('APP_GLOBAL_RIGHTS_HEADING_CALCULATED_SETTING') . '</span>';
                $html[] = '</th>';
            }

            $html[] = '</tr>';
            $html[] = '</thead>';

            $html[] = '<tbody>';

            // On parcourt les sections.
            foreach ($actions as $section) {

                $rowspan = count($section->actions);

                foreach ($section->actions as $i => $action) {

                    $html[] = '<tr>';

                    if ($i == 0) {
                        $html[] = '<td class="section" rowspan="' . $rowspan . '"><span class="hasTooltip" title="' . $text->translate($section->description) . '">' . $text->translate($section->title) . '</td>';
                    }

                    $html[] = '<td class="action"><span class="hasTooltip" title="' . $text->translate($action->description) . '">' . $text->translate($action->title) . '</td>';
                    $html[] = '<td class="right">';

                    $html[] = '<select class="form-control input-sm"'
                        . ' name="' . $this->name . '[' . $section->name . '][' . $action->name . '][' . $group->id . ']"'
                        . ' id="' . $this->id . '_' . $section->name . '_' . $action->name	. '_' . $group->id . '"'
                        . ' title="' . $text->sprintf('APP_GLOBAL_RIGHTS_SELECT_ALLOW_DENY_GROUP', $text->translate($action->title), trim($group->title)) . '">';

                    // On récupère les droits pour l'action hérités pour le groupe.
                    $inheritedRule = $acl->checkGroup($group->id, $section->name, $action->name);

                    // On récupère les droits pour l'action NON HÉRITÉS pour le groupe.
                    $assetRule = null;

	                $groups = new RoleAggregate();
	                $groups->addRole($roles[$group->id]);
                    $res = $simple->isAllowedReturnResult($groups, $section->name, $action->name)->collection;

                    if ($res->count() > 0) {
                        $res->top();
                        while($res->valid()) {
                            $priority = $res->current()->getPriority();

                            // La règle est appliqué à ce groupe en particulier si la priorité est à zero.
                            if ($priority == 0) {
                                $assetRule = $res->current()->getAction();
                            }

                            $res->next();
                        }
                    }

                    // Build the dropdowns for the permissions sliders

                    // The parent group has "Not Set", all children can rightly "Inherit" from that.
                    $html[] = '<option value=""' . ($assetRule === null ? ' selected="selected"' : '') . '>'
                        . $text->translate(empty($group->parent_id) ? 'APP_GLOBAL_RIGHTS_NOT_SET' : 'APP_GLOBAL_RIGHTS_INHERITED') . '</option>';
                    $html[] = '<option value="1"' . ($assetRule === true ? ' selected="selected"' : '') . '>' . $text->translate('APP_GLOBAL_RIGHTS_ALLOWED')
                        . '</option>';
                    $html[] = '<option value="0"' . ($assetRule === false ? ' selected="selected"' : '') . '>' . $text->translate('APP_GLOBAL_RIGHTS_DENIED')
                        . '</option>';

                    $html[] = '</select>&#160; ';

                    // If this asset's rule is allowed, but the inherited rule is deny, we have a conflict.
                    if (($assetRule === true) && ($inheritedRule === false)) {
                        $html[] = $text->translate('APP_GLOBAL_RIGHTS_CONFLICT');
                    }

                    $html[] = '</td>';

                    // Build the Calculated Settings column.
                    // The inherited settings column is not displayed for the root group in global configuration.
                    if ($group->parent_id) {

                        $html[] = '<td headers="aclactionth' . $group->id . '">';

                        // This is where we show the current effective settings considering currrent group, path and cascade.
                        // Check whether this is a component or global. Change the text slightly.

                        if ($acl->checkGroup($group->id, "app", "admin") !== true) {

                            if ($inheritedRule === true) {
                                $html[] = '<span class="label label-success">' . $text->translate('APP_GLOBAL_RIGHTS_ALLOWED') . '</span>';
                            } elseif ($inheritedRule === false) {
                                $html[] = '<span class="label label-danger">' . $text->translate('APP_GLOBAL_RIGHTS_NOT_ALLOWED') . '</span>';
                            }

                        } elseif ($section->name != 'app') {
                                $html[] = '<span class="label label-success"><i class="fa fa-lock"></i> ' . $text->translate('APP_GLOBAL_RIGHTS_ALLOWED_ADMIN')
                                    . '</span>';
                        } else {

                            // Special handling for  groups that have global admin because they can't  be denied.
                            // The admin rights can be changed.

                            if ($section->name === 'app' && $action->name === 'admin') {
                                $html[] = '<span class="label label-success">' . $text->translate('APP_GLOBAL_RIGHTS_ALLOWED') . '</span>';
                            } elseif ($inheritedRule === false) {
                                // Other actions cannot be changed.
                                $html[] = '<span class="label label-danger"><i class="fa fa-lock"></i> '
                                    . $text->translate('APP_GLOBAL_RIGHTS_NOT_ALLOWED_ADMIN_CONFLICT') . '</span>';
                            } else {
                                $html[] = '<span class="label label-success"><i class="fa fa-lock"></i> ' . $text->translate('APP_GLOBAL_RIGHTS_ALLOWED_ADMIN')
                                    . '</span>';
                            }
                        }

                        $html[] = '</td>';
                    }

                    $html[] = '</tr>';

                }

            }


            $html[] = '';
            $html[] = '';
            $html[] = '';
            $html[] = '</tbody>';

            $html[] = '</table>';

            $html[] = '</div>';

        }

        $html[] = '</div>';
        $html[] = '</div>';

        return implode($html);

    }
1370483
public function display()
    {
        if (!$this->isVisible())
            return "";

        $content = \mpf\web\helpers\Html::get()->tag('span', $this->getIcon() . $this->translate($this->label), $this->labelHtmlOptions);
        $submenu = "";
        if (count($this->items)) {
            $this->htmlOptions['class'] = (isset($this->htmlOptions['class']) ? $this->htmlOptions['class'] . ' ' : '') . 'm-menu-dropdown';
            $anySelected = false;
            $anyVisible = false;
            foreach ($this->items as $item) {
                /* @var $item Label */
                $submenu .= $item->display();
                $anySelected = $anySelected || $item->isSelected();
                $anyVisible = $anyVisible || $item->isVisible();
            }
            if ($anyVisible)
                $submenu = \mpf\web\helpers\Html::get()->tag('ul', $submenu);
            else
                $submenu = "";
            if ($anySelected) {
                if (isset($this->htmlOptions['class'])) {
                    $this->htmlOptions['class'] .= ' selected';
                } else {
                    $this->htmlOptions['class'] = 'selected';
                }
            }
        }
        return \mpf\web\helpers\Html::get()->tag('li', $content . $submenu, $this->htmlOptions);
    }
1221979
public function getHtmlFromAdresses()
    {
        $html="<div id='".$this->googleMapNameId."' style='width: ".$this->googleMapWidth."px; height: ".$this->googleMapHeight."px;'>Veuilliez patienter pendant le chargement de la carte...</div>";

        $html.="<script  >";

        if (count($this->coordonnees)>0) {
            foreach ($this->coordonnees as $indice => $value) {
                if (isset($value['link'])) {
                    $html.="tabAdresses[".$indice."]=\"".$value['link']."\";\n";
                }
            }
        }

        $html.="</script>";
        //$html.="<div id='".$this->googleMapNameId."' style='width: ".$this->googleMapWidth."px; height: ".$this->googleMapHeight."px;'>Veuilliez patienter pendant le chargement de la carte...</div>";

        if ($this->debugMode)
            $displayDebug='block';
        else
            $displayDebug='none';

        //$html.="<div style='width:500px; height:300px;overflow:scroll;display:".$displayDebug.";' id='debugGoogleMap'></div>";
        $html.="<script>load();</script>";

        // fonction appelant les affichages de coordonnées ,  appels regroupées dans une fonction qui groupe les coordonnées par paquet ,  afin de ne pas trop en envoyer a la fois
        if (count($this->coordonnees)>0) {
            $html.="<script>";
            $html.="var numPaquet=0;\n";
            $html.="var timer;\n";
            $html.="startTimerPaquets();\n";
            $html.="function startTimerPaquets()\n";
            $html.="{";
            $html.="afficheCoordonneesParPaquets();\n";
            $html.="timer = setInterval(\"afficheCoordonneesParPaquets()\", ".$this->setTimeOutPaquets.");\n";
            $html.="}\n";

            $html.="function afficheCoordonneesParPaquets(){\n";
            $i=0;
            $numPaquet = 0;
            foreach ($this->coordonnees as $indice => $value) {
                $image = ", \"https://www.google.com/mapfiles/marker.png\"";//
                if (isset($value['imageFlag']) && $value['imageFlag']!='') {
                    $image = ", \"".$value['imageFlag']."\"";
                }

                if ($i%10==0) {
                    $html.="if (numPaquet==".$numPaquet.")\n";
                    $html.="{\n";
                    $iDebut = $i;
                }

                $html.=" getCoordonnees(\"".$value['adresse']."\", ".$indice." ".$image.");\n";

                if ($i==$iDebut+9 || $i==count($this->coordonnees)-1 ) {
                    $html.="}\n";
                    $numPaquet++;
                }
                $i++;
            }


            $html.="if (numPaquet>".$numPaquet.")\n";
            $html.="{\n";
            $html.="clearInterval(timer);\n";
            $html.="}\n";
            $html.="numPaquet++;\n";
            $html.="}\n";
            $html.="</script>";
        }



        if ($this->debugMode)
            $displayDebug='block';
        else
            $displayDebug='none';

        $html.="<div style='width:500px; height:300px;overflow:scroll;display:".$displayDebug.";' id='debugGoogleMap'></div>";
        return $html;
    }
292714
public function getHTML()
    {

            $html="<div id='".$this->googleMapNameId."' style='width: ".$this->googleMapWidth."px; height: ".$this->googleMapHeight."px; ".$this->divStyle."'>Veuilliez patienter pendant le chargement de la carte...</div>";

        //$html.="<script  >";
        /*
        if (count($this->coordonnees)>0) {
            foreach ($this->coordonnees as $indice => $value) {
                if (isset($value['link'])) {
                    $html.="tabAdresses[".$indice."]=\"".$value['link']."\";\n";
                }
            }
        }

        $html.="</script>";
        $html.="<div id='".$this->googleMapNameId."' style='width: ".$this->googleMapWidth."px; height: ".$this->googleMapHeight."px;'>Veuilliez patienter pendant le chargement de la carte...</div>";

        if ($this->debugMode)
            $displayDebug='block';
        else
            $displayDebug='none';

        $html.="<div style='width:500px; height:300px;overflow:scroll;display:".$displayDebug.";' id='debugGoogleMap'></div>";
        $html.="<script  >load();</script>";

        // fonction appelant les affichages de coordonnées ,  appels regroupées dans une fonction qui groupe les coordonnées par paquet ,  afin de ne pas trop en envoyer a la fois
        if (count($this->coordonnees)>0) {
            $html.="<script  >";
            $html.="var numPaquet=0;\n";
            $html.="var timer;\n";
            $html.="startTimerPaquets();\n";
            $html.="function startTimerPaquets()\n";
            $html.="{";
            $html.="afficheCoordonneesParPaquets();\n";
            $html.="timer = setInterval(\"afficheCoordonneesParPaquets()\", ".$this->setTimeOutPaquets.");\n";
            $html.="}\n";

            $html.="function afficheCoordonneesParPaquets(){\n";
            $i=0;
            $numPaquet = 0;
            foreach ($this->coordonnees as $indice => $value) {
                $image = ", \"http://www.google.com/mapfiles/marker.png\"";//
                if (isset($value['imageFlag']) && $value['imageFlag']!='') {
                    $image = ", \"".$value['imageFlag']."\"";
                }

                if ($i%10==0) {
                    $html.="if (numPaquet==".$numPaquet.")\n";
                    $html.="{\n";
                    $iDebut = $i;
                }

                $html.=" getCoordonnees(\"".$value['adresse']."\", ".$indice." ".$image.");\n";

                if ($i==$iDebut+9 || $i==count($this->coordonnees)-1 ) {
                    $html.="}\n";
                    $numPaquet++;
                }
                $i++;
            }


            $html.="if (numPaquet>".$numPaquet.")\n";
            $html.="{\n";
            $html.="clearInterval(timer);\n";
            $html.="}\n";
            $html.="numPaquet++;\n";
            $html.="}\n";
            $html.="</script>";
        }
        */

        /*
        if ($this->debugMode)
            $displayDebug='block';
        else
            $displayDebug='none';
            */
        //$html.="<div style='width:500px; height:300px;overflow:scroll;display:".$displayDebug.";' id='debugGoogleMap'></div>";
        $html.="<script  >load();</script>";
        $html.="<script  >";
        if (isset($params['urlImageIcon']) && isset($params['pathImageIcon'])) {
            $urlImage = $params['urlImageIcon'];

            list($imageSizeX,  $imageSizeY,  $typeImage,  $attrImage) = getimagesize($params['pathImageIcon']);

            $html.="
                var icon = new GIcon();
                //icon.image = image;


                icon.image = \"$urlImage\";
                //icon.shadow = \"https://labs.google.com/ridefinder/images/mm_20_shadow.png\";
                icon.iconSize = new GSize($imageSizeX,  $imageSizeY);
                icon.shadowSize = new GSize(22,  20);
                icon.iconAnchor = new GPoint(2,  24);
                icon.infoWindowAnchor = new GPoint(5,  1);
                var iconMarker = new GIcon(icon);
            ";
        } else {
            $html.="
                var icon = new GIcon();
                //icon.image = image;
                var iconMarker = new GIcon(icon);

                icon.image = \"https://labs.google.com/ridefinder/images/mm_20_red.png\";
                //icon.shadow = \"https://labs.google.com/ridefinder/images/mm_20_shadow.png\";
                icon.iconSize = new GSize(30,  24);
                icon.shadowSize = new GSize(22,  20);
                icon.iconAnchor = new GPoint(2,  24);
                icon.infoWindowAnchor = new GPoint(5,  1);
            ";
        }
        $html.="</script>";

        if (isset($params['listeCoordonnees'])) {
            $html.="<script  >";
            foreach ($params['listeCoordonnees'] as $indice => $values) {
                $html.="

                    point$indice = new GLatLng(".$values['latitude'].", ".$values['longitude'].");
                    marker$indice = new GMarker(point$indice, iconMarker);
                    overlay$indice = map.addOverlay(marker$indice);
                    //marker$indice.openInfoWindowHtml(\"".$values['libelle']."\");

                    ";

                if (isset($values['jsCodeOnClickMarker'])) {
                    $html.="
                            function onClickFunction$indice(overlay,  point){".$values['jsCodeOnClickMarker']."}";

                    $html.="GEvent.addListener(marker$indice,  'click',  onClickFunction$indice);";
                }

                if (isset($values['jsCodeOnMouseOverMarker'])) {
                    $html.="function onMouseOverFunction$indice(overlay, point){".$values['jsOnMouseOverMarker']."}";
                    $html.="GEvent.addListener(marker$indice, 'mouseover', onMouseOverFunction$indice);";

                }

                if (isset($values['jsCodeOnMouseOutMarker'])) {
                    $html.="function onMouseOutFunction$indice(overlay, point){".$values['jsCodeOnMouseOutMarker']."}";
                    $html.="GEvent.addListener(marker$indice, 'mouseout', onMouseOutFunction$indice);";

                }

            }
            $html.="</script>";
        }



        return $html;
    }