Subversion Repositories Applications.papyrus

Rev

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

Rev 1421 Rev 1467
Line 17... Line 17...
17
// |                                                                                                      |
17
// |                                                                                                      |
18
// | You should have received a copy of the GNU Lesser General Public                                     |
18
// | You should have received a copy of the GNU Lesser General Public                                     |
19
// | License along with this library; if not, write to the Free Software                                  |
19
// | License along with this library; if not, write to the Free Software                                  |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
21
// +------------------------------------------------------------------------------------------------------+
21
// +------------------------------------------------------------------------------------------------------+
22
// CVS : $Id: inscription.fonct.php,v 1.29 2007-05-25 14:32:17 alexandre_tb Exp $
22
// CVS : $Id: inscription.fonct.php,v 1.30 2007-06-25 09:59:03 alexandre_tb Exp $
23
/**
23
/**
24
* Fonctions du module inscription
24
* Fonctions du module inscription
25
*
25
*
26
* Fonctions du module inscription
26
* Fonctions du module inscription
27
*
27
*
Line 29... Line 29...
29
//Auteur original :
29
//Auteur original :
30
*@author        Alexandre Granier <alexandre@tela-botanica.org>
30
*@author        Alexandre Granier <alexandre@tela-botanica.org>
31
//Autres auteurs :
31
//Autres auteurs :
32
*@author        Florian Schmitt <florian@ecole-et-nature.org>
32
*@author        Florian Schmitt <florian@ecole-et-nature.org>
33
*@copyright     Tela-Botanica 2000-2004
33
*@copyright     Tela-Botanica 2000-2004
34
*@version       $Revision: 1.29 $ $Date: 2007-05-25 14:32:17 $
34
*@version       $Revision: 1.30 $ $Date: 2007-06-25 09:59:03 $
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
36
*/
36
*/
Line 37... Line 37...
37
 
37
 
