if (trim($titre) != '') {
                             $titre .= ' - ';
                         }
                     }
                     $messageAutresModif .= "<a href='" . $valueAdresse['url'] . "'>" . $titre . $valueAdresse['libelle'] . "</a><br>" . PHP_EOL;
                     $adressesModifieesAffichees[] = $valueAdresse['idEvenementGroupeAdresse'];
                     $adressesModifieesAffichees = array_unique($adressesModifieesAffichees);
                     $iv3++;
                 }
             }
             $iv3 = 0;
         }
     }
 }
 $messageFin = "<br>L'équipe archi-wiki.org<br>";
 $messageFin .= $config->getMessageDesabonnerAlerteMail();
 $reqNewPeople = "\n                    SELECT pers.idPersonne, pers.nom, pers.prenom\n                    FROM personne pers\n\n                    LEFT JOIN _personneEvenement ae ON ae.idPersonne = pers.idPersonne\n                    LEFT JOIN _evenementEvenement ee ON ee.idEvenement = ae.idEvenement\n                    LEFT JOIN historiqueEvenement he ON he.idEvenement = ae.idEvenement\n\n\n\n                    WHERE he.dateCreationEvenement < {$borneMin}\n                    AND he.dateCreationEvenement >= {$borneMax}\n                    GROUP BY pers.idPersonne,ee.idEvenement\n                    HAVING count(ee.idEvenementAssocie)>0\n                    ORDER BY he.dateCreationEvenement\n            ";
 $resNewPeople = $config->connexionBdd->requete($reqNewPeople);
 $newPeople = array();
 if (mysql_num_rows($resNewPeople) > 0) {
     $messagePeople = "<h4>Nouvelles personnes&nbsp;:</h4>\n        <ul>";
     while ($newPerson = mysql_fetch_object($resNewPeople)) {
         $newPeople[] = $newPerson->idPersonne;
         $messagePeople .= "<li><a href='" . $config->creerUrl("", "evenementListe", array("selection" => "personne", "id" => $newPerson->idPersonne)) . "'>" . $newPerson->prenom . " " . $newPerson->nom . "</a></li>" . PHP_EOL;
     }
     $messagePeople .= "</ul>";
 }
 $reqModPeople = "\n                    SELECT * FROM (\n                        SELECT pers.idPersonne, pers.nom, pers.prenom, he.dateCreationEvenement, ee.idEvenement, ee.idEvenementAssocie, he.idHistoriqueEvenement\n                        FROM personne pers\n\n                        LEFT JOIN _personneEvenement ae ON ae.idPersonne = pers.idPersonne\n                        LEFT JOIN _evenementEvenement ee ON ee.idEvenement = ae.idEvenement\n                        LEFT JOIN historiqueEvenement he ON he.idEvenement = ee.idEvenementAssocie\n\n                        ORDER BY he.idHistoriqueEvenement\n                    ) as people\n\n                    WHERE people.dateCreationEvenement < {$borneMin}\n                    AND people.dateCreationEvenement >= {$borneMax}\n                    GROUP BY people.idPersonne, people.idEvenement\n                    HAVING count(people.idEvenementAssocie)>0\n                    ORDER BY people.dateCreationEvenement\n            ";
 $resModPeople = $config->connexionBdd->requete($reqModPeople);
 $i = 0;
 while ($modPerson = mysql_fetch_object($resModPeople)) {
 }
 foreach ($arrayRegroupementTypeMail as $idUtilisateur => $valueTypeMailRegroupement) {
     $arrayMailsASupprimer = array();
     $message = "<b>Modifications apportées sur le site archi-wiki.org" . "</b><br><br>";
     foreach ($valueTypeMailRegroupement as $idTypeMailRegroupement => $valueMail) {
         // recup de l'intitule de la rubrique de mail regroupee
         $reqIntituleRegroupement = "SELECT intitule FROM typesMailsEnvoiMailsRegroupes" . " WHERE idTypeMail = '" . $idTypeMailRegroupement . "'";
         $resIntituleRegroupement = $config->connexionBdd->requete($reqIntituleRegroupement);
         $fetchIntituleRegroupement = mysql_fetch_assoc($resIntituleRegroupement);
         $message .= "<b>" . $fetchIntituleRegroupement['intitule'] . "</b> : <br>";
         foreach ($valueMail as $indice => $value) {
             $message .= " - <i>" . $d->toFrenchAffichage($value['dateHeure']) . " :</i> " . $value['contenu'] . "<br>";
             $arrayMailsASupprimer[] = $value['idMail'];
         }
     }
     $message .= "<br>" . $config->getMessageDesabonnerAlerteMail();
     // recup du mail de la personne
     $reqMail = "SELECT mail FROM utilisateur WHERE idUtilisateur='" . $idUtilisateur . "'";
     $resMail = $config->connexionBdd->requete($reqMail);
     $fetchMail = mysql_fetch_assoc($resMail);
     $sujet = "archi-wiki.org : Modifications sur le site";
     $mail->sendMail($mail->getSiteMail(), trim($fetchMail['mail']), $sujet, $message, true, null, 'daily.log');
     // Stockage du mail dans les logs
     /*
             $reqStock = "INSERT INTO logMails".
             "(destinataire, sujet, message, date) VALUES ('"
             .trim($fetchMail['mail'])."', \"".mysql_real_escape_string($sujet)."\", \""
             .mysql_real_escape_string($message)."\", now())";
             $resStock = $config->connexionBdd->requete($reqStock);*/
     // On supprime les mail regroupés
     if (count($arrayMailsASupprimer) > 0) {