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