38
// +------------------------------------------------------------------------------------------------------+
38
// +------------------------------------------------------------------------------------------------------+
Line 102... Line 102...
102
*   Renvoie l'accueil de l'inscription
102
*   Renvoie l'accueil de l'inscription
103
*
103
*
104
*   @return string	HTML
104
*   @return string	HTML
105
*/
105
*/
106
function AUTH_formulaire_login() {   
106
function AUTH_formulaire_login() {   
107
    require_once PAP_CHEMIN_API_PEAR.'api/pear/HTML/Template/IT.php';
107
    require_once PAP_CHEMIN_API_PEAR.'/HTML/Template/IT.php';
108
    $tpl = new HTML_Template_IT() ;
108
    $tpl = new HTML_Template_IT() ;
109
    // Le formulaire pour se logguer est dans un template
109
    // Le formulaire pour se logguer est dans un template
110
    // template 1
110
    // template 1
111
    $requete = 'SELECT it_template FROM inscription_template WHERE it_id_template=1'.
111
    $requete = 'SELECT it_template FROM inscription_template WHERE it_id_template=1'.
112
    			' AND it_i18n LIKE "%'.INS_LANGUE_DEFAUT.'"' ;
112
    			' AND it_i18n LIKE "%'.INS_LANGUE_DEFAUT.'"' ;
Line 392... Line 392...
392
 * @return
392
 * @return
393
 */
393
 */
Line 394... Line 394...
394
 
394
 
395
function envoie_mail() //A COMPLETER!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
395
function envoie_mail() //A COMPLETER!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
396
{
396
{
397
    include_once PAP_CHEMIN_RACINE.'api/pear/Mail/mime.php' ;
397
    //include_once PAP_CHEMIN_RACINE.'api/pear/Mail/mime.php' ;
398
    include_once PAP_CHEMIN_RACINE.'api/pear/Mail.php' ;
398
    include_once PAP_CHEMIN_RACINE.'api/pear/Mail.php' ;
Line 399... Line 399...
399
    $crlf="\n";
399
    $crlf="\n";
400
    
400
    
401
    $headers ['From'] = INS_MAIL_ADMIN_APRES_INSCRIPTION ;
401
    $headers ['From'] = $GLOBALS['ins_config']['ic_from_mail_confirmation'] ;
Line 402... Line 402...
402
    $headers ['Subject'] = INS_MAIL_COORD_SUJET ;
402
    $headers ['Subject'] = html_entity_decode(INS_MAIL_COORD_SUJET) ;
Line 403... Line 403...
403
    $headers ['Reply-To'] = INS_MAIL_ADMIN_APRES_INSCRIPTION ;
403
    $headers ['Reply-To'] = $GLOBALS['ins_config']['ic_from_mail_confirmation'] ;
404
    
404
    
405
    $mime = new Mail_mime($crlf);
405
    //$mime = new Mail_mime($crlf);
Line 414... Line 414...
414
    }
414
    }
415
    $ligne  = $resultat->fetchRow(DB_FETCHMODE_ASSOC) ;
415
    $ligne  = $resultat->fetchRow(DB_FETCHMODE_ASSOC) ;
416
    $body_entete = INS_MAIL_COORD_CORPS."\n" ;
416
    $body_entete = INS_MAIL_COORD_CORPS."\n" ;
417
    $body = "mail : ".$ligne[INS_CHAMPS_MAIL]."\n" ;
417
    $body = "mail : ".$ligne[INS_CHAMPS_MAIL]."\n" ;
418
    $body .= "------------------------------------------\n";
418
    $body .= "------------------------------------------\n";
419
    $body .= INS_NOM.": ".unhtmlentities($ligne[INS_CHAMPS_NOM])." \n" ;
419
    $body .= INS_NOM.": ".html_entity_decode($ligne[INS_CHAMPS_NOM])." \n" ;
420
    $body .= INS_PRENOM.' : '.unhtmlentities($ligne[INS_CHAMPS_PRENOM])." \n" ;
420
    $body .= INS_PRENOM.' : '.html_entity_decode($ligne[INS_CHAMPS_PRENOM])." \n" ;
421
    $body .= INS_PAYS." : ".unhtmlentities($ligne[INS_CHAMPS_LABEL_PAYS])." \n" ;
421
    $body .= INS_PAYS." : ".html_entity_decode($ligne[INS_CHAMPS_LABEL_PAYS])." \n" ;
422
    $body .= "-------------------------------------------\n" ;
422
    $body .= "-------------------------------------------\n" ;
Line 423... Line 423...
423
    
423
    
424
    $mime->setTXTBody($body);
424
    //$mime->setTXTBody($body);
425
    $mime->setHTMLBody(info()) ;
-
 
426
    
-
 
427
    $body = $mime->get();
-
 
Line -... Line 425...
-
 
425
    //$mime->setHTMLBody(info()) ;
-
 
426
    
-
 
427
    //$body = $mime->get();
428
    $headers = $mime->headers($headers);
428
    //$headers = $mime->headers($headers);
429
    
-
 
430
    $mail = & Mail::factory('mail') ;
429
    $body = html_entity_decode($body);
Line -... Line 430...
-
 
430
    $mail = & Mail::factory('mail') ;
431
    
431
    $mail -> send ($ligne[INS_CHAMPS_MAIL], $headers, $body) ;
432
    $mail -> send ($ligne[INS_CHAMPS_MAIL], $headers, $body) ;
432
    
433
    
433
    //mail ($ligne[INS_CHAMPS_MAIL], $headers ['Subject'], $body, 'From: '.$GLOBALS['ins_config']['ic_from_mail_confirmation']);
434
        // Envoi du mail aux administrateur du site
-
 
435
    foreach ($GLOBALS['mail_admin'] as $administrateur) {
434
    // Envoi du mail aux administrateur du site
436
        $mail -> send ($administrateur, $headers, $body) ;
435
    $body = $body_entete.$body;
437
    }
436
    $body = html_entity_decode($body);
438
    if (PEAR::isError($mail)) {
437
    $mails_moderateur = split ('/\n/', $GLOBALS['ins_config']['ic_mail_admin_apres_inscription']);
439
        echo 'erreur d\'envoi' ;
438
	foreach ($mails_moderateur as $mail_admin) {
440
        return false ;
439
		$mail -> send ($mail_admin, $headers, $body) ;
Line 441... Line 440...
441
    }
440
	}
Line 528... Line 527...
528
}
527
}
Line 529... Line 528...
529
 
528
 
530
/* +--Fin du code ----------------------------------------------------------------------------------------+
529
/* +--Fin du code ----------------------------------------------------------------------------------------+
531
*
530
*
-
 
531
* $Log: not supported by cvs2svn $
-
 
532
* Revision 1.29  2007-05-25 14:32:17  alexandre_tb
-
 
533
* en cours
532
* $Log: not supported by cvs2svn $
534
*
533
* Revision 1.28  2007/04/20 08:39:37  alexandre_tb
535
* Revision 1.28  2007/04/20 08:39:37  alexandre_tb
534
* correction de commentaire
536
* correction de commentaire
535
*
537
*
536
* Revision 1.27  2007/04/11 08:30:12  neiluj
538
* Revision 1.27  2007/04/11 08:30:12  neiluj