dolibarr  17.0.3
notification.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2005-2015 Laurent Destailleur <eldy@users.sourceforge.org>
4  * Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
5  * Copyright (C) 2015 Bahfir Abbes <contact@dolibarrpar.org>
6  * Copyright (C) 2020 Thibault FOUCART <suport@ptibogxiv.net>
7  * Copyright (C) 2022 Anthony Berton <anthony.berton@bb2a.fr>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program. If not, see <https://www.gnu.org/licenses/>.
21  */
22 
29 // Load Dolibarr environment
30 require '../main.inc.php';
31 require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php';
32 require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
33 require_once DOL_DOCUMENT_ROOT.'/core/triggers/interface_50_modNotification_Notification.class.php';
34 
35 // Load translation files required by the page
36 $langs->loadLangs(array('admin', 'other', 'orders', 'propal', 'bills', 'errors', 'mails'));
37 
38 // Security check
39 if (!$user->admin) {
41 }
42 
43 $action = GETPOST('action', 'aZ09');
44 $error = 0;
45 
46 
47 /*
48  * Actions
49  */
50 
51 // Action to update or add a constant
52 if ($action == 'settemplates' && $user->admin) {
53  $db->begin();
54 
55  if (!$error && is_array($_POST)) {
56  $reg = array();
57  foreach ($_POST as $key => $val) {
58  if (!preg_match('/^constvalue_(.*)_TEMPLATE/', $key, $reg)) {
59  continue;
60  }
61 
62  $triggername = $reg[1];
63  $constvalue = GETPOST($key, 'alpha');
64  $consttype = 'emailtemplate:xxx';
65  $tmparray = explode(':', $constvalue);
66  if (!empty($tmparray[0]) && !empty($tmparray[1])) {
67  $constvalue = $tmparray[0];
68  $consttype = 'emailtemplate:'.$tmparray[1];
69  //var_dump($constvalue);
70  //var_dump($consttype);
71  $res = dolibarr_set_const($db, $triggername.'_TEMPLATE', $constvalue, $consttype, 0, '', $conf->entity);
72  if ($res < 0) {
73  $error++;
74  break;
75  }
76  } else {
77  $res = dolibarr_del_const($db, $triggername.'_TEMPLATE', $conf->entity);
78  }
79  }
80  }
81 
82 
83  if (!$error) {
84  $db->commit();
85 
86  setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
87  } else {
88  $db->rollback();
89 
90  setEventMessages($langs->trans("Error"), null, 'errors');
91  }
92 }
93 
94 if ($action == 'setvalue' && $user->admin) {
95  $db->begin();
96 
97  $result = dolibarr_set_const($db, "NOTIFICATION_EMAIL_FROM", GETPOST("email_from", "alphawithlgt"), 'chaine', 0, '', $conf->entity);
98  if ($result < 0) {
99  $error++;
100  }
101 
102  $result = dolibarr_set_const($db, "NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE", GETPOST("notif_disable", "alphawithlgt"), 'chaine', 0, '', $conf->entity);
103  if ($result < 0) {
104  $error++;
105  }
106 
107  if (!$error) {
108  $db->commit();
109 
110  setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
111  } else {
112  $db->rollback();
113 
114  setEventMessages($langs->trans("Error"), null, 'errors');
115  }
116 }
117 
118 
119 if ($action == 'setfixednotif' && $user->admin) {
120  $db->begin();
121 
122  if (!$error && is_array($_POST)) {
123  $reg = array();
124  foreach ($_POST as $key => $val) {
125  if (!preg_match('/^NOTIF_(.*)_key$/', $key, $reg)) {
126  continue;
127  }
128 
129  $newval = '';
130  $newkey = '';
131 
132  $shortkey = preg_replace('/_key$/', '', $key);
133  //print $shortkey.'<br>';
134 
135  if (preg_match('/^NOTIF_(.*)_old_(.*)_key/', $key, $reg)) {
136  dolibarr_del_const($db, 'NOTIFICATION_FIXEDEMAIL_'.$reg[1].'_THRESHOLD_HIGHER_'.$reg[2], $conf->entity);
137 
138  $newkey = 'NOTIFICATION_FIXEDEMAIL_'.$reg[1].'_THRESHOLD_HIGHER_'.((int) GETPOST($shortkey.'_amount'));
139  $newval = GETPOST($shortkey.'_key');
140  //print $newkey.' - '.$newval.'<br>';
141  } elseif (preg_match('/^NOTIF_(.*)_new_key/', $key, $reg)) {
142  // Add a new entry
143  $newkey = 'NOTIFICATION_FIXEDEMAIL_'.$reg[1].'_THRESHOLD_HIGHER_'.((int) GETPOST($shortkey.'_amount'));
144  $newval = GETPOST($shortkey.'_key');
145  }
146 
147  if ($newkey && $newval) {
148  $result = dolibarr_set_const($db, $newkey, $newval, 'chaine', 0, '', $conf->entity);
149  }
150  }
151  }
152 
153  if (!$error) {
154  $db->commit();
155 
156  setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
157  } else {
158  $db->rollback();
159 
160  setEventMessages($langs->trans("Error"), null, 'errors');
161  }
162 }
163 
164 
165 
166 /*
167  * View
168  */
169 
170 $form = new Form($db);
171 $notify = new Notify($db);
172 
173 llxHeader('', $langs->trans("NotificationSetup"));
174 
175 $linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
176 print load_fiche_titre($langs->trans("NotificationSetup"), $linkback, 'title_setup');
177 
178 print '<span class="opacitymedium">';
179 print $langs->trans("NotificationsDesc").'<br>';
180 print $langs->trans("NotificationsDescUser").'<br>';
181 if (isModEnabled("societe")) {
182  print $langs->trans("NotificationsDescContact").'<br>';
183 }
184 print $langs->trans("NotificationsDescGlobal").'<br>';
185 print '</span>';
186 print '<br>';
187 
188 print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
189 print '<input type="hidden" name="token" value="'.newToken().'">';
190 print '<input type="hidden" name="action" value="setvalue">';
191 
192 print '<div class="div-table-responsive">';
193 print '<table class="noborder centpercent">';
194 print '<tr class="liste_titre">';
195 print '<td>'.$langs->trans("Parameter").'</td>';
196 print '<td>'.$langs->trans("Value").'</td>';
197 print "</tr>\n";
198 
199 print '<tr class="oddeven"><td>';
200 print $langs->trans("NotificationEMailFrom").'</td>';
201 print '<td>';
202 print img_picto('', 'email', 'class="pictofixedwidth"');
203 print '<input class="width150 quatrevingtpercentminusx" type="email" name="email_from" value="'.getDolGlobalString('NOTIFICATION_EMAIL_FROM').'">';
204 if (!empty($conf->global->NOTIFICATION_EMAIL_FROM) && !isValidEmail($conf->global->NOTIFICATION_EMAIL_FROM)) {
205  print ' '.img_warning($langs->trans("ErrorBadEMail"));
206 }
207 print '</td>';
208 print '</tr>';
209 
210 print '<tr class="oddeven"><td>';
211 print $langs->trans("NotificationDisableConfirmMessageContact").'</td>';
212 print '<td>';
213 if ($conf->use_javascript_ajax) {
214  print ajax_constantonoff('NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_CONTACT');
215 } else {
216  $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
217  print $form->selectarray("NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_CONTACT", $arrval, getDolGlobalString('NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_CONTACT'));
218 }
219 print '</td>';
220 print '</tr>';
221 
222 print '<tr class="oddeven"><td>';
223 print $langs->trans("NotificationDisableConfirmMessageUser").'</td>';
224 print '<td>';
225 if ($conf->use_javascript_ajax) {
226  print ajax_constantonoff('NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_USER');
227 } else {
228  $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
229  print $form->selectarray("NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_USER", $arrval, getDolGlobalString('NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_USER'));
230 }
231 print '</td>';
232 print '</tr>';
233 
234 print '<tr class="oddeven"><td>';
235 print $langs->trans("NotificationDisableConfirmMessageFix").'</td>';
236 print '<td>';
237 if ($conf->use_javascript_ajax) {
238  print ajax_constantonoff('NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_FIX');
239 } else {
240  $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
241  print $form->selectarray("NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_FIX", $arrval, getDolGlobalString('NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_FIX'));
242 }
243 print '</td>';
244 print '</tr>';
245 print '</table>';
246 print '</div>';
247 
248 print $form->buttonsSaveCancel("Save", '');
249 
250 print '</form>';
251 
252 
253 print '<br><br>';
254 
255 
256 print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
257 print '<input type="hidden" name="token" value="'.newToken().'">';
258 print '<input type="hidden" name="action" value="settemplates">';
259 
260 // Notification per contacts
261 $title = $langs->trans("TemplatesForNotifications");
262 
263 print load_fiche_titre($title, '', 'email');
264 
265 // Load array of available notifications
266 $notificationtrigger = new InterfaceNotification($db);
267 $listofnotifiedevents = $notificationtrigger->getListOfManagedEvents();
268 
269 // Editing global variables not related to a specific theme
270 $constantes = array();
271 foreach ($listofnotifiedevents as $notifiedevent) {
272  $label = $langs->trans("Notify_".$notifiedevent['code']);
273  $elementLabel = $langs->trans(ucfirst($notifiedevent['elementtype']));
274 
275  $model = $notifiedevent['elementtype'];
276 
277  if ($notifiedevent['elementtype'] == 'order_supplier') {
278  $elementLabel = $langs->trans('SupplierOrder');
279  } elseif ($notifiedevent['elementtype'] == 'propal') {
280  $elementLabel = $langs->trans('Proposal');
281  } elseif ($notifiedevent['elementtype'] == 'facture') {
282  $elementLabel = $langs->trans('Bill');
283  } elseif ($notifiedevent['elementtype'] == 'commande') {
284  $elementLabel = $langs->trans('Order');
285  } elseif ($notifiedevent['elementtype'] == 'ficheinter') {
286  $elementLabel = $langs->trans('Intervention');
287  } elseif ($notifiedevent['elementtype'] == 'shipping') {
288  $elementLabel = $langs->trans('Shipping');
289  } elseif ($notifiedevent['elementtype'] == 'expensereport' || $notifiedevent['elementtype'] == 'expense_report') {
290  $elementLabel = $langs->trans('ExpenseReport');
291  }
292 
293  if ($notifiedevent['elementtype'] == 'propal') {
294  $model = 'propal_send';
295  } elseif ($notifiedevent['elementtype'] == 'commande') {
296  $model = 'order_send';
297  } elseif ($notifiedevent['elementtype'] == 'facture') {
298  $model = 'facture_send';
299  } elseif ($notifiedevent['elementtype'] == 'shipping') {
300  $model = 'shipping_send';
301  } elseif ($notifiedevent['elementtype'] == 'ficheinter') {
302  $model = 'fichinter_send';
303  } elseif ($notifiedevent['elementtype'] == 'expensereport') {
304  $model = 'expensereport_send';
305  } elseif ($notifiedevent['elementtype'] == 'order_supplier') {
306  $model = 'order_supplier_send';
307  // } elseif ($notifiedevent['elementtype'] == 'invoice_supplier') $model = 'invoice_supplier_send';
308  } elseif ($notifiedevent['elementtype'] == 'member') {
309  $model = 'member';
310  }
311 
312  $constantes[$notifiedevent['code'].'_TEMPLATE'] = array('type'=>'emailtemplate:'.$model, 'label'=>$label);
313 }
314 
315 $helptext = '';
316 form_constantes($constantes, 3, $helptext, 'EmailTemplate');
317 
318 print $form->buttonsSaveCancel("Save", '');
319 
320 /*
321 } else {
322  print '<table class="noborder centpercent">';
323  print '<tr class="liste_titre">';
324  print '<td>'.$langs->trans("Label").'</td>';
325  //print '<td class="right">'.$langs->trans("NbOfTargetedContacts").'</td>';
326  print "</tr>\n";
327 
328  print '<tr class="oddeven">';
329  print '<td>';
330 
331  $i = 0;
332  foreach ($listofnotifiedevents as $notifiedevent) {
333  $label = $langs->trans("Notify_".$notifiedevent['code']); //!=$langs->trans("Notify_".$notifiedevent['code'])?$langs->trans("Notify_".$notifiedevent['code']):$notifiedevent['label'];
334  $elementLabel = $langs->trans(ucfirst($notifiedevent['elementtype']));
335 
336  if ($notifiedevent['elementtype'] == 'order_supplier') {
337  $elementLabel = $langs->trans('SupplierOrder');
338  } elseif ($notifiedevent['elementtype'] == 'propal') {
339  $elementLabel = $langs->trans('Proposal');
340  } elseif ($notifiedevent['elementtype'] == 'facture') {
341  $elementLabel = $langs->trans('Bill');
342  } elseif ($notifiedevent['elementtype'] == 'commande') {
343  $elementLabel = $langs->trans('Order');
344  } elseif ($notifiedevent['elementtype'] == 'ficheinter') {
345  $elementLabel = $langs->trans('Intervention');
346  } elseif ($notifiedevent['elementtype'] == 'shipping') {
347  $elementLabel = $langs->trans('Shipping');
348  } elseif ($notifiedevent['elementtype'] == 'expensereport' || $notifiedevent['elementtype'] == 'expense_report') {
349  $elementLabel = $langs->trans('ExpenseReport');
350  }
351 
352  if ($i) {
353  print ', ';
354  }
355  print $label;
356 
357  $i++;
358  }
359 
360  print '</td></tr>';
361  print '</table>';
362 
363  print '<div class="opacitymedium">';
364  print '* '.$langs->trans("GoOntoUserCardToAddMore").'<br>';
365  if (isModEnabled("societe")) {
366  print '** '.$langs->trans("GoOntoContactCardToAddMore").'<br>';
367  }
368  print '</div>';
369 }
370 */
371 
372 print '</form>';
373 
374 
375 print '<br><br>';
376 
377 
378 print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
379 print '<input type="hidden" name="token" value="'.newToken().'">';
380 print '<input type="hidden" name="action" value="setfixednotif">';
381 print '<input type="hidden" name="page_y" value="">';
382 
383 print load_fiche_titre($langs->trans("ListOfFixedNotifications"), '', 'email');
384 
385 print '<div class="info">';
386 print $langs->trans("Note").':<br>';
387 print '* '.$langs->trans("GoOntoUserCardToAddMore").'<br>';
388 if (isModEnabled("societe")) {
389  print '** '.$langs->trans("GoOntoContactCardToAddMore").'<br>';
390 }
391 print '</div>';
392 
393 print '<div class="div-table-responsive">';
394 print '<table class="noborder centpercent">';
395 print '<tr class="liste_titre">';
396 print '<td>'.$langs->trans("Module").'</td>';
397 print '<td>'.$langs->trans("Code").'</td>';
398 print '<td>'.$langs->trans("Label").'</td>';
399 print '<td>'.$langs->trans("FixedEmailTarget").'</td>';
400 print '<td>'.$langs->trans("Threshold").'</td>';
401 print '<td></td>';
402 print "</tr>\n";
403 
404 foreach ($listofnotifiedevents as $notifiedevent) {
405  $label = $langs->trans("Notify_".$notifiedevent['code']);
406 
407  $elementPicto = $notifiedevent['elementtype'];
408  $elementLabel = $langs->trans(ucfirst($notifiedevent['elementtype']));
409  // Special cases
410  if ($notifiedevent['elementtype'] == 'order_supplier') {
411  $elementPicto = 'supplier_order';
412  $elementLabel = $langs->trans('SupplierOrder');
413  } elseif ($notifiedevent['elementtype'] == 'propal') {
414  $elementLabel = $langs->trans('Proposal');
415  } elseif ($notifiedevent['elementtype'] == 'facture') {
416  $elementPicto = 'bill';
417  $elementLabel = $langs->trans('Bill');
418  } elseif ($notifiedevent['elementtype'] == 'commande') {
419  $elementPicto = 'order';
420  $elementLabel = $langs->trans('Order');
421  } elseif ($notifiedevent['elementtype'] == 'ficheinter') {
422  $elementPicto = 'intervention';
423  $elementLabel = $langs->trans('Intervention');
424  } elseif ($notifiedevent['elementtype'] == 'shipping') {
425  $elementPicto = 'shipment';
426  $elementLabel = $langs->trans('Shipping');
427  } elseif ($notifiedevent['elementtype'] == 'expensereport' || $notifiedevent['elementtype'] == 'expense_report') {
428  $elementPicto = 'expensereport';
429  $elementLabel = $langs->trans('ExpenseReport');
430  }
431 
432  $labelfortrigger = 'AmountHT';
433  $codehasnotrigger = 0;
434  if (preg_match('/^HOLIDAY/', $notifiedevent['code'])) {
435  $codehasnotrigger++;
436  }
437 
438  print '<tr class="oddeven">';
439  print '<td>';
440  print img_picto('', $elementPicto, 'class="pictofixedwidth"');
441  print $elementLabel;
442  print '</td>';
443  print '<td>'.$notifiedevent['code'].'</td>';
444  print '<td><span class="opacitymedium">'.$label.'</span></td>';
445  print '<td>';
446  $inputfieldalreadyshown = 0;
447  // Notification with threshold
448  foreach ($conf->global as $key => $val) {
449  if ($val == '' || !preg_match('/^NOTIFICATION_FIXEDEMAIL_'.$notifiedevent['code'].'_THRESHOLD_HIGHER_(.*)/', $key, $reg)) {
450  continue;
451  }
452 
453  $param = 'NOTIFICATION_FIXEDEMAIL_'.$notifiedevent['code'].'_THRESHOLD_HIGHER_'.$reg[1];
454  $value = GETPOST('NOTIF_'.$notifiedevent['code'].'_old_'.$reg[1].'_key') ?GETPOST('NOTIF_'.$notifiedevent['code'].'_old_'.$reg[1].'_key', 'alpha') : $conf->global->$param;
455 
456  $s = '<input type="text" class="minwidth200" name="NOTIF_'.$notifiedevent['code'].'_old_'.$reg[1].'_key" value="'.dol_escape_htmltag($value).'">'; // Do not use type="email" here, we must be able to enter a list of email with , separator.
457  $arrayemail = explode(',', $value);
458  $showwarning = 0;
459  foreach ($arrayemail as $keydet => $valuedet) {
460  $valuedet = trim($valuedet);
461  if (!empty($valuedet) && !isValidEmail($valuedet, 1)) {
462  $showwarning++;
463  }
464  }
465  if ((!empty($conf->global->$param)) && $showwarning) {
466  $s .= ' '.img_warning($langs->trans("ErrorBadEMail"));
467  }
468  print $form->textwithpicto($s, $langs->trans("YouCanUseCommaSeparatorForSeveralRecipients").'<br>'.$langs->trans("YouCanAlsoUseSupervisorKeyword"), 1, 'help', '', 0, 2);
469  print '<br>';
470 
471  $inputfieldalreadyshown++;
472  }
473  // New entry input fields
474  if (empty($inputfieldalreadyshown) || !$codehasnotrigger) {
475  $s = '<input type="text" class="minwidth200" name="NOTIF_'.$notifiedevent['code'].'_new_key" value="">'; // Do not use type="email" here, we must be able to enter a list of email with , separator.
476  print $form->textwithpicto($s, $langs->trans("YouCanUseCommaSeparatorForSeveralRecipients").'<br>'.$langs->trans("YouCanAlsoUseSupervisorKeyword"), 1, 'help', '', 0, 2);
477  }
478  print '</td>';
479 
480  print '<td>';
481  // Notification with threshold
482  $inputfieldalreadyshown = 0;
483  foreach ($conf->global as $key => $val) {
484  if ($val == '' || !preg_match('/^NOTIFICATION_FIXEDEMAIL_'.$notifiedevent['code'].'_THRESHOLD_HIGHER_(.*)/', $key, $reg)) {
485  continue;
486  }
487 
488  if (!$codehasnotrigger) {
489  print $langs->trans($labelfortrigger).' >= <input type="text" size="4" name="NOTIF_'.$notifiedevent['code'].'_old_'.$reg[1].'_amount" value="'.dol_escape_htmltag($reg[1]).'">';
490  print '<br>';
491 
492  $inputfieldalreadyshown++;
493  }
494  }
495  // New entry input fields
496  if (!$codehasnotrigger) {
497  print $langs->trans($labelfortrigger).' >= <input type="text" size="4" name="NOTIF_'.$notifiedevent['code'].'_new_amount" value="">';
498  }
499  print '</td>';
500 
501  print '<td>';
502  // TODO Add link to show message content
503 
504  print '</td>';
505  print '</tr>';
506 }
507 print '</table>';
508 print '</div>';
509 
510 print $form->buttonsSaveCancel("Save", '');
511 
512 print '</form>';
513 
514 // End of page
515 llxFooter();
516 $db->close();
dol_escape_htmltag
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0)
Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields.
Definition: functions.lib.php:1493
llxFooter
llxFooter()
Empty footer.
Definition: wrapper.php:70
dolibarr_del_const
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
Definition: admin.lib.php:556
load_fiche_titre
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
Definition: functions.lib.php:5360
GETPOST
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
Definition: functions.lib.php:520
$form
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
Definition: card.php:143
Notify
Class to manage notifications.
Definition: notify.class.php:33
img_picto
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
Definition: functions.lib.php:4024
llxHeader
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Definition: wrapper.php:56
InterfaceNotification
Class of triggers for notification module.
Definition: interface_50_modNotification_Notification.class.php:33
isValidEmail
isValidEmail($address, $acceptsupervisorkey=0, $acceptuserkey=0)
Return true if email syntax is ok.
Definition: functions.lib.php:3798
ajax_constantonoff
ajax_constantonoff($code, $input=array(), $entity=null, $revertonoff=0, $strict=0, $forcereload=0, $marginleftonlyshort=2, $forcenoajax=0, $setzeroinsteadofdel=0, $suffix='', $mode='')
On/off button for constant.
Definition: ajax.lib.php:600
getDolGlobalString
if(!function_exists('utf8_encode')) if(!function_exists('utf8_decode')) getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
Definition: functions.lib.php:82
isModEnabled
isModEnabled($module)
Is Dolibarr module enabled.
Definition: functions.lib.php:137
dolibarr_set_const
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
Definition: admin.lib.php:632
Form
Class to manage generation of HTML components Only common components must be here.
Definition: html.form.class.php:53
form_constantes
form_constantes($tableau, $strictw3c=0, $helptext='', $text='Value')
Show array with constants to edit.
Definition: admin.lib.php:1635
setEventMessages
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
Definition: functions.lib.php:8466
accessforbidden
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.
Definition: security.lib.php:1125