JE SAIS C'EST LOURD MAIS EST CE QUE QQ SERAI CAPABLE DE M'EXPLIQUER PRECISEMENT CE CODE ?
<?
include "php/lib.php3";
$check = ChkSuperPwd($identification);
if ($check=="OK") {
?>
<HTML>
<HEAD>
<TITLE>CREDOME, Recherche & Innovation Media - ADMINISTRATION</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1">
</HEAD>
<BODY BGCOLOR="LIGHTYELLOW">
<H2 ALIGN="CENTER">Envoi du message aux destinataires suivants</H2>
<blockquote>
<?
$query = "SELECT email FROM contact WHERE password='$identification'";
$resu = pg_exec($conn, $query);
$count = pg_numrows($resu);
if ($count>0) {
$from = pg_result($resu, 0, 0);
}
# Construction du "From"
$head = "From: " . $from . "\n";
#Copie à l'admin
$head = $head . "Cc: info@credome.com\n";
##$head = $head + "Bcc: telachkar@publicis.fr\n";
$query = "SELECT id_contact, email, password, joignable, nom, prenom FROM contact ORDER BY id_contact";
$resu = pg_exec($conn, $query);
$count = pg_numrows($resu);
$i=0;
while ($i<$count) {
$idc = pg_result ($resu, $i, 0);
$emailc = pg_result ($resu, $i, 1);
$pwdc = pg_result ($resu, $i, 2);
$reach = pg_result ($resu, $i, 3);
$nom = pg_result ($resu, $i, 4);
$prenom = pg_result ($resu, $i, 5);
if (($contact[$idc]!="")&&($emailc!="")&&($reach=="O")) {
$mail = $message;
if ($sendpwd!="") {
$mail = $mail . "\n\nVotre mot de passe sur le site Crédome est : $pwdc";
}
if ($subject=="") {
$subject="Site Web Crédome";
}
Mail($emailc,$subject,$mail,$head);
echo "Message envoyé à $prenom $nom<br>";
}
$i++;
}
?>
<center><? include "footer.php3"; ?></center>
</blockquote>
</BODY>
</HTML>
<?
} else {
Header("Location:erreur.php3\n\n");
}
?>