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