dolibarr 21.0.0-alpha
massactions_pre.tpl.php
1<?php
2/* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
3 * Copyright (C) 2013-2014 Laurent Destailleur <eldy@users.sourceforge.net>
4 * Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
5 * Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
6 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 * or see https://www.gnu.org/
21 */
22
23// Following var must be set:
24// $action
25// $massaction
26// $arrayofselected = array of id selected
27// $objecttmp = new MyObject($db);
28// $topicmail="SendSupplierProposalRef";
29// $modelmail="supplier_proposal_send";
30// $trackid='ord'.$objecttmp->id;
31//
32// Following var can be set
33// $object = Object fetched;
34// $sendto
35// $withmaindocfilemail
36'
37@phan-var-force CommonObject $objecttmp
38@phan-var-force int[] $toselect
39';
40
41if (!empty($sall) || !empty($search_all)) {
42 $search_all = empty($sall) ? $search_all : $sall;
43
44 print '<input type="hidden" name="search_all" value="'.$search_all.'">';
45}
46
47if ($massaction == 'predeletedraft') {
48 print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmMassDraftDeletion"), $langs->trans("ConfirmMassDeletionQuestion", count($toselect)), "delete", null, '', 0, 200, 500, 1);
49}
50
51if ($massaction == 'predelete') {
52 print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmMassDeletion"), $langs->trans("ConfirmMassDeletionQuestion", count($toselect)), "delete", null, '', 0, 200, 500, 1);
53}
54
55if ($massaction == 'preclonetasks') {
56 $selected = '';
57 foreach (GETPOST('toselect') as $tmpselected) {
58 $selected .= '&selected[]=' . $tmpselected;
59 }
60 $formquestion = array(
61 // TODO If list of project is long and project is not on a thirdparty, the combo may be very long.
62 // Solution: Allow only sameproject for cloning tasks ?
63 array('type' => 'other', 'name' => 'projectid', 'label' => $langs->trans('Project') .': ', 'value' => $form->selectProjects($object->id, 'projectid', '', 0, 1, '', 0, array(), $object->socid, '1', 1, '', null, 1)),
64 );
65 print $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id . $selected, $langs->trans('ConfirmMassClone'), '', 'clonetasks', $formquestion, '', 1, 300, 590);
66}
67
68if ($massaction == 'preaffecttag' && isModEnabled('category')) {
69 require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
70 $categ = new Categorie($db);
71 $categ_types = array();
72 $categ_type_array = $categ->getMapList();
73 foreach ($categ_type_array as $categdef) {
74 // Test on $object (should be useless, we already check on $objecttmp just after)
75 if (isset($object) && $categdef['obj_table'] == $object->table_element) {
76 if (!array_key_exists($categdef['code'], $categ_types)) {
77 $categ_types[$categdef['code']] = array('code' => $categdef['code'], 'label' => $langs->trans($categdef['obj_class']));
78 }
79 }
80 if (isset($objecttmp) && $categdef['obj_table'] == $objecttmp->table_element) {
81 if (!array_key_exists($categdef['code'], $categ_types)) {
82 $categ_types[$categdef['code']] = array('code' => $categdef['code'], 'label' => $langs->trans($categdef['obj_class']));
83 }
84 }
85 }
86
87 $formquestion = array();
88 if (!empty($categ_types)) {
89 foreach ($categ_types as $categ_type) {
90 $categ_arbo_tmp = $form->select_all_categories($categ_type['code'], '', 'parent', 0, 0, 3);
91 $formquestion[] = array(
92 'type' => 'other',
93 'name' => 'affecttag_'.$categ_type['code'],
94 'label' => '',
95 'value' => $form->multiselectarray('contcats_'.$categ_type['code'], $categ_arbo_tmp, GETPOST('contcats_'.$categ_type['code'], 'array'), null, null, '', 0, '60%', '', '', $langs->transnoentitiesnoconv("SelectTheTagsToAssign"))
96 );
97 }
98 $formquestion[] = array(
99 'type' => 'other',
100 'name' => 'affecttag_type',
101 'label' => '',
102 'value' => '<input type="hidden" name="affecttag_type" id="affecttag_type" value="'.implode(",", array_keys($categ_types)).'"/>'
103 );
104 print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmAffectTag"), $langs->trans("ConfirmAffectTagQuestion", count($toselect)), "affecttag", $formquestion, 1, 0, 200, 500, 1);
105 } else {
106 setEventMessage('CategTypeNotFound');
107 }
108}
109
110if ($massaction == 'preupdateprice') {
111 $formquestion = array();
112
113 $valuefield = '<div style="display: flex; align-items: center; justify-content: flex-end; padding-right: 150px">';
114 $valuefield .= '<input type="number" name="pricerate" id="pricerate" min="-100" value="0" style="width: 100px; text-align: right; margin-right: 10px" />%';
115 $valuefield .= '</div>';
116
117 $formquestion[] = array(
118 'type' => 'other',
119 'name' => 'pricerate',
120 'label' => $langs->trans("Rate"),
121 'value' => $valuefield
122 );
123
124 print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmUpdatePrice"), $langs->trans("ConfirmUpdatePriceQuestion", count($toselect)), "updateprice", $formquestion, 1, 0, 200, 500, 1);
125}
126
127if ($massaction == 'presetsupervisor') {
128 $formquestion = array();
129
130 $valuefield = '<div style="display: flex; align-items: center; justify-content: flex-end; padding-right: 150px">';
131 $valuefield .= img_picto('', 'user').' ';
132 $valuefield .= $form->select_dolusers('', 'supervisortoset', 1, $arrayofselected, 0, '', 0, $object->entity, 0, 0, '', 0, '', 'widthcentpercentminusx maxwidth300');
133 $valuefield .= '</div>';
134
135 $formquestion[] = array(
136 'type' => 'other',
137 'name' => 'supervisortoset',
138 'label' => $langs->trans("Supervisor"),
139 'value' => $valuefield
140 );
141
142 print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmSetSupervisor"), $langs->trans("ConfirmSetSupervisorQuestion", count($toselect)), "setsupervisor", $formquestion, 1, 0, 200, 500, 1);
143}
144
145if ($massaction == 'preaffectuser') {
146 $formquestion = array();
147
148 $valuefielduser = '<div style="display: flex; align-items: center; justify-content: flex-end; padding-right: 165px; padding-bottom: 6px; gap: 5px">';
149 $valuefielduser .= img_picto('', 'user').' ';
150 $valuefielduser .= $form->select_dolusers('', 'usertoaffect', 1, $arrayofselected, 0, '', 0, $object->entity, 0, 0, '', 0, '', 'widthcentpercentminusx maxwidth300');
151 $valuefielduser .= '</div>';
152
153 $valuefieldprojrole = '<div style="display: flex; align-items: center; justify-content: flex-end; padding-right: 150px; padding-bottom: 6px">';
154 $valuefieldprojrole .= $formcompany->selectTypeContact($object, '', 'projectrole', 'internal', 'position', 0, 'widthcentpercentminusx maxwidth300', 0);
155 $valuefieldprojrole .= '</div>';
156
157 $valuefieldtasksrole = '<div style="display: flex; align-items: center; justify-content: flex-end; padding-right: 150px">';
158 $valuefieldtasksrole .= $formcompany->selectTypeContact($taskstatic, '', 'tasksrole', 'internal', 'position', 0, 'widthcentpercentminusx maxwidth300', 0);
159 $valuefieldtasksrole .= '</div>';
160
161 $formquestion[] = array(
162 'type' => 'other',
163 'name' => 'usertoaffect',
164 'label' => $langs->trans("User"),
165 'value' => $valuefielduser
166 );
167 $formquestion[] = array(
168 'type' => 'other',
169 'name' => 'projectrole',
170 'label' => $langs->trans("ProjectRole"),
171 'value' => $valuefieldprojrole
172 );
173
174 $formquestion[] = array(
175 'type' => 'other',
176 'name' => 'tasksrole',
177 'label' => $langs->trans("TasksRole"),
178 'value' => $valuefieldtasksrole
179 );
180
181 print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmAffectUser"), $langs->trans("ConfirmAffectUserQuestion", count($toselect)), "affectuser", $formquestion, 1, 0, 200, 500, 1);
182}
183
184if ($massaction == 'presend') {
185 $langs->load("mails");
186
187 $listofselectedid = array();
188 $listofselectedrecipientobjid = array();
189 $listofselectedref = array();
190
191 if (!GETPOST('cancel', 'alpha')) {
192 foreach ($arrayofselected as $toselectid) {
193 $result = $objecttmp->fetch($toselectid);
194 if ($result > 0) {
195 $listofselectedid[$toselectid] = $toselectid;
196 $thirdpartyid = ($objecttmp->fk_soc ? $objecttmp->fk_soc : $objecttmp->socid); // For proposal, order, invoice, conferenceorbooth, ...
197 if (in_array($objecttmp->element, array('societe', 'conferenceorboothattendee'))) {
198 $thirdpartyid = $objecttmp->id;
199 } elseif ($objecttmp->element == 'contact') {
200 $thirdpartyid = $objecttmp->id;
201 } elseif ($objecttmp->element == 'expensereport') {
202 $thirdpartyid = $objecttmp->fk_user_author;
203 }
204 if (empty($thirdpartyid)) {
205 $thirdpartyid = 0;
206 }
207 if ($thirdpartyid) {
208 $listofselectedrecipientobjid[$thirdpartyid] = $thirdpartyid;
209 }
210 $listofselectedref[$thirdpartyid][$toselectid] = $objecttmp->ref;
211 }
212 }
213 }
214
215 print '<input type="hidden" name="massaction" value="confirm_presend">';
216
217 print dol_get_fiche_head([], '', '');
218
219 // Create mail form
220 include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
221 $formmail = new FormMail($db);
222 $formmail->withform = -1;
223 $formmail->fromtype = (GETPOST('fromtype') ? GETPOST('fromtype') : (getDolGlobalString('MAIN_MAIL_DEFAULT_FROMTYPE') ? $conf->global->MAIN_MAIL_DEFAULT_FROMTYPE : 'user'));
224
225 if ($formmail->fromtype === 'user') {
226 $formmail->fromid = $user->id;
227 }
228 $formmail->trackid = $trackid;
229 $formmail->withfrom = 1;
230 $liste = $langs->trans("AllRecipientSelected", count($arrayofselected));
231 if (count($listofselectedrecipientobjid) == 1) { // Only 1 different recipient selected, we can suggest contacts
232 $liste = array();
233 $thirdpartyid = array_shift($listofselectedrecipientobjid);
234 if ($objecttmp->element == 'expensereport') {
235 $fuser = new User($db);
236 $fuser->fetch($thirdpartyid);
237 $liste['thirdparty'] = $fuser->getFullName($langs)." &lt;".$fuser->email."&gt;";
238 } elseif ($objecttmp->element == 'contact') {
239 $fcontact = new Contact($db);
240 $fcontact->fetch($thirdpartyid);
241 $liste['contact'] = $fcontact->getFullName($langs)." &lt;".$fcontact->email."&gt;";
242 } elseif ($objecttmp->element == 'partnership' && getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR') == 'member') {
243 $fadherent = new Adherent($db);
244 $fadherent->fetch($objecttmp->fk_member);
245 $liste['member'] = $fadherent->getFullName($langs)." &lt;".$fadherent->email."&gt;";
246 } else {
247 $soc = new Societe($db);
248 $soc->fetch($thirdpartyid);
249 foreach ($soc->thirdparty_and_contact_email_array(1) as $key => $value) {
250 $liste[$key] = $value;
251 }
252 }
253 $formmail->withtoreadonly = 0;
254 } else {
255 $formmail->withtoreadonly = 1;
256 }
257
258
259 $formmail->withoptiononeemailperrecipient = ((count($listofselectedref) == 1 && count(reset($listofselectedref)) == 1) || empty($liste)) ? 0 : (GETPOSTINT('oneemailperrecipient') ? 1 : -1);
260 if (in_array($objecttmp->element, array('conferenceorboothattendee'))) {
261 $formmail->withoptiononeemailperrecipient = 0;
262 }
263
264 $formmail->withto = empty($liste) ? (GETPOST('sendto', 'alpha') ? GETPOST('sendto', 'alpha') : array()) : $liste;
265 $formmail->withtofree = empty($liste) ? 1 : 0;
266 $formmail->withtocc = 1;
267 $formmail->withtoccc = getDolGlobalString('MAIN_EMAIL_USECCC');
268 if (!empty($topicmail)) {
269 $formmail->withtopic = $langs->transnoentities($topicmail, '__REF__', '__REF_CLIENT__');
270 } else {
271 $formmail->withtopic = 1;
272 }
273 if ($objecttmp->element == 'contact') {
274 $formmail->withfile = 0;
275 $formmail->withmaindocfile = 0; // Add a checkbox "Attach also main document"
276 } else {
277 $formmail->withfile = 1; // $formmail->withfile = 2 to allow to upload files is not yet supported in mass action
278 // Add a checkbox "Attach also main document"
279 if (isset($withmaindocfilemail)) {
280 $formmail->withmaindocfile = $withmaindocfilemail;
281 } else { // Do an automatic definition of $formmail->withmaindocfile
282 $formmail->withmaindocfile = 1;
283 if ($objecttmp->element != 'societe') {
284 $formmail->withfile = '<span class="hideonsmartphone opacitymedium">' . $langs->trans("OnlyPDFattachmentSupported") . '</span>';
285 $formmail->withmaindocfile = -1; // Add a checkbox "Attach also main document" but not checked by default
286 }
287 }
288 }
289
290 $formmail->withbody = 1;
291 $formmail->withdeliveryreceipt = 1;
292 $formmail->withcancel = 1;
293
294 // Make substitution in email content
295 $substitutionarray = getCommonSubstitutionArray($langs, 0, null, $object);
296
297 $substitutionarray['__EMAIL__'] = $sendto;
298 $substitutionarray['__CHECK_READ__'] = '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag=undefined&securitykey='.dol_hash(getDolGlobalString('MAILING_EMAIL_UNSUBSCRIBE_KEY')."-undefined", 'md5').'" width="1" height="1" style="width:1px;height:1px" border="0"/>';
299 $substitutionarray['__ONLINE_PAYMENT_URL__'] = 'UrlToPayOnlineIfApplicable';
300 $substitutionarray['__ONLINE_PAYMENT_TEXT_AND_URL__'] = 'TextAndUrlToPayOnlineIfApplicable';
301 $substitutionarray['__THIRDPARTY_NAME__'] = '__THIRDPARTY_NAME__';
302 $substitutionarray['__PROJECT_NAME__'] = '__PROJECT_NAME__';
303
304 $parameters = array(
305 'mode' => 'formemail'
306 );
307 complete_substitutions_array($substitutionarray, $langs, $object, $parameters);
308
309 // Array of substitutions
310 $formmail->substit = $substitutionarray;
311
312 // Tableau des parameters complementaires du post
313 $formmail->param['action'] = $action;
314 $formmail->param['models'] = $modelmail; // the filter to know which kind of template emails to show. 'none' means no template suggested.
315 $formmail->param['models_id'] = GETPOSTINT('modelmailselected') ? GETPOSTINT('modelmailselected') : '-1';
316 $formmail->param['id'] = implode(',', $arrayofselected);
317 // $formmail->param['returnurl']=$_SERVER["PHP_SELF"].'?id='.$object->id;
318 if (getDolGlobalString('MAILING_LIMIT_SENDBYWEB') && count($listofselectedrecipientobjid) > $conf->global->MAILING_LIMIT_SENDBYWEB) {
319 // Note: MAILING_LIMIT_SENDBYWEB may be forced by conf.php file and variable $dolibarr_mailing_limit_sendbyweb
320 $langs->load("errors");
321 print img_warning().' '.$langs->trans('WarningNumberOfRecipientIsRestrictedInMassAction', getDolGlobalString('MAILING_LIMIT_SENDBYWEB'));
322 print ' - <a href="javascript: window.history.go(-1)">'.$langs->trans("GoBack").'</a>';
323 $arrayofmassactions = array();
324 } else {
325 print $formmail->get_form();
326 }
327
328 print dol_get_fiche_end();
329}
330
331if ($massaction == 'edit_extrafields') {
332 require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
333 $elementtype = $objecttmp->element;
335 $extrafields = new ExtraFields($db);
336 $keysuffix = '';
337 $extrafields->fetch_name_optionals_label($elementtype);
338 $extrafields_list = $extrafields->attributes[$elementtype]['label'];
339
340 $formquestion = array();
341 if (!empty($extrafields_list)) {
342 $myParamExtra = $object->showOptionals($extrafields, 'create');
343
344 foreach ($extrafields_list as $extraKey => $extraLabel) {
345 $extrafields_list[$extraKey] = $langs->trans($extraLabel);
346 }
347
348 $formquestion[] = array(
349 'type' => 'other',
350 'value' => $form->selectarray('extrafield-key-to-update', $extrafields_list, GETPOST('extrafield-key-to-update'), 1)
351 );
352
353
354 $outputShowOutputFields = '<div class="extrafields-inputs">';
355
356 foreach ($extrafields_list as $extraKey => $extraLabel) {
357 $outputShowOutputFields .= '<div class="mass-action-extrafield" data-extrafield="'.$extraKey.'" style="display:none;" >';
358 $outputShowOutputFields .= '<br><span>'. $langs->trans('NewValue').'</span>';
359 $outputShowOutputFields .= $extrafields->showInputField($extraKey, '', '', $keysuffix, '', 0, $objecttmp->id, $objecttmp->table_element);
360 $outputShowOutputFields .= '</div>';
361 }
362 $outputShowOutputFields .= '<script>
363 jQuery(function($) {
364 $("#extrafield-key-to-update").on(\'change\',function(){
365 let selectedExtrtafield = $(this).val();
366 if($(".extrafields-inputs .product_extras_"+selectedExtrtafield) != undefined){
367 $(".mass-action-extrafield").hide();
368 $(".mass-action-extrafield[data-extrafield=" + selectedExtrtafield + "]").show();
369 }
370 });
371 });
372 </script>';
373 $outputShowOutputFields .= '</div>';
374
375
376
377 $formquestion[] = array(
378 'type' => 'other',
379 'value' => $outputShowOutputFields
380 );
381
382 print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmEditExtrafield"), $langs->trans("ConfirmEditExtrafieldQuestion", count($toselect)), "confirm_edit_value_extrafields", $formquestion, 1, 0, 200, 500, 1);
383 } else {
384 setEventMessage($langs->trans("noExtrafields"));
385 }
386}
387
388if ($massaction == 'preenable') {
389 print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmMassEnabling"), $langs->trans("ConfirmMassEnablingQuestion", count($toselect)), "enable", null, 'yes', 0, 200, 500, 1);
390}
391if ($massaction == 'predisable') {
392 print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmMassDisabling"), $langs->trans("ConfirmMassDisablingQuestion", count($toselect)), "disable", null, '', 0, 200, 500, 1);
393}
394if ($massaction == 'presetcommercial') {
395 $formquestion = array();
396 $userlist = $form->select_dolusers('', '', 0, null, 0, '', '', 0, 0, 0, 'AND u.statut = 1', 0, '', '', 0, 1);
397 $formquestion[] = array('type' => 'other',
398 'name' => 'affectedcommercial',
399 'label' => $form->editfieldkey('AllocateCommercial', 'commercial_id', '', $object, 0),
400 'value' => $form->multiselectarray('commercial', $userlist, null, 0, 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0, '', '', '', 1));
401 print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmAllocateCommercial"), $langs->trans("ConfirmAllocateCommercialQuestion", count($toselect)), "affectcommercial", $formquestion, 1, 0, 200, 500, 1);
402}
403if ($massaction == 'unsetcommercial') {
404 $formquestion = array();
405 $userlist = $form->select_dolusers('', '', 0, null, 0, '', '', 0, 0, 0, 'AND u.statut = 1', 0, '', '', 0, 1);
406 $formquestion[] = array('type' => 'other',
407 'name' => 'unassigncommercial',
408 'label' => $form->editfieldkey('UnallocateCommercial', 'commercial_id', '', $object, 0),
409 'value' => $form->multiselectarray('commercial', $userlist, null, 0, 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0, '', '', '', 1));
410 print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmUnallocateCommercial"), $langs->trans("ConfirmUnallocateCommercialQuestion", count($toselect)), "unassigncommercial", $formquestion, 1, 0, 200, 500, 1);
411}
412
413if ($massaction == 'preapproveleave') {
414 print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmMassLeaveApproval"), $langs->trans("ConfirmMassLeaveApprovalQuestion", count($toselect)), "approveleave", null, 'yes', 0, 200, 500, 1);
415}
416
417// Allow Pre-Mass-Action hook (eg for confirmation dialog)
418$parameters = array(
419 'toselect' => isset($toselect) ? $toselect : array(),
420 'uploaddir' => isset($uploaddir) ? $uploaddir : null,
421 'massaction' => $massaction
422);
423
424$reshook = $hookmanager->executeHooks('doPreMassActions', $parameters, $object, $action);
425if ($reshook < 0) {
426 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
427} else {
428 print $hookmanager->resPrint;
429}
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:58
Class to manage members of a foundation.
Class to manage categories.
Class to manage contact/addresses.
Class to manage standard extra fields.
Class permettant la generation du formulaire html d'envoi de mail unitaire Usage: $formail = new Form...
Class to manage third parties objects (customers, suppliers, prospects...)
Class to manage Dolibarr users.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
setEventMessage($mesgs, $style='mesgs', $noduplicate=0, $attop=0)
Set event message in dol_events session object.
complete_substitutions_array(&$substitutionarray, $outputlangs, $object=null, $parameters=null, $callfunc="completesubstitutionarray")
Complete the $substitutionarray with more entries coming from external module that had set the "subst...
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $object=null, $include=null)
Return array of possible common substitutions.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
dol_hash($chain, $type='0', $nosalt=0)
Returns a hash (non reversible encryption) of a string.