dolibarr 21.0.0-beta
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 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) {
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' && $user->admin) {
62 $db->begin();
63
64 if (!$error && 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 //var_dump($constvalue);
79 //var_dump($consttype);
80 $res = dolibarr_set_const($db, $triggername.'_TEMPLATE', $constvalue, $consttype, 0, '', $conf->entity);
81 if ($res < 0) {
82 $error++;
83 break;
84 }
85 } else {
86 $res = dolibarr_del_const($db, $triggername.'_TEMPLATE', $conf->entity);
87 }
88 }
89 }
90
91
92 if (!$error) {
93 $db->commit();
94
95 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
96 } else {
97 $db->rollback();
98
99 setEventMessages($langs->trans("Error"), null, 'errors');
100 }
101}
102
103if ($action == 'setvalue' && $user->admin) {
104 $db->begin();
105
106 $result = dolibarr_set_const($db, "NOTIFICATION_EMAIL_FROM", GETPOST("email_from", "alphawithlgt"), 'chaine', 0, '', $conf->entity);
107 if ($result < 0) {
108 $error++;
109 }
110
111 $result = dolibarr_set_const($db, "NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE", GETPOST("notif_disable", "alphawithlgt"), 'chaine', 0, '', $conf->entity);
112 if ($result < 0) {
113 $error++;
114 }
115
116 if (!$error) {
117 $db->commit();
118
119 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
120 } else {
121 $db->rollback();
122
123 setEventMessages($langs->trans("Error"), null, 'errors');
124 }
125}
126
127
128if ($action == 'setfixednotif' && $user->admin) {
129 $db->begin();
130
131 if (!$error && is_array($_POST)) {
132 $reg = array();
133 foreach ($_POST as $key => $val) {
134 if (!preg_match('/^NOTIF_(.*)_key$/', $key, $reg)) {
135 continue;
136 }
137
138 $newval = '';
139 $newkey = '';
140
141 $shortkey = preg_replace('/_key$/', '', $key);
142 //print $shortkey.'<br>';
143
144 if (preg_match('/^NOTIF_(.*)_old_(.*)_key/', $key, $reg)) {
145 dolibarr_del_const($db, 'NOTIFICATION_FIXEDEMAIL_'.$reg[1].'_THRESHOLD_HIGHER_'.$reg[2], $conf->entity);
146
147 $newkey = 'NOTIFICATION_FIXEDEMAIL_'.$reg[1].'_THRESHOLD_HIGHER_'.((int) GETPOST($shortkey.'_amount'));
148 $newval = GETPOST($shortkey.'_key');
149 //print $newkey.' - '.$newval.'<br>';
150 } elseif (preg_match('/^NOTIF_(.*)_new_key/', $key, $reg)) {
151 // Add a new entry
152 $newkey = 'NOTIFICATION_FIXEDEMAIL_'.$reg[1].'_THRESHOLD_HIGHER_'.((int) GETPOST($shortkey.'_amount'));
153 $newval = GETPOST($shortkey.'_key');
154 }
155
156 if ($newkey && $newval) {
157 $result = dolibarr_set_const($db, $newkey, $newval, 'chaine', 0, '', $conf->entity);
158 }
159 }
160 }
161
162 if (!$error) {
163 $db->commit();
164
165 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
166 } else {
167 $db->rollback();
168
169 setEventMessages($langs->trans("Error"), null, 'errors');
170 }
171}
172
173
174
175/*
176 * View
177 */
178
179$form = new Form($db);
180$notify = new Notify($db);
181
182llxHeader('', $langs->trans("NotificationSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-notification');
183
184$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
185print load_fiche_titre($langs->trans("NotificationSetup"), $linkback, 'title_setup');
186
187print '<span class="opacitymedium">';
188print $langs->trans("NotificationsDesc").'<br>';
189print $langs->trans("NotificationsDescUser").'<br>';
190if (isModEnabled("societe")) {
191 print $langs->trans("NotificationsDescContact").'<br>';
192}
193print $langs->trans("NotificationsDescGlobal").' - '.$langs->trans("YouAreHere").'<br>';
194print '</span>';
195print '<br>';
196
197print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
198print '<input type="hidden" name="token" value="'.newToken().'">';
199print '<input type="hidden" name="action" value="setvalue">';
200
201print '<div class="div-table-responsive-no-min">';
202print '<table class="noborder centpercent">';
203print '<tr class="liste_titre">';
204print '<td>'.$langs->trans("Parameter").'</td>';
205print '<td>'.$langs->trans("Value").'</td>';
206print "</tr>\n";
207
208
209print '<tr class="oddeven"><td>';
210print $langs->trans("NotificationEMailFrom").'</td>';
211print '<td>';
212print img_picto('', 'email', 'class="pictofixedwidth"');
213print '<input class="width150 quatrevingtpercentminusx" type="email" name="email_from" value="'.getDolGlobalString('NOTIFICATION_EMAIL_FROM').'">';
214if (getDolGlobalString('NOTIFICATION_EMAIL_FROM') && !isValidEmail(getDolGlobalString('NOTIFICATION_EMAIL_FROM'))) {
215 print ' '.img_warning($langs->trans("ErrorBadEMail"));
216}
217print '</td>';
218print '</tr>';
219
220
221print '<tr class="oddeven"><td>';
222print $langs->trans("NotificationDisableConfirmMessageUser").'</td>';
223print '<td>';
224if ($conf->use_javascript_ajax) {
225 print ajax_constantonoff('NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_USER');
226} else {
227 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
228 print $form->selectarray("NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_USER", $arrval, getDolGlobalString('NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_USER'));
229}
230print '</td>';
231print '</tr>';
232
233
234print '<tr class="oddeven"><td>';
235print $langs->trans("NotificationDisableConfirmMessageContact").'</td>';
236print '<td>';
237if ($conf->use_javascript_ajax) {
238 print ajax_constantonoff('NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_CONTACT');
239} else {
240 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
241 print $form->selectarray("NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_CONTACT", $arrval, getDolGlobalString('NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_CONTACT'));
242}
243print '</td>';
244print '</tr>';
245
246
247print '<tr class="oddeven"><td>';
248print $langs->trans("NotificationDisableConfirmMessageFix").'</td>';
249print '<td>';
250if ($conf->use_javascript_ajax) {
251 print ajax_constantonoff('NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_FIX');
252} else {
253 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
254 print $form->selectarray("NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_FIX", $arrval, getDolGlobalString('NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_FIX'));
255}
256print '</td>';
257print '</tr>';
258
259
260print '</table>';
261print '</div>';
262
263print $form->buttonsSaveCancel("Save", '');
264
265print '</form>';
266
267
268print '<br><br>';
269
270
271// Emails templates for notification
272
273print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
274print '<input type="hidden" name="token" value="'.newToken().'">';
275print '<input type="hidden" name="action" value="settemplates">';
276
277$title = $langs->trans("TemplatesForNotifications");
278
279print load_fiche_titre($title, '', 'email');
280
281// Load array of available notifications
282$notificationtrigger = new InterfaceNotification($db);
283$listofnotifiedevents = $notificationtrigger->getListOfManagedEvents();
284
285// Editing global variables not related to a specific theme
286$constantes = array();
287foreach ($listofnotifiedevents as $notifiedevent) {
288 $label = $langs->trans("Notify_".$notifiedevent['code']);
289 $elementLabel = $langs->trans(ucfirst($notifiedevent['elementtype']));
290
291 $model = $notifiedevent['elementtype'];
292
293 if ($notifiedevent['elementtype'] == 'order_supplier') {
294 $elementLabel = $langs->trans('SupplierOrder');
295 } elseif ($notifiedevent['elementtype'] == 'propal') {
296 $elementLabel = $langs->trans('Proposal');
297 } elseif ($notifiedevent['elementtype'] == 'facture') {
298 $elementLabel = $langs->trans('Bill');
299 } elseif ($notifiedevent['elementtype'] == 'commande') {
300 $elementLabel = $langs->trans('Order');
301 } elseif ($notifiedevent['elementtype'] == 'ficheinter') {
302 $elementLabel = $langs->trans('Intervention');
303 } elseif ($notifiedevent['elementtype'] == 'shipping') {
304 $elementLabel = $langs->trans('Shipping');
305 } elseif ($notifiedevent['elementtype'] == 'expensereport' || $notifiedevent['elementtype'] == 'expense_report') {
306 $elementLabel = $langs->trans('ExpenseReport');
307 } elseif ($notifiedevent['elementtype'] == 'contrat') {
308 $elementLabel = $langs->trans('Contract');
309 }
310
311 if ($notifiedevent['elementtype'] == 'propal') {
312 $model = 'propal_send';
313 } elseif ($notifiedevent['elementtype'] == 'commande') {
314 $model = 'order_send';
315 } elseif ($notifiedevent['elementtype'] == 'facture') {
316 $model = 'facture_send';
317 } elseif ($notifiedevent['elementtype'] == 'shipping') {
318 $model = 'shipping_send';
319 } elseif ($notifiedevent['elementtype'] == 'ficheinter') {
320 $model = 'fichinter_send';
321 } elseif ($notifiedevent['elementtype'] == 'expensereport') {
322 $model = 'expensereport_send';
323 } elseif ($notifiedevent['elementtype'] == 'order_supplier') {
324 $model = 'order_supplier_send';
325 } elseif ($notifiedevent['elementtype'] == 'invoice_supplier') {
326 $model = 'invoice_supplier_send';
327 } elseif ($notifiedevent['elementtype'] == 'member') {
328 $model = 'member';
329 } elseif ($notifiedevent['elementtype'] == 'contrat') {
330 $model = 'contract_send';
331 }
332
333 $constantes[$notifiedevent['code'].'_TEMPLATE'] = array('type'=>'emailtemplate:'.$model, 'label'=>$label);
334}
335
336$helptext = $langs->trans("EmailTemplateHelp", $langs->transnoentitiesnoconv("Tools"), $langs->transnoentitiesnoconv("EMailTemplates"));
337form_constantes($constantes, 3, $helptext, 'EmailTemplate');
338
339print $form->buttonsSaveCancel("Save", '');
340
341/*
342} else {
343 print '<table class="noborder centpercent">';
344 print '<tr class="liste_titre">';
345 print '<td>'.$langs->trans("Label").'</td>';
346 //print '<td class="right">'.$langs->trans("NbOfTargetedContacts").'</td>';
347 print "</tr>\n";
348
349 print '<tr class="oddeven">';
350 print '<td>';
351
352 $i = 0;
353 foreach ($listofnotifiedevents as $notifiedevent) {
354 $label = $langs->trans("Notify_".$notifiedevent['code']); //!=$langs->trans("Notify_".$notifiedevent['code'])?$langs->trans("Notify_".$notifiedevent['code']):$notifiedevent['label'];
355 $elementLabel = $langs->trans(ucfirst($notifiedevent['elementtype']));
356
357 if ($notifiedevent['elementtype'] == 'order_supplier') {
358 $elementLabel = $langs->trans('SupplierOrder');
359 } elseif ($notifiedevent['elementtype'] == 'propal') {
360 $elementLabel = $langs->trans('Proposal');
361 } elseif ($notifiedevent['elementtype'] == 'facture') {
362 $elementLabel = $langs->trans('Bill');
363 } elseif ($notifiedevent['elementtype'] == 'commande') {
364 $elementLabel = $langs->trans('Order');
365 } elseif ($notifiedevent['elementtype'] == 'ficheinter') {
366 $elementLabel = $langs->trans('Intervention');
367 } elseif ($notifiedevent['elementtype'] == 'shipping') {
368 $elementLabel = $langs->trans('Shipping');
369 } elseif ($notifiedevent['elementtype'] == 'expensereport' || $notifiedevent['elementtype'] == 'expense_report') {
370 $elementLabel = $langs->trans('ExpenseReport');
371 }
372
373 if ($i) {
374 print ', ';
375 }
376 print $label;
377
378 $i++;
379 }
380
381 print '</td></tr>';
382 print '</table>';
383
384 print '<div class="opacitymedium">';
385 print '* '.$langs->trans("GoOntoUserCardToAddMore").'<br>';
386 if (isModEnabled("societe")) {
387 print '** '.$langs->trans("GoOntoContactCardToAddMore").'<br>';
388 }
389 print '</div>';
390}
391*/
392
393print '</form>';
394
395
396print '<br><br>';
397
398
399print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
400print '<input type="hidden" name="token" value="'.newToken().'">';
401print '<input type="hidden" name="action" value="setfixednotif">';
402print '<input type="hidden" name="page_y" value="">';
403
404print load_fiche_titre($langs->trans("ListOfFixedNotifications"), '', 'email');
405
406print '<div class="info">';
407print $langs->trans("Note").':<br>';
408print '* '.$langs->trans("GoOntoUserCardToAddMore").'<br>';
409if (isModEnabled("societe")) {
410 print '** '.$langs->trans("GoOntoContactCardToAddMore").'<br>';
411}
412print '</div>';
413
414print '<div class="div-table-responsive">';
415print '<table class="noborder centpercent">';
416print '<tr class="liste_titre">';
417print '<td>'.$langs->trans("Module").'</td>';
418print '<td>'.$langs->trans("Code").'</td>';
419print '<td>'.$langs->trans("Label").'</td>';
420print '<td>'.$langs->trans("FixedEmailTarget").'</td>';
421print '<td>'.$langs->trans("Threshold").'</td>';
422print '<td></td>';
423print "</tr>\n";
424
425foreach ($listofnotifiedevents as $notifiedevent) {
426 $label = $langs->trans("Notify_".$notifiedevent['code']);
427
428 $elementPicto = $notifiedevent['elementtype'];
429 $elementLabel = $langs->trans(ucfirst($notifiedevent['elementtype']));
430 // Special cases
431 if ($notifiedevent['elementtype'] == 'order_supplier') {
432 $elementPicto = 'supplier_order';
433 $elementLabel = $langs->trans('SupplierOrder');
434 } elseif ($notifiedevent['elementtype'] == 'propal') {
435 $elementLabel = $langs->trans('Proposal');
436 } elseif ($notifiedevent['elementtype'] == 'facture') {
437 $elementPicto = 'bill';
438 $elementLabel = $langs->trans('Bill');
439 } elseif ($notifiedevent['elementtype'] == 'commande') {
440 $elementPicto = 'order';
441 $elementLabel = $langs->trans('Order');
442 } elseif ($notifiedevent['elementtype'] == 'ficheinter') {
443 $elementPicto = 'intervention';
444 $elementLabel = $langs->trans('Intervention');
445 } elseif ($notifiedevent['elementtype'] == 'shipping') {
446 $elementPicto = 'shipment';
447 $elementLabel = $langs->trans('Shipping');
448 } elseif ($notifiedevent['elementtype'] == 'expensereport' || $notifiedevent['elementtype'] == 'expense_report') {
449 $elementPicto = 'expensereport';
450 $elementLabel = $langs->trans('ExpenseReport');
451 } elseif ($notifiedevent['elementtype'] == 'contrat') {
452 $elementPicto = 'contract';
453 $elementLabel = $langs->trans('Contract');
454 } elseif ($notifiedevent['elementtype'] == 'agenda') {
455 $elementPicto = 'action';
456 }
457
458 $labelfortrigger = 'AmountHT';
459 $codehasnotrigger = 0;
460 if (preg_match('/^(ACTION|HOLIDAY)/', $notifiedevent['code'])) {
461 $codehasnotrigger++;
462 }
463
464 print '<tr class="oddeven">';
465 print '<td>';
466 print img_picto('', $elementPicto, 'class="pictofixedwidth"');
467 print $elementLabel;
468 print '</td>';
469 print '<td>'.$notifiedevent['code'].'</td>';
470 print '<td><span class="opacitymedium">'.$label.'</span></td>';
471 print '<td>';
472 $inputfieldalreadyshown = 0;
473 // Notification with threshold
474 foreach ($conf->global as $key => $val) {
475 if ($val == '' || !preg_match('/^NOTIFICATION_FIXEDEMAIL_'.preg_quote($notifiedevent['code'], '/').'_THRESHOLD_HIGHER_(.*)/', $key, $reg)) {
476 continue;
477 }
478
479 $param = 'NOTIFICATION_FIXEDEMAIL_'.$notifiedevent['code'].'_THRESHOLD_HIGHER_'.$reg[1];
480 $value = GETPOST('NOTIF_'.$notifiedevent['code'].'_old_'.$reg[1].'_key') ? GETPOST('NOTIF_'.$notifiedevent['code'].'_old_'.$reg[1].'_key', 'alpha') : getDolGlobalString($param);
481
482 $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.
483 $arrayemail = explode(',', $value);
484 $showwarning = 0;
485 foreach ($arrayemail as $keydet => $valuedet) {
486 $valuedet = trim($valuedet);
487 if (!empty($valuedet) && !isValidEmail($valuedet, 1)) {
488 $showwarning++;
489 }
490 }
491 if (getDolGlobalString($param) && $showwarning) {
492 $s .= ' '.img_warning($langs->trans("ErrorBadEMail"));
493 }
494 print $form->textwithpicto($s, $langs->trans("YouCanUseCommaSeparatorForSeveralRecipients").'<br>'.$langs->trans("YouCanAlsoUseSupervisorKeyword"), 1, 'help', '', 0, 2);
495 print '<br>';
496
497 $inputfieldalreadyshown++;
498 }
499 // New entry input fields
500 if (empty($inputfieldalreadyshown) || !$codehasnotrigger) {
501 $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.
502 print $form->textwithpicto($s, $langs->trans("YouCanUseCommaSeparatorForSeveralRecipients").'<br>'.$langs->trans("YouCanAlsoUseSupervisorKeyword"), 1, 'help', '', 0, 2);
503 }
504 print '</td>';
505
506 print '<td>';
507 // Notification with threshold
508 $inputfieldalreadyshown = 0;
509 foreach ($conf->global as $key => $val) {
510 if ($val == '' || !preg_match('/^NOTIFICATION_FIXEDEMAIL_'.$notifiedevent['code'].'_THRESHOLD_HIGHER_(.*)/', $key, $reg)) {
511 continue;
512 }
513
514 if (!$codehasnotrigger) {
515 print $langs->trans($labelfortrigger).' >= <input type="text" size="4" name="NOTIF_'.$notifiedevent['code'].'_old_'.$reg[1].'_amount" value="'.dol_escape_htmltag($reg[1]).'">';
516 print '<br>';
517
518 $inputfieldalreadyshown++;
519 }
520 }
521 // New entry input fields
522 if (!$codehasnotrigger) {
523 print $langs->trans($labelfortrigger).' >= <input type="text" size="4" name="NOTIF_'.$notifiedevent['code'].'_new_amount" value="">';
524 }
525 print '</td>';
526
527 print '<td>';
528 // TODO Add link to show message content
529
530 print '</td>';
531 print '</tr>';
532}
533print '</table>';
534print '</div>';
535
536print $form->buttonsSaveCancel("Save", '');
537
538print '</form>';
539
540// End of page
541llxFooter();
542$db->close();
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).
form_constantes($tableau, $strictw3c=2, $helptext='', $text='Value')
Show array with constants to edit.
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
Definition wrapper.php:87
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:71
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.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
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)
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.
isValidEmail($address, $acceptsupervisorkey=0, $acceptuserkey=0)
Return true if email syntax is ok.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
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...
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Definition member.php:79
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.