Rajout de constantes pour la gestion des ML Mailman (inscription direct sans confirmation). rajout de listes sur lesquells suel les cotisants seront inscris a la premiere cotisation. rajout de ces constantes dans la page admin
This commit is contained in:
parent
f97aa9447e
commit
709d3b5b5b
@ -110,7 +110,7 @@ class Adherent
|
||||
$this->cp,
|
||||
$this->ville,
|
||||
$this->pays,
|
||||
$this->email,
|
||||
$this->email,
|
||||
$this->naiss,
|
||||
$this->photo,
|
||||
$this->login,
|
||||
@ -1006,11 +1006,15 @@ class Adherent
|
||||
*
|
||||
*
|
||||
*/
|
||||
Function add_to_mailman()
|
||||
Function add_to_mailman($listes='')
|
||||
{
|
||||
if (defined("MAIN_MAILMAN_URL") && MAIN_MAILMAN_URL != '' && defined("MAIN_MAILMAN_LISTS") && MAIN_MAILMAN_LISTS != '')
|
||||
{
|
||||
$lists=explode(',',MAIN_MAILMAN_LISTS);
|
||||
if ($listes ==''){
|
||||
$lists=explode(',',MAIN_MAILMAN_LISTS);
|
||||
}else{
|
||||
$lists=explode(',',$listes);
|
||||
}
|
||||
foreach ($lists as $list)
|
||||
{
|
||||
// on remplace dans l'url le nom de la liste ainsi
|
||||
@ -1018,12 +1022,16 @@ class Adherent
|
||||
$patterns = array (
|
||||
'/%LISTE%/',
|
||||
'/%EMAIL%/',
|
||||
'/%PASS%/'
|
||||
'/%PASS%/',
|
||||
'/%ADMINPW%/',
|
||||
'/%SERVER%/'
|
||||
);
|
||||
$replace = array (
|
||||
$list,
|
||||
$this->email,
|
||||
$this->pass
|
||||
$this->pass,
|
||||
MAIN_MAILMAN_ADMINPW,
|
||||
MAIN_MAILMAN_SERVER
|
||||
);
|
||||
$curl_url = preg_replace ($patterns, $replace, MAIN_MAILMAN_URL);
|
||||
|
||||
@ -1061,11 +1069,15 @@ class Adherent
|
||||
|
||||
|
||||
|
||||
Function del_to_mailman()
|
||||
Function del_to_mailman($listes='')
|
||||
{
|
||||
if (defined("MAIN_MAILMAN_UNSUB_URL") && MAIN_MAILMAN_UNSUB_URL != '' && defined("MAIN_MAILMAN_LISTS") && MAIN_MAILMAN_LISTS != '')
|
||||
{
|
||||
$lists=explode(',',MAIN_MAILMAN_LISTS);
|
||||
if ($listes==''){
|
||||
$lists=explode(',',MAIN_MAILMAN_LISTS);
|
||||
}else{
|
||||
$lists=explode(',',$listes);
|
||||
}
|
||||
foreach ($lists as $list)
|
||||
{
|
||||
// on remplace dans l'url le nom de la liste ainsi
|
||||
@ -1073,12 +1085,16 @@ class Adherent
|
||||
$patterns = array (
|
||||
'/%LISTE%/',
|
||||
'/%EMAIL%/',
|
||||
'/%PASS%/'
|
||||
'/%PASS%/',
|
||||
'/%ADMINPW%/',
|
||||
'/%SERVER%/'
|
||||
);
|
||||
$replace = array (
|
||||
$list,
|
||||
$this->email,
|
||||
$this->pass
|
||||
$this->pass,
|
||||
MAIN_MAILMAN_ADMINPW,
|
||||
MAIN_MAILMAN_SERVER
|
||||
);
|
||||
$curl_url = preg_replace ($patterns, $replace, MAIN_MAILMAN_UNSUB_URL);
|
||||
|
||||
|
||||
@ -40,6 +40,11 @@ if ($HTTP_POST_VARS["action"] == 'cotisation')
|
||||
|
||||
if ($cotisation > 0)
|
||||
{
|
||||
// rajout du nouveau cotisant dans les listes qui vont bien
|
||||
// if (defined("MAIN_MAILMAN_LISTS_COTISANT") && MAIN_MAILMAN_LISTS_COTISANT!='' && $adh->datefin == "0000-00-00 00:00:00"){
|
||||
if (defined("MAIN_MAILMAN_LISTS_COTISANT") && MAIN_MAILMAN_LISTS_COTISANT!='' && $adh->datefin == 0){
|
||||
$adh->add_to_mailman(MAIN_MAILMAN_LISTS_COTISANT);
|
||||
}
|
||||
$adh->cotisation(mktime(12, 0 , 0, $remonth, $reday, $reyear), $cotisation);
|
||||
if (defined("MAIN_MAIL_COTIS") && defined("MAIN_MAIL_COTIS_SUBJECT")){
|
||||
$adh->send_an_email($adh->email,MAIN_MAIL_COTIS,MAIN_MAIL_COTIS_SUBJECT);
|
||||
|
||||
@ -105,6 +105,9 @@ if (defined("MAIN_USE_MAILMAN") && MAIN_USE_MAILMAN == 1)
|
||||
print '</table>';
|
||||
// Edition des varibales globales rattache au theme Mailman
|
||||
$constantes=array('MAIN_MAILMAN_LISTS',
|
||||
'MAIN_MAILMAN_LISTS_COTISANT',
|
||||
'MAIN_MAILMAN_ADMINPW',
|
||||
'MAIN_MAILMAN_SERVER',
|
||||
'MAIN_MAILMAN_UNSUB_URL',
|
||||
'MAIN_MAILMAN_URL'
|
||||
);
|
||||
|
||||
@ -7,3 +7,8 @@ insert into llx_const(name, value, type, note, visible) values ('ADH_TEXT_NEW_AD
|
||||
insert into llx_const(name, value, type, note, visible) values ('ADH_CARD_HEADER_TEXT','%ANNEE%','string','Texte imprime sur le haut de la carte adherent',0);
|
||||
insert into llx_const(name, value, type, note, visible) values ('ADH_CARD_FOOTER_TEXT','Association FreeLUG http://www.freelug.org/','string','Texte imprime sur le bas de la carte adherent',0);
|
||||
insert into llx_const(name, value, type, note, visible) values ('ADH_CARD_TEXT','%TYPE% n° %ID%\r\n%PRENOM% %NOM%\r\n<%EMAIL%>\r\n%ADRESSE%\r\n%CP% %VILLE%\r\n%PAYS%','texte','Texte imprime sur la carte adherent',0);
|
||||
insert into llx_const(name, value, type, note, visible) values ('MAIN_MAILMAN_ADMINPW','','string','Mot de passe Admin des liste mailman',0);
|
||||
insert into llx_const(name, value, type, note, visible) values ('MAIN_MAILMAN_SERVER','lists.ipsyn.net','string','Serveur hebergeant les interfaces d\'Admin des listes mailman',0);
|
||||
replace into llx_const(name, value, type, note, visible) values ('MAIN_MAILMAN_UNSUB_URL','http://%SERVER%/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%ADMINPW%&user=%EMAIL%','chaine','Url de desinscription aux listes mailman',0);
|
||||
replace into llx_const(name, value, type, note, visible) values ('MAIN_MAILMAN_URL','http://%SERVER%/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%ADMINPW%&send_welcome_msg_to_this_batch=1&subscribees=%EMAIL%','chaine','url pour les inscriptions mailman',0);
|
||||
insert into llx_const(name, value, type, note, visible) values ('MAIN_MAILMAN_LISTS_COTISANT','','string','Liste(s) auxquelles les nouveaux cotisants sont inscris automatiquement',0);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user