chagement du nom des constantes
This commit is contained in:
parent
b7b624d0a8
commit
6c6e35d122
@ -118,8 +118,8 @@ class Adherent
|
|||||||
);
|
);
|
||||||
$texttosend = preg_replace ($patterns, $replace, $text);
|
$texttosend = preg_replace ($patterns, $replace, $text);
|
||||||
$subjectosend = preg_replace ($patterns, $replace, $subject);
|
$subjectosend = preg_replace ($patterns, $replace, $subject);
|
||||||
if (defined('MAIN_MAIL_FROM') && MAIN_MAIL_FROM != ''){
|
if (defined('ADHERENT_MAIL_FROM') && ADHERENT_MAIL_FROM != ''){
|
||||||
return mail($recipients,$subjectosend,$texttosend,"From: ".MAIN_MAIL_FROM."\nReply-To: ".MAIN_MAIL_FROM."\nX-Mailer: PHP/" . phpversion());
|
return mail($recipients,$subjectosend,$texttosend,"From: ".ADHERENT_MAIL_FROM."\nReply-To: ".ADHERENT_MAIL_FROM."\nX-Mailer: PHP/" . phpversion());
|
||||||
}else{
|
}else{
|
||||||
return mail($recipients,$subjectosend,$texttosend);
|
return mail($recipients,$subjectosend,$texttosend);
|
||||||
}
|
}
|
||||||
@ -600,7 +600,7 @@ class Adherent
|
|||||||
{
|
{
|
||||||
$err=0;
|
$err=0;
|
||||||
// mailman
|
// mailman
|
||||||
if (defined("MAIN_USE_MAILMAN") && MAIN_USE_MAILMAN == 1)
|
if (defined("ADHERENT_USE_MAILMAN") && ADHERENT_USE_MAILMAN == 1)
|
||||||
{
|
{
|
||||||
if(!$this->add_to_mailman())
|
if(!$this->add_to_mailman())
|
||||||
{
|
{
|
||||||
@ -609,8 +609,8 @@ class Adherent
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($adht->vote == 'yes' &&
|
if ($adht->vote == 'yes' &&
|
||||||
defined("MAIN_USE_GLASNOST") && MAIN_USE_GLASNOST ==1 &&
|
defined("ADHERENT_USE_GLASNOST") && ADHERENT_USE_GLASNOST ==1 &&
|
||||||
defined("MAIN_USE_GLASNOST_AUTO") && MAIN_USE_GLASNOST_AUTO ==1
|
defined("ADHERENT_USE_GLASNOST_AUTO") && ADHERENT_USE_GLASNOST_AUTO ==1
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if(!$this->add_to_glasnost()){
|
if(!$this->add_to_glasnost()){
|
||||||
@ -618,8 +618,8 @@ class Adherent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
defined("MAIN_USE_SPIP") && MAIN_USE_SPIP ==1 &&
|
defined("ADHERENT_USE_SPIP") && ADHERENT_USE_SPIP ==1 &&
|
||||||
defined("MAIN_USE_SPIP_AUTO") && MAIN_USE_SPIP_AUTO ==1
|
defined("ADHERENT_USE_SPIP_AUTO") && ADHERENT_USE_SPIP_AUTO ==1
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if(!$this->add_to_spip()){
|
if(!$this->add_to_spip()){
|
||||||
@ -643,15 +643,15 @@ class Adherent
|
|||||||
{
|
{
|
||||||
$err=0;
|
$err=0;
|
||||||
// mailman
|
// mailman
|
||||||
if (defined("MAIN_USE_MAILMAN") && MAIN_USE_MAILMAN == 1)
|
if (defined("ADHERENT_USE_MAILMAN") && ADHERENT_USE_MAILMAN == 1)
|
||||||
{
|
{
|
||||||
if(!$this->del_to_mailman()){
|
if(!$this->del_to_mailman()){
|
||||||
$err+=1;
|
$err+=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($adht->vote == 'yes' &&
|
if ($adht->vote == 'yes' &&
|
||||||
defined("MAIN_USE_GLASNOST") && MAIN_USE_GLASNOST ==1 &&
|
defined("ADHERENT_USE_GLASNOST") && ADHERENT_USE_GLASNOST ==1 &&
|
||||||
defined("MAIN_USE_GLASNOST_AUTO") && MAIN_USE_GLASNOST_AUTO ==1
|
defined("ADHERENT_USE_GLASNOST_AUTO") && ADHERENT_USE_GLASNOST_AUTO ==1
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if(!$this->del_to_glasnost()){
|
if(!$this->del_to_glasnost()){
|
||||||
@ -659,8 +659,8 @@ class Adherent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
defined("MAIN_USE_SPIP") && MAIN_USE_SPIP ==1 &&
|
defined("ADHERENT_USE_SPIP") && ADHERENT_USE_SPIP ==1 &&
|
||||||
defined("MAIN_USE_SPIP_AUTO") && MAIN_USE_SPIP_AUTO ==1
|
defined("ADHERENT_USE_SPIP_AUTO") && ADHERENT_USE_SPIP_AUTO ==1
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if(!$this->del_to_spip()){
|
if(!$this->del_to_spip()){
|
||||||
@ -682,17 +682,17 @@ class Adherent
|
|||||||
*/
|
*/
|
||||||
Function add_to_spip()
|
Function add_to_spip()
|
||||||
{
|
{
|
||||||
if (defined("MAIN_USE_SPIP") && MAIN_USE_SPIP ==1 &&
|
if (defined("ADHERENT_USE_SPIP") && ADHERENT_USE_SPIP ==1 &&
|
||||||
defined('MAIN_SPIP_SERVEUR') && MAIN_SPIP_SERVEUR != '' &&
|
defined('ADHERENT_SPIP_SERVEUR') && ADHERENT_SPIP_SERVEUR != '' &&
|
||||||
defined('MAIN_SPIP_USER') && MAIN_SPIP_USER != '' &&
|
defined('ADHERENT_SPIP_USER') && ADHERENT_SPIP_USER != '' &&
|
||||||
defined('MAIN_SPIP_PASS') && MAIN_SPIP_PASS != '' &&
|
defined('ADHERENT_SPIP_PASS') && ADHERENT_SPIP_PASS != '' &&
|
||||||
defined('MAIN_SPIP_DB') && MAIN_SPIP_DB != ''
|
defined('ADHERENT_SPIP_DB') && ADHERENT_SPIP_DB != ''
|
||||||
){
|
){
|
||||||
$mdpass=md5($this->pass);
|
$mdpass=md5($this->pass);
|
||||||
$htpass=crypt($this->pass,initialiser_sel());
|
$htpass=crypt($this->pass,initialiser_sel());
|
||||||
$query = "INSERT INTO spip_auteurs (nom, email, login, pass, htpass, alea_futur, statut) VALUES(\"".$this->prenom." ".$this->nom."\",\"".$this->email."\",\"".$this->login."\",\"$mdpass\",\"$htpass\",FLOOR(32000*RAND()),\"1comite\")";
|
$query = "INSERT INTO spip_auteurs (nom, email, login, pass, htpass, alea_futur, statut) VALUES(\"".$this->prenom." ".$this->nom."\",\"".$this->email."\",\"".$this->login."\",\"$mdpass\",\"$htpass\",FLOOR(32000*RAND()),\"1comite\")";
|
||||||
// $mydb=new Db('mysql',MAIN_SPIP_SERVEUR,MAIN_SPIP_USER,MAIN_SPIP_PASS,MAIN_SPIP_DB);
|
// $mydb=new Db('mysql',ADHERENT_SPIP_SERVEUR,ADHERENT_SPIP_USER,ADHERENT_SPIP_PASS,ADHERENT_SPIP_DB);
|
||||||
$mydb=new DoliDb('mysql',MAIN_SPIP_SERVEUR,MAIN_SPIP_USER,MAIN_SPIP_PASS,MAIN_SPIP_DB);
|
$mydb=new DoliDb('mysql',ADHERENT_SPIP_SERVEUR,ADHERENT_SPIP_USER,ADHERENT_SPIP_PASS,ADHERENT_SPIP_DB);
|
||||||
$result = $mydb->query($query);
|
$result = $mydb->query($query);
|
||||||
|
|
||||||
if ($result)
|
if ($result)
|
||||||
@ -715,14 +715,14 @@ class Adherent
|
|||||||
*/
|
*/
|
||||||
Function del_to_spip()
|
Function del_to_spip()
|
||||||
{
|
{
|
||||||
if (defined("MAIN_USE_SPIP") && MAIN_USE_SPIP ==1 &&
|
if (defined("ADHERENT_USE_SPIP") && ADHERENT_USE_SPIP ==1 &&
|
||||||
defined('MAIN_SPIP_SERVEUR') && MAIN_SPIP_SERVEUR != '' &&
|
defined('ADHERENT_SPIP_SERVEUR') && ADHERENT_SPIP_SERVEUR != '' &&
|
||||||
defined('MAIN_SPIP_USER') && MAIN_SPIP_USER != '' &&
|
defined('ADHERENT_SPIP_USER') && ADHERENT_SPIP_USER != '' &&
|
||||||
defined('MAIN_SPIP_PASS') && MAIN_SPIP_PASS != '' &&
|
defined('ADHERENT_SPIP_PASS') && ADHERENT_SPIP_PASS != '' &&
|
||||||
defined('MAIN_SPIP_DB') && MAIN_SPIP_DB != ''
|
defined('ADHERENT_SPIP_DB') && ADHERENT_SPIP_DB != ''
|
||||||
){
|
){
|
||||||
$query = "DELETE FROM spip_auteurs WHERE login='".$this->login."'";
|
$query = "DELETE FROM spip_auteurs WHERE login='".$this->login."'";
|
||||||
$mydb=new DoliDb('mysql',MAIN_SPIP_SERVEUR,MAIN_SPIP_USER,MAIN_SPIP_PASS,MAIN_SPIP_DB);
|
$mydb=new DoliDb('mysql',ADHERENT_SPIP_SERVEUR,ADHERENT_SPIP_USER,ADHERENT_SPIP_PASS,ADHERENT_SPIP_DB);
|
||||||
$result = $mydb->query($query);
|
$result = $mydb->query($query);
|
||||||
|
|
||||||
if ($result)
|
if ($result)
|
||||||
@ -745,14 +745,14 @@ class Adherent
|
|||||||
*/
|
*/
|
||||||
Function is_in_spip()
|
Function is_in_spip()
|
||||||
{
|
{
|
||||||
if (defined("MAIN_USE_SPIP") && MAIN_USE_SPIP ==1 &&
|
if (defined("ADHERENT_USE_SPIP") && ADHERENT_USE_SPIP ==1 &&
|
||||||
defined('MAIN_SPIP_SERVEUR') && MAIN_SPIP_SERVEUR != '' &&
|
defined('ADHERENT_SPIP_SERVEUR') && ADHERENT_SPIP_SERVEUR != '' &&
|
||||||
defined('MAIN_SPIP_USER') && MAIN_SPIP_USER != '' &&
|
defined('ADHERENT_SPIP_USER') && ADHERENT_SPIP_USER != '' &&
|
||||||
defined('MAIN_SPIP_PASS') && MAIN_SPIP_PASS != '' &&
|
defined('ADHERENT_SPIP_PASS') && ADHERENT_SPIP_PASS != '' &&
|
||||||
defined('MAIN_SPIP_DB') && MAIN_SPIP_DB != ''
|
defined('ADHERENT_SPIP_DB') && ADHERENT_SPIP_DB != ''
|
||||||
){
|
){
|
||||||
$query = "SELECT login FROM spip_auteurs WHERE login='".$this->login."'";
|
$query = "SELECT login FROM spip_auteurs WHERE login='".$this->login."'";
|
||||||
$mydb=new DoliDb('mysql',MAIN_SPIP_SERVEUR,MAIN_SPIP_USER,MAIN_SPIP_PASS,MAIN_SPIP_DB);
|
$mydb=new DoliDb('mysql',ADHERENT_SPIP_SERVEUR,ADHERENT_SPIP_USER,ADHERENT_SPIP_PASS,ADHERENT_SPIP_DB);
|
||||||
$result = $mydb->query($query);
|
$result = $mydb->query($query);
|
||||||
|
|
||||||
if ($result)
|
if ($result)
|
||||||
@ -782,20 +782,20 @@ class Adherent
|
|||||||
*/
|
*/
|
||||||
Function add_to_glasnost()
|
Function add_to_glasnost()
|
||||||
{
|
{
|
||||||
if (defined("MAIN_USE_GLASNOST") && MAIN_USE_GLASNOST ==1 &&
|
if (defined("ADHERENT_USE_GLASNOST") && ADHERENT_USE_GLASNOST ==1 &&
|
||||||
defined('MAIN_GLASNOST_SERVEUR') && MAIN_GLASNOST_SERVEUR != '' &&
|
defined('ADHERENT_GLASNOST_SERVEUR') && ADHERENT_GLASNOST_SERVEUR != '' &&
|
||||||
defined('MAIN_GLASNOST_USER') && MAIN_GLASNOST_USER != '' &&
|
defined('ADHERENT_GLASNOST_USER') && ADHERENT_GLASNOST_USER != '' &&
|
||||||
defined('MAIN_GLASNOST_PASS') && MAIN_GLASNOST_PASS != ''
|
defined('ADHERENT_GLASNOST_PASS') && ADHERENT_GLASNOST_PASS != ''
|
||||||
){
|
){
|
||||||
// application token is not useful here
|
// application token is not useful here
|
||||||
$applicationtoken='';
|
$applicationtoken='';
|
||||||
list($success, $response) =
|
list($success, $response) =
|
||||||
XMLRPC_request(MAIN_GLASNOST_SERVEUR.':8001',
|
XMLRPC_request(ADHERENT_GLASNOST_SERVEUR.':8001',
|
||||||
'/RPC2',
|
'/RPC2',
|
||||||
'callGateway',
|
'callGateway',
|
||||||
array(XMLRPC_prepare("glasnost://".MAIN_GLASNOST_SERVEUR."/authentication"),
|
array(XMLRPC_prepare("glasnost://".ADHERENT_GLASNOST_SERVEUR."/authentication"),
|
||||||
XMLRPC_prepare('getUserIdAndToken'),
|
XMLRPC_prepare('getUserIdAndToken'),
|
||||||
XMLRPC_prepare(array("glasnost://".MAIN_GLASNOST_SERVEUR."/authentication","$applicationtoken",MAIN_GLASNOST_USER,MAIN_GLASNOST_PASS))
|
XMLRPC_prepare(array("glasnost://".ADHERENT_GLASNOST_SERVEUR."/authentication","$applicationtoken",ADHERENT_GLASNOST_USER,ADHERENT_GLASNOST_PASS))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
if ($success){
|
if ($success){
|
||||||
@ -807,13 +807,13 @@ class Adherent
|
|||||||
}
|
}
|
||||||
|
|
||||||
list($success,$response)=
|
list($success,$response)=
|
||||||
XMLRPC_request(MAIN_GLASNOST_SERVEUR.':8001',
|
XMLRPC_request(ADHERENT_GLASNOST_SERVEUR.':8001',
|
||||||
'/RPC2',
|
'/RPC2',
|
||||||
'callGateway',
|
'callGateway',
|
||||||
array(XMLRPC_prepare("glasnost://".MAIN_GLASNOST_SERVEUR."/people"),
|
array(XMLRPC_prepare("glasnost://".ADHERENT_GLASNOST_SERVEUR."/people"),
|
||||||
XMLRPC_prepare('addObject'),
|
XMLRPC_prepare('addObject'),
|
||||||
XMLRPC_prepare(array(
|
XMLRPC_prepare(array(
|
||||||
"glasnost://".MAIN_GLASNOST_SERVEUR."/people",
|
"glasnost://".ADHERENT_GLASNOST_SERVEUR."/people",
|
||||||
"$applicationtoken",
|
"$applicationtoken",
|
||||||
$usertoken,
|
$usertoken,
|
||||||
array(
|
array(
|
||||||
@ -847,20 +847,20 @@ class Adherent
|
|||||||
*/
|
*/
|
||||||
Function del_to_glasnost()
|
Function del_to_glasnost()
|
||||||
{
|
{
|
||||||
if (defined("MAIN_USE_GLASNOST") && MAIN_USE_GLASNOST ==1 &&
|
if (defined("ADHERENT_USE_GLASNOST") && ADHERENT_USE_GLASNOST ==1 &&
|
||||||
defined('MAIN_GLASNOST_SERVEUR') && MAIN_GLASNOST_SERVEUR != '' &&
|
defined('ADHERENT_GLASNOST_SERVEUR') && ADHERENT_GLASNOST_SERVEUR != '' &&
|
||||||
defined('MAIN_GLASNOST_USER') && MAIN_GLASNOST_USER != '' &&
|
defined('ADHERENT_GLASNOST_USER') && ADHERENT_GLASNOST_USER != '' &&
|
||||||
defined('MAIN_GLASNOST_PASS') && MAIN_GLASNOST_PASS != ''
|
defined('ADHERENT_GLASNOST_PASS') && ADHERENT_GLASNOST_PASS != ''
|
||||||
){
|
){
|
||||||
// application token is not useful here
|
// application token is not useful here
|
||||||
$applicationtoken='';
|
$applicationtoken='';
|
||||||
list($success, $response) =
|
list($success, $response) =
|
||||||
XMLRPC_request(MAIN_GLASNOST_SERVEUR.':8001',
|
XMLRPC_request(ADHERENT_GLASNOST_SERVEUR.':8001',
|
||||||
'/RPC2',
|
'/RPC2',
|
||||||
'callGateway',
|
'callGateway',
|
||||||
array(XMLRPC_prepare("glasnost://".MAIN_GLASNOST_SERVEUR."/authentication"),
|
array(XMLRPC_prepare("glasnost://".ADHERENT_GLASNOST_SERVEUR."/authentication"),
|
||||||
XMLRPC_prepare('getUserIdAndToken'),
|
XMLRPC_prepare('getUserIdAndToken'),
|
||||||
XMLRPC_prepare(array("glasnost://".MAIN_GLASNOST_SERVEUR."/authentication","$applicationtoken",MAIN_GLASNOST_USER,MAIN_GLASNOST_PASS))
|
XMLRPC_prepare(array("glasnost://".ADHERENT_GLASNOST_SERVEUR."/authentication","$applicationtoken",ADHERENT_GLASNOST_USER,ADHERENT_GLASNOST_PASS))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
if ($success){
|
if ($success){
|
||||||
@ -871,13 +871,13 @@ class Adherent
|
|||||||
}
|
}
|
||||||
// recuperation du personID
|
// recuperation du personID
|
||||||
list($success,$response)=
|
list($success,$response)=
|
||||||
XMLRPC_request(MAIN_GLASNOST_SERVEUR.':8001',
|
XMLRPC_request(ADHERENT_GLASNOST_SERVEUR.':8001',
|
||||||
'/RPC2',
|
'/RPC2',
|
||||||
'callGateway',
|
'callGateway',
|
||||||
array(XMLRPC_prepare("glasnost://".MAIN_GLASNOST_SERVEUR."/people"),
|
array(XMLRPC_prepare("glasnost://".ADHERENT_GLASNOST_SERVEUR."/people"),
|
||||||
XMLRPC_prepare('getObjectByLogin'),
|
XMLRPC_prepare('getObjectByLogin'),
|
||||||
XMLRPC_prepare(array(
|
XMLRPC_prepare(array(
|
||||||
"glasnost://".MAIN_GLASNOST_SERVEUR."/people",
|
"glasnost://".ADHERENT_GLASNOST_SERVEUR."/people",
|
||||||
"$applicationtoken",
|
"$applicationtoken",
|
||||||
$usertoken,
|
$usertoken,
|
||||||
$this->login
|
$this->login
|
||||||
@ -891,19 +891,19 @@ class Adherent
|
|||||||
$this->errorstr=$response['faultString'];
|
$this->errorstr=$response['faultString'];
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (defined('MAIN_GLASNOST_DEFAULT_GROUPID') && MAIN_GLASNOST_DEFAULT_GROUPID != ''){
|
if (defined('ADHERENT_GLASNOST_DEFAULT_GROUPID') && ADHERENT_GLASNOST_DEFAULT_GROUPID != ''){
|
||||||
// recuperation des personne de ce groupe
|
// recuperation des personne de ce groupe
|
||||||
list($success,$response)=
|
list($success,$response)=
|
||||||
XMLRPC_request(MAIN_GLASNOST_SERVEUR.':8001',
|
XMLRPC_request(ADHERENT_GLASNOST_SERVEUR.':8001',
|
||||||
'/RPC2',
|
'/RPC2',
|
||||||
'callGateway',
|
'callGateway',
|
||||||
array(XMLRPC_prepare("glasnost://".MAIN_GLASNOST_SERVEUR."/groups"),
|
array(XMLRPC_prepare("glasnost://".ADHERENT_GLASNOST_SERVEUR."/groups"),
|
||||||
XMLRPC_prepare('getObject'),
|
XMLRPC_prepare('getObject'),
|
||||||
XMLRPC_prepare(array(
|
XMLRPC_prepare(array(
|
||||||
"glasnost://".MAIN_GLASNOST_SERVEUR."/groups",
|
"glasnost://".ADHERENT_GLASNOST_SERVEUR."/groups",
|
||||||
"$applicationtoken",
|
"$applicationtoken",
|
||||||
$usertoken,
|
$usertoken,
|
||||||
MAIN_GLASNOST_DEFAULT_GROUPID
|
ADHERENT_GLASNOST_DEFAULT_GROUPID
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -920,13 +920,13 @@ class Adherent
|
|||||||
}
|
}
|
||||||
// suppression du personID
|
// suppression du personID
|
||||||
list($success,$response)=
|
list($success,$response)=
|
||||||
XMLRPC_request(MAIN_GLASNOST_SERVEUR.':8001',
|
XMLRPC_request(ADHERENT_GLASNOST_SERVEUR.':8001',
|
||||||
'/RPC2',
|
'/RPC2',
|
||||||
'callGateway',
|
'callGateway',
|
||||||
array(XMLRPC_prepare("glasnost://".MAIN_GLASNOST_SERVEUR."/people"),
|
array(XMLRPC_prepare("glasnost://".ADHERENT_GLASNOST_SERVEUR."/people"),
|
||||||
XMLRPC_prepare('deleteObject'),
|
XMLRPC_prepare('deleteObject'),
|
||||||
XMLRPC_prepare(array(
|
XMLRPC_prepare(array(
|
||||||
"glasnost://".MAIN_GLASNOST_SERVEUR."/people",
|
"glasnost://".ADHERENT_GLASNOST_SERVEUR."/people",
|
||||||
"$applicationtoken",
|
"$applicationtoken",
|
||||||
$usertoken,
|
$usertoken,
|
||||||
$personid
|
$personid
|
||||||
@ -952,20 +952,20 @@ class Adherent
|
|||||||
*/
|
*/
|
||||||
Function is_in_glasnost()
|
Function is_in_glasnost()
|
||||||
{
|
{
|
||||||
if (defined("MAIN_USE_GLASNOST") && MAIN_USE_GLASNOST ==1 &&
|
if (defined("ADHERENT_USE_GLASNOST") && ADHERENT_USE_GLASNOST ==1 &&
|
||||||
defined('MAIN_GLASNOST_SERVEUR') && MAIN_GLASNOST_SERVEUR != '' &&
|
defined('ADHERENT_GLASNOST_SERVEUR') && ADHERENT_GLASNOST_SERVEUR != '' &&
|
||||||
defined('MAIN_GLASNOST_USER') && MAIN_GLASNOST_USER != '' &&
|
defined('ADHERENT_GLASNOST_USER') && ADHERENT_GLASNOST_USER != '' &&
|
||||||
defined('MAIN_GLASNOST_PASS') && MAIN_GLASNOST_PASS != ''
|
defined('ADHERENT_GLASNOST_PASS') && ADHERENT_GLASNOST_PASS != ''
|
||||||
){
|
){
|
||||||
// application token is not useful here
|
// application token is not useful here
|
||||||
$applicationtoken='';
|
$applicationtoken='';
|
||||||
list($success, $response) =
|
list($success, $response) =
|
||||||
XMLRPC_request(MAIN_GLASNOST_SERVEUR.':8001',
|
XMLRPC_request(ADHERENT_GLASNOST_SERVEUR.':8001',
|
||||||
'/RPC2',
|
'/RPC2',
|
||||||
'callGateway',
|
'callGateway',
|
||||||
array(XMLRPC_prepare("glasnost://".MAIN_GLASNOST_SERVEUR."/authentication"),
|
array(XMLRPC_prepare("glasnost://".ADHERENT_GLASNOST_SERVEUR."/authentication"),
|
||||||
XMLRPC_prepare('getUserIdAndToken'),
|
XMLRPC_prepare('getUserIdAndToken'),
|
||||||
XMLRPC_prepare(array("glasnost://".MAIN_GLASNOST_SERVEUR."/authentication","$applicationtoken",MAIN_GLASNOST_USER,MAIN_GLASNOST_PASS))
|
XMLRPC_prepare(array("glasnost://".ADHERENT_GLASNOST_SERVEUR."/authentication","$applicationtoken",ADHERENT_GLASNOST_USER,ADHERENT_GLASNOST_PASS))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
if ($success){
|
if ($success){
|
||||||
@ -976,13 +976,13 @@ class Adherent
|
|||||||
}
|
}
|
||||||
// recuperation du personID
|
// recuperation du personID
|
||||||
list($success,$response)=
|
list($success,$response)=
|
||||||
XMLRPC_request(MAIN_GLASNOST_SERVEUR.':8001',
|
XMLRPC_request(ADHERENT_GLASNOST_SERVEUR.':8001',
|
||||||
'/RPC2',
|
'/RPC2',
|
||||||
'callGateway',
|
'callGateway',
|
||||||
array(XMLRPC_prepare("glasnost://".MAIN_GLASNOST_SERVEUR."/people"),
|
array(XMLRPC_prepare("glasnost://".ADHERENT_GLASNOST_SERVEUR."/people"),
|
||||||
XMLRPC_prepare('getObjectByLogin'),
|
XMLRPC_prepare('getObjectByLogin'),
|
||||||
XMLRPC_prepare(array(
|
XMLRPC_prepare(array(
|
||||||
"glasnost://".MAIN_GLASNOST_SERVEUR."/people",
|
"glasnost://".ADHERENT_GLASNOST_SERVEUR."/people",
|
||||||
"$applicationtoken",
|
"$applicationtoken",
|
||||||
$usertoken,
|
$usertoken,
|
||||||
$this->login
|
$this->login
|
||||||
@ -1008,10 +1008,10 @@ class Adherent
|
|||||||
*/
|
*/
|
||||||
Function add_to_mailman($listes='')
|
Function add_to_mailman($listes='')
|
||||||
{
|
{
|
||||||
if (defined("MAIN_MAILMAN_URL") && MAIN_MAILMAN_URL != '' && defined("MAIN_MAILMAN_LISTS") && MAIN_MAILMAN_LISTS != '')
|
if (defined("ADHERENT_MAILMAN_URL") && ADHERENT_MAILMAN_URL != '' && defined("ADHERENT_MAILMAN_LISTS") && ADHERENT_MAILMAN_LISTS != '')
|
||||||
{
|
{
|
||||||
if ($listes ==''){
|
if ($listes ==''){
|
||||||
$lists=explode(',',MAIN_MAILMAN_LISTS);
|
$lists=explode(',',ADHERENT_MAILMAN_LISTS);
|
||||||
}else{
|
}else{
|
||||||
$lists=explode(',',$listes);
|
$lists=explode(',',$listes);
|
||||||
}
|
}
|
||||||
@ -1030,10 +1030,10 @@ class Adherent
|
|||||||
$list,
|
$list,
|
||||||
$this->email,
|
$this->email,
|
||||||
$this->pass,
|
$this->pass,
|
||||||
MAIN_MAILMAN_ADMINPW,
|
ADHERENT_MAILMAN_ADMINPW,
|
||||||
MAIN_MAILMAN_SERVER
|
ADHERENT_MAILMAN_SERVER
|
||||||
);
|
);
|
||||||
$curl_url = preg_replace ($patterns, $replace, MAIN_MAILMAN_URL);
|
$curl_url = preg_replace ($patterns, $replace, ADHERENT_MAILMAN_URL);
|
||||||
|
|
||||||
$ch = curl_init();
|
$ch = curl_init();
|
||||||
curl_setopt($ch, CURLOPT_URL,"$curl_url");
|
curl_setopt($ch, CURLOPT_URL,"$curl_url");
|
||||||
@ -1071,10 +1071,10 @@ class Adherent
|
|||||||
|
|
||||||
Function del_to_mailman($listes='')
|
Function del_to_mailman($listes='')
|
||||||
{
|
{
|
||||||
if (defined("MAIN_MAILMAN_UNSUB_URL") && MAIN_MAILMAN_UNSUB_URL != '' && defined("MAIN_MAILMAN_LISTS") && MAIN_MAILMAN_LISTS != '')
|
if (defined("ADHERENT_MAILMAN_UNSUB_URL") && ADHERENT_MAILMAN_UNSUB_URL != '' && defined("ADHERENT_MAILMAN_LISTS") && ADHERENT_MAILMAN_LISTS != '')
|
||||||
{
|
{
|
||||||
if ($listes==''){
|
if ($listes==''){
|
||||||
$lists=explode(',',MAIN_MAILMAN_LISTS);
|
$lists=explode(',',ADHERENT_MAILMAN_LISTS);
|
||||||
}else{
|
}else{
|
||||||
$lists=explode(',',$listes);
|
$lists=explode(',',$listes);
|
||||||
}
|
}
|
||||||
@ -1093,10 +1093,10 @@ class Adherent
|
|||||||
$list,
|
$list,
|
||||||
$this->email,
|
$this->email,
|
||||||
$this->pass,
|
$this->pass,
|
||||||
MAIN_MAILMAN_ADMINPW,
|
ADHERENT_MAILMAN_ADMINPW,
|
||||||
MAIN_MAILMAN_SERVER
|
ADHERENT_MAILMAN_SERVER
|
||||||
);
|
);
|
||||||
$curl_url = preg_replace ($patterns, $replace, MAIN_MAILMAN_UNSUB_URL);
|
$curl_url = preg_replace ($patterns, $replace, ADHERENT_MAILMAN_UNSUB_URL);
|
||||||
|
|
||||||
$ch = curl_init();
|
$ch = curl_init();
|
||||||
curl_setopt($ch, CURLOPT_URL,"$curl_url");
|
curl_setopt($ch, CURLOPT_URL,"$curl_url");
|
||||||
|
|||||||
@ -41,13 +41,13 @@ if ($HTTP_POST_VARS["action"] == 'cotisation')
|
|||||||
if ($cotisation > 0)
|
if ($cotisation > 0)
|
||||||
{
|
{
|
||||||
// rajout du nouveau cotisant dans les listes qui vont bien
|
// 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("ADHERENT_MAILMAN_LISTS_COTISANT") && ADHERENT_MAILMAN_LISTS_COTISANT!='' && $adh->datefin == "0000-00-00 00:00:00"){
|
||||||
if (defined("MAIN_MAILMAN_LISTS_COTISANT") && MAIN_MAILMAN_LISTS_COTISANT!='' && $adh->datefin == 0){
|
if (defined("ADHERENT_MAILMAN_LISTS_COTISANT") && ADHERENT_MAILMAN_LISTS_COTISANT!='' && $adh->datefin == 0){
|
||||||
$adh->add_to_mailman(MAIN_MAILMAN_LISTS_COTISANT);
|
$adh->add_to_mailman(ADHERENT_MAILMAN_LISTS_COTISANT);
|
||||||
}
|
}
|
||||||
$adh->cotisation(mktime(12, 0 , 0, $remonth, $reday, $reyear), $cotisation);
|
$adh->cotisation(mktime(12, 0 , 0, $remonth, $reday, $reyear), $cotisation);
|
||||||
if (defined("MAIN_MAIL_COTIS") && defined("MAIN_MAIL_COTIS_SUBJECT")){
|
if (defined("ADHERENT_MAIL_COTIS") && defined("ADHERENT_MAIL_COTIS_SUBJECT")){
|
||||||
$adh->send_an_email($adh->email,MAIN_MAIL_COTIS,MAIN_MAIL_COTIS_SUBJECT);
|
$adh->send_an_email($adh->email,ADHERENT_MAIL_COTIS,ADHERENT_MAIL_COTIS_SUBJECT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$action = "edit";
|
$action = "edit";
|
||||||
@ -387,7 +387,7 @@ if ($rowid > 0)
|
|||||||
|
|
||||||
print '<tr><td colspan="3">Valider un adhérent</td></tr>';
|
print '<tr><td colspan="3">Valider un adhérent</td></tr>';
|
||||||
|
|
||||||
print '<tr><td class="valid">Etes-vous sur de vouloir ajouter cet adhérent dans glasnost ? (serveur : '.MAIN_GLASNOST_SERVEUR.')</td><td class="valid">';
|
print '<tr><td class="valid">Etes-vous sur de vouloir ajouter cet adhérent dans glasnost ? (serveur : '.ADHERENT_GLASNOST_SERVEUR.')</td><td class="valid">';
|
||||||
$htmls = new Form($db);
|
$htmls = new Form($db);
|
||||||
|
|
||||||
$htmls->selectyesno("confirm","no");
|
$htmls->selectyesno("confirm","no");
|
||||||
@ -412,7 +412,7 @@ if ($rowid > 0)
|
|||||||
|
|
||||||
print '<tr><td colspan="3">Valider un adhérent</td></tr>';
|
print '<tr><td colspan="3">Valider un adhérent</td></tr>';
|
||||||
|
|
||||||
print '<tr><td class="delete">Etes-vous sur de vouloir effacer cet adhérent de glasnost ? (serveur : '.MAIN_GLASNOST_SERVEUR.')</td><td class="delete">';
|
print '<tr><td class="delete">Etes-vous sur de vouloir effacer cet adhérent de glasnost ? (serveur : '.ADHERENT_GLASNOST_SERVEUR.')</td><td class="delete">';
|
||||||
$htmls = new Form($db);
|
$htmls = new Form($db);
|
||||||
|
|
||||||
$htmls->selectyesno("confirm","no");
|
$htmls->selectyesno("confirm","no");
|
||||||
@ -437,7 +437,7 @@ if ($rowid > 0)
|
|||||||
|
|
||||||
print '<tr><td colspan="3">Valider un adhérent</td></tr>';
|
print '<tr><td colspan="3">Valider un adhérent</td></tr>';
|
||||||
|
|
||||||
print '<tr><td class="valid">Etes-vous sur de vouloir ajouter cet adhérent dans spip ? (serveur : '.MAIN_SPIP_SERVEUR.')</td><td class="valid">';
|
print '<tr><td class="valid">Etes-vous sur de vouloir ajouter cet adhérent dans spip ? (serveur : '.ADHERENT_SPIP_SERVEUR.')</td><td class="valid">';
|
||||||
$htmls = new Form($db);
|
$htmls = new Form($db);
|
||||||
|
|
||||||
$htmls->selectyesno("confirm","no");
|
$htmls->selectyesno("confirm","no");
|
||||||
@ -462,7 +462,7 @@ if ($rowid > 0)
|
|||||||
|
|
||||||
print '<tr><td colspan="3">Valider un adhérent</td></tr>';
|
print '<tr><td colspan="3">Valider un adhérent</td></tr>';
|
||||||
|
|
||||||
print '<tr><td class="delete">Etes-vous sur de vouloir effacer cet adhérent de glasnost ? (serveur : '.MAIN_SPIP_SERVEUR.')</td><td class="delete">';
|
print '<tr><td class="delete">Etes-vous sur de vouloir effacer cet adhérent de glasnost ? (serveur : '.ADHERENT_SPIP_SERVEUR.')</td><td class="delete">';
|
||||||
$htmls = new Form($db);
|
$htmls = new Form($db);
|
||||||
|
|
||||||
$htmls->selectyesno("confirm","no");
|
$htmls->selectyesno("confirm","no");
|
||||||
@ -561,7 +561,7 @@ if ($rowid > 0)
|
|||||||
|
|
||||||
print "</tr><tr class=\"barreBouton\">\n";
|
print "</tr><tr class=\"barreBouton\">\n";
|
||||||
|
|
||||||
if ($adht->vote == 'yes' && defined("MAIN_USE_GLASNOST") && MAIN_USE_GLASNOST ==1){
|
if ($adht->vote == 'yes' && defined("ADHERENT_USE_GLASNOST") && ADHERENT_USE_GLASNOST ==1){
|
||||||
define("XMLRPC_DEBUG", 1);
|
define("XMLRPC_DEBUG", 1);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -590,7 +590,7 @@ if ($rowid > 0)
|
|||||||
print "<td align=\"center\" width=\"25%\" class=\"bouton\">-</td>\n";
|
print "<td align=\"center\" width=\"25%\" class=\"bouton\">-</td>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defined("MAIN_USE_SPIP") && MAIN_USE_SPIP ==1){
|
if (defined("ADHERENT_USE_SPIP") && ADHERENT_USE_SPIP ==1){
|
||||||
/*
|
/*
|
||||||
* Case 3 & 4
|
* Case 3 & 4
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user