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