Beispiel #1
0
           -->
          </style
EOD;
print Html3("haut", $action, $css);
if (!isset($instances)) {
    $instances = "cad cex add cco cac cet cre cai cve";
}
$f = new Formulaire("POST", "mem_postes.php", FALSE, "Form");
$f->debutTable(HORIZONTAL);
//		   $instances = "cad cex add cco cac cet cre cai cve";
$f->champTexte("entrez une ou plusieurs instances (séparées par un espace)&nbsp; &nbsp;<a href='http://www.polymtl.ca/archives/membres/instances_adr_c.php' style='color:blue;'>retour à mem</a><br><span style='font-size:smaller; font-weight:normal;'>enlever, ci-dessous, les instances qui ne sont pas nécessaires </span>", instances, $instances, 85, 85);
$f->champValider("mem-postes", "action");
$f->finTable();
$f->fin();
$reqSel = "SELECT cp.nom, " . "           cp.prenom, " . "           ins.instance_id, " . "           pos.sgiPoste_no, " . "           pos.sgiPoste_nom, " . "           aff.date_arrivee, " . "           aff.date_depart " . " FROM   sgiAffec as aff, " . "           sgInstances as ins, " . "           sgiPostes as pos, " . "           cPerson as cp " . " WHERE aff.sgiPoste_id = pos.sgiPoste_id " . "     AND aff.instance_id = ins.instance_id " . "     AND aff.cPerson_id = cp.cPerson_id " . "     AND aff.instance_id = ins.instance_id " . "     AND INSTR('{$instances}', aff.instance_id) " . " ORDER by cp.nom ASC, " . "               cp.prenom, " . "               date_arrivee ASC ";
$resSel = $bd->execRequete($reqSel);
print "<table width='950' border='1' cellpadding='2' cellspacing='0'>";
print "   <tr>";
print "      <th>nom</th>";
print "      <th>prénom</th>";
print "      <th>ins</th>";
print "      <th>no</th>";
print "      <th>poste nom</th>";
print "      <th>début</th>";
print "      <th>fin</th>";
print "   </tr>";
$nomTemp = "xxxxx";
while ($per = $bd->objetSuivant($resSel)) {
    $nomPre = $per->nom . $per->prenom;
    if ($nomPre != $nomTemp) {
        if ($couleur == "#EBEBEB") {
Beispiel #2
0
        $f->champValider("envoyer les courriels", "action");
        $f->champCache(msgFinal, $msgFinal);
        $f->champCache(titreFinal, $titreFinal);
        $f->champCache(instance, $instance);
        $f->finTable();
        $f->fin();
        print "</td></tr></table>\n";
        print Html3("bas");
        break;
    case "envoyer les courriels":
        //----------------------------------------------------
        $organisme = "Archives Polytechnique";
        $emetteur = "*****@*****.**";
        $header = "MIME-Version : 1.0\r\r\n";
        $header .= "Content-type: text/html; charset=iso-8859-1\r\r\n";
        $header .= "From: {$organisme} <{$emetteur}>\r\r\n";
        $msgFinal = stripslashes($msgFinal);
        $titreFinal = stripslashes($titreFinal);
        $bd = new BD(USAGER, PASSE, BASE, SERVEUR);
        $reqMemad = "SELECT * FROM usagers_acces as usa, usagers as us " . " WHERE notif_pv > '0'  " . " AND no_unite LIKE '%memad%' " . " AND us.no_usager = usa.no_usager " . " ORDER BY nomPrenom_usager ";
        $resultat = $bd->execRequete($reqMemad);
        while ($ligne = $bd->objetSuivant($resultat)) {
            $msgFinal2 = $msgFinal . $msgFin;
            mail($ligne->email_usager, $titreFinal, $msgFinal2, $header, "-f {$emetteur}");
        }
        $bd->quitter();
        $url = "Location: http://www.polymtl.ca/archives";
        header($url);
        exit;
        break;
}