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