Subversion Repositories Sites.tela-botanica.org

Rev

Rev 188 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 188 Rev 189
Line 475... Line 475...
475
    $headers ['Subject'] = INS_MAIL_COORD_SUJET ;
475
    $headers ['Subject'] = INS_MAIL_COORD_SUJET ;
476
    $headers ['Reply-To'] = INS_MAIL_ADMIN_APRES_INSCRIPTION ;
476
    $headers ['Reply-To'] = INS_MAIL_ADMIN_APRES_INSCRIPTION ;
Line 477... Line 477...
477
    
477
    
Line 478... Line 478...
478
    $mime = new Mail_mime($crlf);
478
    $mime = new Mail_mime($crlf);
479
    
479
    
480
    $requete = 'select *, '.INS_CHAMPS_LABEL_PAYS.' from '.INS_ANNUAIRE.','.INS_TABLE_PAYS.', annuaire_LABEL_ACT, annuaire_LABEL_NIV, annuaire_LABEL_ASS'.
480
    $requete = 	'SELECT *, '.INS_CHAMPS_LABEL_PAYS.' from '.INS_ANNUAIRE.','.INS_TABLE_PAYS.', annuaire_LABEL_ACT, annuaire_LABEL_NIV, annuaire_LABEL_ASS'.
481
            ' where '.INS_CHAMPS_MAIL.'="'.$GLOBALS['AUTH']->getUsername().'"'.
481
            	' WHERE '.INS_CHAMPS_MAIL.'="'.$GLOBALS['AUTH']->getUsername().'"'.
Line 482... Line 482...
482
            ' and '.INS_CHAMPS_ID_PAYS.'='.INS_CHAMPS_PAYS.
482
            	' AND '.INS_CHAMPS_ID_PAYS.'='.INS_CHAMPS_PAYS.
483
            ' and U_ACT=ID_LABEL_ACT and U_NIV=ID_LABEL_NIV and U_ASS=ID_LABEL_ASS' ;
483
            	' AND U_ACT=ID_LABEL_ACT and U_NIV=ID_LABEL_NIV and U_ASS=ID_LABEL_ASS' ;
484
 
484
 
485
    $resultat = $GLOBALS['ins_db']->query($requete) ;
485
    $resultat = $GLOBALS['ins_db']->query($requete) ;
Line 512... Line 512...
512
    $mime->setTXTBody($body);
512
    $mime->setTXTBody($body);
Line 513... Line 513...
513
 
513
 
514
    $body = $mime->get();
514
    $body = $mime->get();
Line 515... Line 515...
515
    $headers = $mime->headers($headers);
515
    $headers = $mime->headers($headers);
516
    
-
 
517
    $mail = & Mail::factory ('mail') ;
516
    
Line 518... Line 517...
518
    
517
    $mail =& Mail::factory('mail') ;
-
 
518
    $mail->send($ligne[INS_CHAMPS_MAIL], $headers, $body) ;
519
    $mail -> send ($ligne[INS_CHAMPS_MAIL], $headers, $body) ;
519
    
520
    
520
    // Envoi du mail aux administrateur du site
521
    // Envoi du mail aux administrateur du site
521
    if ($ligne[INS_CHAMPS_MAIL] != '') {
522
    foreach ($GLOBALS['mail_admin'] as $administrateur) {
-
 
523
        $mail -> send ($administrateur, $headers, $body) ;
-
 
524
    }
-
 
525
    if (PEAR::isError ($mail)) {
522
    	foreach ($GLOBALS['mail_admin'] as $administrateur) {
526
        echo 'erreur d\'envoi' ;
523
        	$mail->send($administrateur, $headers, $body) ;
527
        return false ;
524
    	}
Line 528... Line 525...
528
    }
525
    }