$liste['CEPMIN'] = ".......... Cocep-mines"; $reqInstances = "SELECT * FROM sgInstances ORDER BY instance_nom "; $resInstances = $bd->execRequete($reqInstances); print Html3("haut", "Instances - membres", "../../sg/css/instance.css"); $aujourdhui = date("Y-m-d"); $today = time(); $today = $today - 10 * 24 * 60 * 60; // aujourd'hui - 10 jours * 24h/jour * 60min./h * 60 sec./min. $limiteInferieure = date("Y-m-d", $today); $jour = date("Y-m-d"); if (Verif_usager_unite_edition($PHP_AUTH_USER, "nomi", "maj", $bd)) { // if (strstr(" p486735 p730063 ", $PHP_AUTH_USER)) { print Imprime_titreListe("<a href='http://www.polymtl.ca/archives/membres/instances.php?action=notification'>Notification aux personnes ayant accès aux adresses complètes</a>", ""); } print "<table align='center'>\n"; print "<tr><td align='center'><span style='font-family:Verdana; font-size:8pt;color:black; font-weight:700;'>Liste des instances et date de leur mise à jour sur le site web SG</b><br>(imprimée le " . DateNormale(date("Y-m-d")) . ")<br>cliquez sur l'instance pour afficher la liste des membres<br><br>les instances modifiées dans les <span style='background-color:red; color:white;font-size:11pt; '>10</span> derniers jours sont en <span style='background-color:red; color:white;;font-size:11pt; '>rouge</span><br><br>les instances modifiées <span style='background-color:yellow; color:black;;font-size:11pt; '>aujourd'hui</span> sont en <span style='background-color:yellow; color:black;;font-size:11pt; '>jaune</span></span></td></tr>"; print "<tr><td> </td></tr>\n"; while ($instance = $bd->objetSuivant($resInstances)) { if ($instance->instance_pweb_mem == $jour) { $liste[$instance->instance_id] = '<span style="font-family:Verdana; font-size:9pt; background-color:yellow; color:black; font-weight:700;">' . $instance->instance_pweb_mem . " " . $liste[$instance->instance_id] . "</span>\n"; } elseif ($instance->instance_pweb_mem > $limiteInferieure) { $liste[$instance->instance_id] = '<span style="font-family:Verdana; font-size:9pt; background-color:red; color:white; font-weight:700;">' . $instance->instance_pweb_mem . " " . $liste[$instance->instance_id] . "</span>\n"; } else { if (array_key_exists($instance->instance_id, $liste)) { $liste[$instance->instance_id] = '<span style="font-family:Verdana; font-size:10pt; font-weight:300;">' . $instance->instance_pweb_mem . " " . $liste[$instance->instance_id] . "</span>"; } } } foreach ($liste as $key => $value) { if (trim(substr($value, 10)) != "") { $noLigne++;
$xhtml .= Imprime_titreListe("Liste des membres actifs d'une instance", "titreNavy"); $xhtml .= $f->Get_formulaire(); $xhtml .= "</td></tr></table>\n"; $xhtml .= "</body>\n"; $xhtml .= "</html>"; print $xhtml; if (strstr(" p486735 p301454 ", $PHP_AUTH_USER)) { print Imprime_operation3("<a href='http://www.polymtl.ca/archives/u111/person/majCEPA.php'>regénérer Cocep tous les membres</a><br><br><a href='http://www.polymtl.ca/rensgen/repertoires/instance.php'>pour imprimer les listes mais <b>SANS</b> les adresses complètes et les nos de téléphone</a>"); } } else { $connexion = Connexion(USAGER, PASSE, BASE, SERVEUR); $requete = "SELECT instance_nom, instance_pweb_mem, instance_notes " . " FROM sgInstances " . " WHERE instance_id = '{$instance_id}' "; $resultat2 = ExecRequete($requete, $connexion); $ligne = LigneSuivante($resultat2); $instance = $ligne->instance_nom; $dateMaj = DateNormale($ligne->instance_pweb_mem); $instance_notes = $ligne->instance_notes; switch ($formeDe) { case "membres-postes": $url = "Location: http://www.polymtl.ca/archives/membres/mem_postes.php"; header($url); exit; break; case "courriel": $url = "Location: http://www.polymtl.ca/archives/u111/person/cepaEmail.php?instance_id={$instance_id}"; header($url); exit; break; case "fiches": $impression = 0; $requete = "SELECT * " . " FROM cPerson as cP, sgiPostes as p, sgiAffec as a " . " WHERE a.instance_id = '{$instance_id}' " . " AND a.sgiPoste_id = p.sgiPoste_id " . " AND a.cPerson_id = cP.cPerson_id ";