new : add adv targt emailing amdin with main feature level 1
This commit is contained in:
parent
e01d9a62bc
commit
22cdbffb0a
@ -60,7 +60,7 @@ if ($action == 'setvalue')
|
|||||||
// Create temporary encryption key if nedded
|
// Create temporary encryption key if nedded
|
||||||
$res=dolibarr_set_const($db, "MAILING_EMAIL_UNSUBSCRIBE_KEY",$checkread_key,'chaine',0,'',$conf->entity);
|
$res=dolibarr_set_const($db, "MAILING_EMAIL_UNSUBSCRIBE_KEY",$checkread_key,'chaine',0,'',$conf->entity);
|
||||||
if (! $res > 0) $error++;
|
if (! $res > 0) $error++;
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
@ -128,6 +128,7 @@ print $langs->trans("MailingDelay").'</td><td>';
|
|||||||
print '<input size="32" type="text" name="MAILING_DELAY" value="'.$conf->global->MAILING_DELAY.'">';
|
print '<input size="32" type="text" name="MAILING_DELAY" value="'.$conf->global->MAILING_DELAY.'">';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|
||||||
// Constant to add salt into the unsubscribe and check read tag.
|
// Constant to add salt into the unsubscribe and check read tag.
|
||||||
// It is also used as a security key parameter.
|
// It is also used as a security key parameter.
|
||||||
|
|
||||||
@ -137,6 +138,13 @@ print '<input size="32" type="text" name="MAILING_EMAIL_UNSUBSCRIBE_KEY" id="MAI
|
|||||||
if (! empty($conf->use_javascript_ajax)) print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token" class="linkobject"');
|
if (! empty($conf->use_javascript_ajax)) print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token" class="linkobject"');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
if (!empty($conf->use_javascript_ajax) && $conf->global->MAIN_FEATURES_LEVEL >=1) {
|
||||||
|
print '<tr class="oddeven"><td>';
|
||||||
|
print $langs->trans("MailAdvTargetRecipients").'</td><td>';
|
||||||
|
print ajax_constantonoff('EMAILING_USE_ADVANCED_SELECTOR');
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|||||||
@ -237,6 +237,7 @@ if ($action == 'add') {
|
|||||||
if (! empty($template_id)) {
|
if (! empty($template_id)) {
|
||||||
$query_temlate_id = '&template_id=' . $template_id;
|
$query_temlate_id = '&template_id=' . $template_id;
|
||||||
}
|
}
|
||||||
|
setEventMessages($langs->trans("XTargetsAdded",$result), null, 'mesgs');
|
||||||
header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $id . $query_temlate_id);
|
header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $id . $query_temlate_id);
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -561,7 +561,7 @@ if ($object->fetch($id) >= 0)
|
|||||||
include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||||
$objectstatic=new Adherent($db);
|
$objectstatic=new Adherent($db);
|
||||||
$objectstatic->fetch($obj->source_id);
|
$objectstatic->fetch($obj->source_id);
|
||||||
print $objectstatic->getNomUrl(2);
|
print $objectstatic->getNomUrl(1);
|
||||||
}
|
}
|
||||||
else if ($obj->source_type == 'user')
|
else if ($obj->source_type == 'user')
|
||||||
{
|
{
|
||||||
@ -569,14 +569,21 @@ if ($object->fetch($id) >= 0)
|
|||||||
$objectstatic=new User($db);
|
$objectstatic=new User($db);
|
||||||
$objectstatic->fetch($obj->source_id);
|
$objectstatic->fetch($obj->source_id);
|
||||||
$objectstatic->id=$obj->source_id;
|
$objectstatic->id=$obj->source_id;
|
||||||
print $objectstatic->getNomUrl(2);
|
print $objectstatic->getNomUrl(1);
|
||||||
}
|
}
|
||||||
else if ($obj->source_type == 'thirdparty')
|
else if ($obj->source_type == 'thirdparty')
|
||||||
{
|
{
|
||||||
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
$objectstatic=new Societe($db);
|
$objectstatic=new Societe($db);
|
||||||
$objectstatic->fetch($obj->source_id);
|
$objectstatic->fetch($obj->source_id);
|
||||||
print $objectstatic->getNomUrl(2);
|
print $objectstatic->getNomUrl(1);
|
||||||
|
}
|
||||||
|
else if ($obj->source_type == 'contact')
|
||||||
|
{
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||||
|
$objectstatic=new Contact($db);
|
||||||
|
$objectstatic->fetch($obj->source_id);
|
||||||
|
print $objectstatic->getNomUrl(1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -293,7 +293,7 @@ class mailing_advthirdparties extends MailingTargets
|
|||||||
} elseif ($type=='contact') {
|
} elseif ($type=='contact') {
|
||||||
$contactstatic=new Contact($this->db);
|
$contactstatic=new Contact($this->db);
|
||||||
$contactstatic->fetch($id);
|
$contactstatic->fetch($id);
|
||||||
return $contactstatic->getNomUrl(0, '', 0, '', -1, 0);
|
return $contactstatic->getNomUrl(0, '', 0, '', -1, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -166,4 +166,4 @@ InGoingEmailSetup=Incoming email setup
|
|||||||
OutGoingEmailSetupForEmailing=Outgoing email setup (for mass emailing)
|
OutGoingEmailSetupForEmailing=Outgoing email setup (for mass emailing)
|
||||||
DefaultOutgoingEmailSetup=Default outgoing email setup
|
DefaultOutgoingEmailSetup=Default outgoing email setup
|
||||||
Information=Information
|
Information=Information
|
||||||
|
ContactsWithThirdpartyFilter=Contact avec filtre client
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user