19,7 → 19,7 |
// | License along with this library; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: inscription.fonct.php,v 1.29 2007-05-25 14:32:17 alexandre_tb Exp $ |
// CVS : $Id: inscription.fonct.php,v 1.30 2007-06-25 09:59:03 alexandre_tb Exp $ |
/** |
* Fonctions du module inscription |
* |
31,7 → 31,7 |
//Autres auteurs : |
*@author Florian Schmitt <florian@ecole-et-nature.org> |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.29 $ $Date: 2007-05-25 14:32:17 $ |
*@version $Revision: 1.30 $ $Date: 2007-06-25 09:59:03 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
104,7 → 104,7 |
* @return string HTML |
*/ |
function AUTH_formulaire_login() { |
require_once PAP_CHEMIN_API_PEAR.'api/pear/HTML/Template/IT.php'; |
require_once PAP_CHEMIN_API_PEAR.'/HTML/Template/IT.php'; |
$tpl = new HTML_Template_IT() ; |
// Le formulaire pour se logguer est dans un template |
// template 1 |
394,15 → 394,15 |
|
function envoie_mail() //A COMPLETER!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
{ |
include_once PAP_CHEMIN_RACINE.'api/pear/Mail/mime.php' ; |
//include_once PAP_CHEMIN_RACINE.'api/pear/Mail/mime.php' ; |
include_once PAP_CHEMIN_RACINE.'api/pear/Mail.php' ; |
$crlf="\n"; |
|
$headers ['From'] = INS_MAIL_ADMIN_APRES_INSCRIPTION ; |
$headers ['Subject'] = INS_MAIL_COORD_SUJET ; |
$headers ['Reply-To'] = INS_MAIL_ADMIN_APRES_INSCRIPTION ; |
$headers ['From'] = $GLOBALS['ins_config']['ic_from_mail_confirmation'] ; |
$headers ['Subject'] = html_entity_decode(INS_MAIL_COORD_SUJET) ; |
$headers ['Reply-To'] = $GLOBALS['ins_config']['ic_from_mail_confirmation'] ; |
|
$mime = new Mail_mime($crlf); |
//$mime = new Mail_mime($crlf); |
|
$requete = "select *, ".INS_CHAMPS_LABEL_PAYS." from ".INS_ANNUAIRE.",".INS_TABLE_PAYS. |
" where ".INS_CHAMPS_MAIL."=\"".$GLOBALS['AUTH']->getUsername()."\"". |
416,29 → 416,28 |
$body_entete = INS_MAIL_COORD_CORPS."\n" ; |
$body = "mail : ".$ligne[INS_CHAMPS_MAIL]."\n" ; |
$body .= "------------------------------------------\n"; |
$body .= INS_NOM.": ".unhtmlentities($ligne[INS_CHAMPS_NOM])." \n" ; |
$body .= INS_PRENOM.' : '.unhtmlentities($ligne[INS_CHAMPS_PRENOM])." \n" ; |
$body .= INS_PAYS." : ".unhtmlentities($ligne[INS_CHAMPS_LABEL_PAYS])." \n" ; |
$body .= INS_NOM.": ".html_entity_decode($ligne[INS_CHAMPS_NOM])." \n" ; |
$body .= INS_PRENOM.' : '.html_entity_decode($ligne[INS_CHAMPS_PRENOM])." \n" ; |
$body .= INS_PAYS." : ".html_entity_decode($ligne[INS_CHAMPS_LABEL_PAYS])." \n" ; |
$body .= "-------------------------------------------\n" ; |
|
$mime->setTXTBody($body); |
$mime->setHTMLBody(info()) ; |
//$mime->setTXTBody($body); |
//$mime->setHTMLBody(info()) ; |
|
$body = $mime->get(); |
$headers = $mime->headers($headers); |
|
//$body = $mime->get(); |
//$headers = $mime->headers($headers); |
$body = html_entity_decode($body); |
$mail = & Mail::factory('mail') ; |
|
$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 (PEAR::isError($mail)) { |
echo 'erreur d\'envoi' ; |
return false ; |
} |
//mail ($ligne[INS_CHAMPS_MAIL], $headers ['Subject'], $body, 'From: '.$GLOBALS['ins_config']['ic_from_mail_confirmation']); |
// Envoi du mail aux administrateur du site |
$body = $body_entete.$body; |
$body = html_entity_decode($body); |
$mails_moderateur = split ('/\n/', $GLOBALS['ins_config']['ic_mail_admin_apres_inscription']); |
foreach ($mails_moderateur as $mail_admin) { |
$mail -> send ($mail_admin, $headers, $body) ; |
} |
return true ; |
} |
|
530,6 → 529,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.29 2007-05-25 14:32:17 alexandre_tb |
* en cours |
* |
* Revision 1.28 2007/04/20 08:39:37 alexandre_tb |
* correction de commentaire |
* |