commit
c0bde3e271
@ -361,21 +361,17 @@ if ($result > 0) {
|
|||||||
foreach($conf->global as $key => $val) {
|
foreach($conf->global as $key => $val) {
|
||||||
if (! preg_match('/^NOTIFICATION_FIXEDEMAIL_(.*)/', $key, $reg)) continue;
|
if (! preg_match('/^NOTIFICATION_FIXEDEMAIL_(.*)/', $key, $reg)) continue;
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
$listtmp=explode(',',$val);
|
$listtmp=explode(',', $val);
|
||||||
$first=1;
|
$first=1;
|
||||||
foreach($listtmp as $keyemail => $valemail)
|
foreach($listtmp as $keyemail => $valemail) {
|
||||||
{
|
|
||||||
if (! $first) print ', ';
|
if (! $first) print ', ';
|
||||||
$first=0;
|
$first=0;
|
||||||
$valemail=trim($valemail);
|
$valemail=trim($valemail);
|
||||||
//print $keyemail.' - '.$valemail.' - '.$reg[1].'<br>';
|
//print $keyemail.' - '.$valemail.' - '.$reg[1].'<br>';
|
||||||
if (isValidEmail($valemail, 1))
|
if (isValidEmail($valemail, 1)) {
|
||||||
{
|
|
||||||
if ($valemail == '__SUPERVISOREMAIL__') print $valemail;
|
if ($valemail == '__SUPERVISOREMAIL__') print $valemail;
|
||||||
else print ' <'.$valemail.'>';
|
else print ' <'.$valemail.'>';
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
print ' '.img_warning().' '.$langs->trans("ErrorBadEMail",$valemail);
|
print ' '.img_warning().' '.$langs->trans("ErrorBadEMail",$valemail);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -385,8 +381,7 @@ if ($result > 0) {
|
|||||||
$notifcodecond=preg_replace('/^.*_(THRESHOLD_)/','$1',$reg[1]);
|
$notifcodecond=preg_replace('/^.*_(THRESHOLD_)/','$1',$reg[1]);
|
||||||
$label=($langs->trans("Notify_".$notifcode)!="Notify_".$notifcode?$langs->trans("Notify_".$notifcode):$notifcode);
|
$label=($langs->trans("Notify_".$notifcode)!="Notify_".$notifcode?$langs->trans("Notify_".$notifcode):$notifcode);
|
||||||
print $label;
|
print $label;
|
||||||
if (preg_match('/^THRESHOLD_HIGHER_(.*)$/',$notifcodecond,$regcond) && ($regcond[1] > 0))
|
if (preg_match('/^THRESHOLD_HIGHER_(.*)$/',$notifcodecond,$regcond) && ($regcond[1] > 0)) {
|
||||||
{
|
|
||||||
print ' - '.$langs->trans("IfAmountHigherThan",$regcond[1]);
|
print ' - '.$langs->trans("IfAmountHigherThan",$regcond[1]);
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -396,9 +391,7 @@ if ($result > 0) {
|
|||||||
print '<td class="right">'.$langs->trans("SeeModuleSetup", $langs->transnoentitiesnoconv("Module600Name")).'</td>';
|
print '<td class="right">'.$langs->trans("SeeModuleSetup", $langs->transnoentitiesnoconv("Module600Name")).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}*/
|
}*/
|
||||||
/*if ($user->admin)
|
/*if ($user->admin) {
|
||||||
{
|
|
||||||
$var = ! $var;
|
|
||||||
print '<tr class="oddeven"><td colspan="4">';
|
print '<tr class="oddeven"><td colspan="4">';
|
||||||
print '+ <a href="'.DOL_URL_ROOT.'/admin/notification.php">'.$langs->trans("SeeModuleSetup", $langs->transnoentitiesnoconv("Module600Name")).'</a>';
|
print '+ <a href="'.DOL_URL_ROOT.'/admin/notification.php">'.$langs->trans("SeeModuleSetup", $langs->transnoentitiesnoconv("Module600Name")).'</a>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -415,7 +408,7 @@ if ($result > 0) {
|
|||||||
|
|
||||||
// List
|
// List
|
||||||
$sql = "SELECT n.rowid, n.daten, n.email, n.objet_type as object_type, n.objet_id as object_id, n.type,";
|
$sql = "SELECT n.rowid, n.daten, n.email, n.objet_type as object_type, n.objet_id as object_id, n.type,";
|
||||||
$sql .= " c.rowid as id, c.lastname, c.firstname, c.email as contactemail,";
|
$sql .= " c.rowid as id, c.lastname, c.firstname, c.email as contactemail, c.statut as status,";
|
||||||
$sql .= " a.code, a.label";
|
$sql .= " a.code, a.label";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."c_action_trigger as a,";
|
$sql .= " FROM ".MAIN_DB_PREFIX."c_action_trigger as a,";
|
||||||
$sql .= " ".MAIN_DB_PREFIX."notify as n";
|
$sql .= " ".MAIN_DB_PREFIX."notify as n";
|
||||||
@ -489,6 +482,8 @@ if ($result > 0) {
|
|||||||
$userstatic->id = $obj->id;
|
$userstatic->id = $obj->id;
|
||||||
$userstatic->lastname = $obj->lastname;
|
$userstatic->lastname = $obj->lastname;
|
||||||
$userstatic->firstname = $obj->firstname;
|
$userstatic->firstname = $obj->firstname;
|
||||||
|
$userstatic->statut = $obj->status;
|
||||||
|
$userstatic->email = $obj->email;
|
||||||
print $userstatic->getNomUrl(1);
|
print $userstatic->getNomUrl(1);
|
||||||
print $obj->email ? ' <'.$obj->email.'>' : $langs->trans("NoMail");
|
print $obj->email ? ' <'.$obj->email.'>' : $langs->trans("NoMail");
|
||||||
} else {
|
} else {
|
||||||
@ -509,8 +504,7 @@ if ($result > 0) {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
// TODO Add link to object here for other types
|
// TODO Add link to object here for other types
|
||||||
/*print '<td>';
|
/*print '<td>';
|
||||||
if ($obj->object_type == 'order')
|
if ($obj->object_type == 'order') {
|
||||||
{
|
|
||||||
$orderstatic->id=$obj->object_id;
|
$orderstatic->id=$obj->object_id;
|
||||||
$orderstatic->ref=...
|
$orderstatic->ref=...
|
||||||
print $orderstatic->getNomUrl(1);
|
print $orderstatic->getNomUrl(1);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user