Explication de ce code PHP

Fermé
kurp - 23 avril 2001 à 17:41
 rey - 4 févr. 2008 à 20:51
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");
}
?>
A voir également:

3 réponses

Ca a l'air d'un script aui génére un mail de la part de la personne identifiée selon une BDD posgres.
Mais tu veux savoir quoi précisémet ?
0
l'explication de ce code : PHP c'est
Pint Shop Pro
0
code php
0