477,10 → 477,10 |
|
$mime = new Mail_mime($crlf); |
|
$requete = 'select *, '.INS_CHAMPS_LABEL_PAYS.' from '.INS_ANNUAIRE.','.INS_TABLE_PAYS.', annuaire_LABEL_ACT, annuaire_LABEL_NIV, annuaire_LABEL_ASS'. |
' where '.INS_CHAMPS_MAIL.'="'.$GLOBALS['AUTH']->getUsername().'"'. |
' and '.INS_CHAMPS_ID_PAYS.'='.INS_CHAMPS_PAYS. |
' and U_ACT=ID_LABEL_ACT and U_NIV=ID_LABEL_NIV and U_ASS=ID_LABEL_ASS' ; |
$requete = 'SELECT *, '.INS_CHAMPS_LABEL_PAYS.' from '.INS_ANNUAIRE.','.INS_TABLE_PAYS.', annuaire_LABEL_ACT, annuaire_LABEL_NIV, annuaire_LABEL_ASS'. |
' WHERE '.INS_CHAMPS_MAIL.'="'.$GLOBALS['AUTH']->getUsername().'"'. |
' AND '.INS_CHAMPS_ID_PAYS.'='.INS_CHAMPS_PAYS. |
' AND U_ACT=ID_LABEL_ACT and U_NIV=ID_LABEL_NIV and U_ASS=ID_LABEL_ASS' ; |
|
$resultat = $GLOBALS['ins_db']->query($requete) ; |
if (DB::isError ($resultat)) { |
514,18 → 514,15 |
$body = $mime->get(); |
$headers = $mime->headers($headers); |
|
$mail = & Mail::factory ('mail') ; |
$mail =& Mail::factory('mail') ; |
$mail->send($ligne[INS_CHAMPS_MAIL], $headers, $body) ; |
|
$mail -> send ($ligne[INS_CHAMPS_MAIL], $headers, $body) ; |
|
// Envoi du mail aux administrateur du site |
foreach ($GLOBALS['mail_admin'] as $administrateur) { |
$mail -> send ($administrateur, $headers, $body) ; |
if ($ligne[INS_CHAMPS_MAIL] != '') { |
foreach ($GLOBALS['mail_admin'] as $administrateur) { |
$mail->send($administrateur, $headers, $body) ; |
} |
} |
if (PEAR::isError ($mail)) { |
echo 'erreur d\'envoi' ; |
return false ; |
} |
return true ; |
} |
|