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