';
- print '| '.$langs->trans("Description").' | ';
+ print ''.$langs->trans("Description").' | ';
print '';
$text = $langs->trans("Value");
print $form->textwithpicto($text, $helptext, 1, 'help', '', 0, 2, 'idhelptext');
diff --git a/htdocs/core/lib/member.lib.php b/htdocs/core/lib/member.lib.php
index 550ec6ad534..472c040e450 100644
--- a/htdocs/core/lib/member.lib.php
+++ b/htdocs/core/lib/member.lib.php
@@ -100,7 +100,7 @@ function member_prepare_head(Adherent $object)
$head[$h][2] = 'agenda';
$h++;
}
-
+
complete_head_from_modules($conf,$langs,$object,$head,$h,'member','remove');
return $head;
@@ -152,6 +152,11 @@ function member_admin_prepare_head()
$head[$h][2] = 'general';
$h++;
+ $head[$h][0] = DOL_URL_ROOT.'/adherents/admin/adherent_emails.php';
+ $head[$h][1] = $langs->trans("EMails");
+ $head[$h][2] = 'emails';
+ $h++;
+
// Show more tabs from modules
// Entries must be declared in modules descriptor with line
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
@@ -168,9 +173,9 @@ function member_admin_prepare_head()
$head[$h][2] = 'attributes_type';
$h++;
- $head[$h][0] = DOL_URL_ROOT.'/adherents/admin/public.php';
+ $head[$h][0] = DOL_URL_ROOT.'/adherents/admin/website.php';
$head[$h][1] = $langs->trans("BlankSubscriptionForm");
- $head[$h][2] = 'public';
+ $head[$h][2] = 'website';
$h++;
complete_head_from_modules($conf,$langs,'',$head,$h,'member_admin','remove');
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index ce52b74beb6..0ce5a7f1fc0 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -1243,6 +1243,7 @@ MemberMainOptions=Main options
AdherentLoginRequired= Manage a Login for each member
AdherentMailRequired=EMail required to create a new member
MemberSendInformationByMailByDefault=Checkbox to send mail confirmation to members (validation or new subscription) is on by default
+VisitorCanChooseItsPaymentMode=Visitor can choose among available payment modes
##### LDAP setup #####
LDAPSetup=LDAP Setup
LDAPGlobalParameters=Global parameters
diff --git a/htdocs/langs/en_US/members.lang b/htdocs/langs/en_US/members.lang
index 6dca3afbdb3..5e7ad30ec3f 100644
--- a/htdocs/langs/en_US/members.lang
+++ b/htdocs/langs/en_US/members.lang
@@ -87,9 +87,9 @@ ValidateMember=Validate a member
ConfirmValidateMember=Are you sure you want to validate this member?
FollowingLinksArePublic=The following links are open pages not protected by any Dolibarr permission. They are not formated pages, provided as example to show how to list members database.
PublicMemberList=Public member list
-BlankSubscriptionForm=Public auto-subscription form
-BlankSubscriptionFormDesc=Dolibarr can provide you a public URL to allow external visitors to ask to subscribe to the foundation. If an online payment module is enabled, a payment form will also be automatically provided.
-EnablePublicSubscriptionForm=Enable the public auto-subscription form
+BlankSubscriptionForm=Public self-subscription form
+BlankSubscriptionFormDesc=Dolibarr can provide you a public URL/website to allow external visitors to ask to subscribe to the foundation. If an online payment module is enabled, a payment form may also be automatically provided.
+EnablePublicSubscriptionForm=Enable the public website with self-subscription form
ForceMemberType=Force the member type
ExportDataset_member_1=Members and subscriptions
ImportDataset_member_1=Members
diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php
index f174c51cc74..03c44514b01 100644
--- a/htdocs/public/members/new.php
+++ b/htdocs/public/members/new.php
@@ -299,11 +299,39 @@ if ($action == 'add')
if (! empty($conf->global->MEMBER_NEWFORM_PAYONLINE))
{
- if ($conf->global->MEMBER_NEWFORM_PAYONLINE == 'paybox')
+ if ($conf->global->MEMBER_NEWFORM_PAYONLINE == 'all')
+ {
+ $urlback=DOL_MAIN_URL_ROOT.'/public/payment/newpayment.php?from=membernewform&source=membersubscription&ref='.urlencode($adh->ref);
+ if (price2num(GETPOST('amount'))) $urlback.='&amount='.price2num(GETPOST('amount'));
+ if (GETPOST('email')) $urlback.='&email='.urlencode(GETPOST('email'));
+ if (! empty($conf->global->PAYMENT_SECURITY_TOKEN))
+ {
+ if (! empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE))
+ {
+ $urlback.='&securekey='.urlencode(dol_hash($conf->global->PAYMENT_SECURITY_TOKEN . 'membersubscription' . $adh->ref, 2));
+ }
+ else
+ {
+ $urlback.='&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN);
+ }
+ }
+ }
+ else if ($conf->global->MEMBER_NEWFORM_PAYONLINE == 'paybox')
{
$urlback=DOL_MAIN_URL_ROOT.'/public/paybox/newpayment.php?from=membernewform&source=membersubscription&ref='.urlencode($adh->ref);
if (price2num(GETPOST('amount'))) $urlback.='&amount='.price2num(GETPOST('amount'));
if (GETPOST('email')) $urlback.='&email='.urlencode(GETPOST('email'));
+ if (! empty($conf->global->PAYBOX_SECURITY_TOKEN))
+ {
+ if (! empty($conf->global->PAYBOX_SECURITY_TOKEN_UNIQUE))
+ {
+ $urlback.='&securekey='.urlencode(dol_hash($conf->global->PAYBOX_SECURITY_TOKEN . 'membersubscription' . $adh->ref, 2));
+ }
+ else
+ {
+ $urlback.='&securekey='.urlencode($conf->global->PAYBOX_SECURITY_TOKEN);
+ }
+ }
}
else if ($conf->global->MEMBER_NEWFORM_PAYONLINE == 'paypal')
{
diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php
index 161aec10d8f..a423b2b31de 100644
--- a/htdocs/societe/class/societe.class.php
+++ b/htdocs/societe/class/societe.class.php
@@ -1106,17 +1106,18 @@ class Societe extends CommonObject
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as d ON s.fk_departement = d.rowid';
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_typent as te ON s.fk_typent = te.id';
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON s.fk_incoterms = i.rowid';
- if ($rowid) $sql .= ' WHERE s.rowid = '.$rowid;
- else if ($ref) $sql .= " WHERE s.nom = '".$this->db->escape($ref)."' AND s.entity IN (".getEntity($this->element, 1).")";
- else if ($ref_ext) $sql .= " WHERE s.ref_ext = '".$this->db->escape($ref_ext)."' AND s.entity IN (".getEntity($this->element, 1).")";
- else if ($ref_int) $sql .= " WHERE s.ref_int = '".$this->db->escape($ref_int)."' AND s.entity IN (".getEntity($this->element, 1).")";
- else if ($idprof1) $sql .= " WHERE s.siren = '".$this->db->escape($idprof1)."' AND s.entity IN (".getEntity($this->element, 1).")";
- else if ($idprof2) $sql .= " WHERE s.siret = '".$this->db->escape($idprof2)."' AND s.entity IN (".getEntity($this->element, 1).")";
- else if ($idprof3) $sql .= " WHERE s.ape = '".$this->db->escape($idprof3)."' AND s.entity IN (".getEntity($this->element, 1).")";
- else if ($idprof4) $sql .= " WHERE s.idprof4 = '".$this->db->escape($idprof4)."' AND s.entity IN (".getEntity($this->element, 1).")";
- else if ($idprof5) $sql .= " WHERE s.idprof5 = '".$this->db->escape($idprof5)."' AND s.entity IN (".getEntity($this->element, 1).")";
- else if ($idprof6) $sql .= " WHERE s.idprof6 = '".$this->db->escape($idprof6)."' AND s.entity IN (".getEntity($this->element, 1).")";
- else if ($email) $sql .= " WHERE email = '".$this->db->escape($email)."' AND s.entity IN (".getEntity($this->element, 1).")";
+ $sql .= ' WHERE s.entity IN ('.getEntity($this->element, 1).')';
+ if ($rowid) $sql .= ' AND s.rowid = '.$rowid;
+ if ($ref) $sql .= " AND s.nom = '".$this->db->escape($ref)."'";
+ if ($ref_ext) $sql .= " AND s.ref_ext = '".$this->db->escape($ref_ext)."'";
+ if ($ref_int) $sql .= " AND s.ref_int = '".$this->db->escape($ref_int)."'";
+ if ($idprof1) $sql .= " AND s.siren = '".$this->db->escape($idprof1)."'";
+ if ($idprof2) $sql .= " AND s.siret = '".$this->db->escape($idprof2)."'";
+ if ($idprof3) $sql .= " AND s.ape = '".$this->db->escape($idprof3)."'";
+ if ($idprof4) $sql .= " AND s.idprof4 = '".$this->db->escape($idprof4)."'";
+ if ($idprof5) $sql .= " AND s.idprof5 = '".$this->db->escape($idprof5)."'";
+ if ($idprof6) $sql .= " AND s.idprof6 = '".$this->db->escape($idprof6)."'";
+ if ($email) $sql .= " AND email = '".$this->db->escape($email)."'";
$resql=$this->db->query($sql);
if ($resql)
|