dolibarr 23.0.3
define_holiday.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2007-2022 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com>
4 * Copyright (C) 2013 Marcos García <marcosgdf@gmail.com>
5 * Copyright (C) 2016 Regis Houssin <regis.houssin@inodbox.com>
6 * Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
7 * Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
8 * Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
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 */
23
32// Load Dolibarr environment
33require '../main.inc.php';
34require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
35require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php';
36
45// Load translation files required by the page
46$langs->loadlangs(array('users', 'other', 'holiday', 'hrm'));
47
48$action = GETPOST('action', 'aZ09');
49$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'defineholidaylist';
50$massaction = GETPOST('massaction', 'alpha');
51$optioncss = GETPOST('optioncss', 'alpha');
52$mode = GETPOST('optioncss', 'aZ');
53
54$search_name = GETPOST('search_name', 'alpha');
55$search_supervisor = GETPOST('search_supervisor', "intcomma");
56
57// Load variable for pagination
58$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit;
59$sortfield = GETPOST('sortfield', 'aZ09comma');
60$sortorder = GETPOST('sortorder', 'aZ09comma');
61$toselect = GETPOST('toselect', 'array:int'); // Array of ids of elements selected into a list
62$confirm = GETPOST('confirm', 'alpha');
63
64$page = GETPOSTISSET('pageplusone') ? (GETPOSTINT('pageplusone') - 1) : GETPOSTINT("page");
65if (empty($page) || $page == -1) {
66 $page = 0;
67} // If $page is not defined, or '' or -1
68$offset = $limit * $page;
69$pageprev = $page - 1;
70$pagenext = $page + 1;
71if (!$sortfield) {
72 $sortfield = "t.rowid"; // Set here default search field
73}
74if (!$sortorder) {
75 $sortorder = "ASC";
76}
77
78
79// Initialize a technical object to manage hooks. Note that conf->hooks_modules contains array
80$hookmanager->initHooks(array('defineholidaylist'));
81$extrafields = new ExtraFields($db);
82
83$holiday = new Holiday($db);
84
85$arrayfields = array(
86 'cp.rowid' => array('label' => $langs->trans("Employee"), 'checked' => '1', 'position' => 20),
87 'cp.fk_user' => array('label' => $langs->trans("Supervisor"), 'checked' => '1', 'position' => 30),
88 'cp.nbHoliday' => array('label' => $langs->trans("MenuConfCP"), 'checked' => '1', 'position' => 40),
89 'cp.note_public' => array('label' => $langs->trans("Note"), 'checked' => '1', 'position' => 50),
90);
91
92$permissiontoread = $user->hasRight('holiday', 'read');
93$permissiontoreadall = $user->hasRight('holiday', 'readall');
94$permissiontowrite = $user->hasRight('holiday', 'write');
95$permissiontowriteall = $user->hasRight('holiday', 'writeall');
96$permissiontodelete = $user->hasRight('holiday', 'delete');
97
98$permissiontoapprove = $user->hasRight('holiday', 'approve');
99$permissiontosetup = $user->hasRight('holiday', 'define_holiday');
100
101if (!isModEnabled('holiday')) {
102 accessforbidden('Module not enabled');
103}
104
105// Protection if external user
106if ($user->socid > 0) {
108}
109
110// If the user does not have perm to read the page
111if (!$user->hasRight('holiday', 'read')) {
113}
114
115
116/*
117 * Actions
118 */
119
120if (GETPOST('cancel', 'alpha')) {
121 $action = 'list';
122 $massaction = '';
123}
124if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') {
125 $massaction = '';
126}
127
128$parameters = array();
129$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
130if ($reshook < 0) {
131 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
132}
133
134if (empty($reshook)) {
135 // Selection of new fields
136 include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
137
138 // Purge search criteria
139 if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers
140 $search_name = '';
141 $search_supervisor = '';
142 $toselect = array();
143 $search_array_options = array();
144 }
145
146 // Mass actions
147 $objectclass = 'Holiday';
148 $objectlabel = 'Holiday';
149 $uploaddir = $conf->holiday->dir_output;
150 include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
151
152 // If there is an update action
153 if ($action == 'update' && GETPOSTISSET('update_cp') && $permissiontosetup) {
154 $error = 0;
155 $nbok = 0;
156
157 $typeleaves = $holiday->getTypes(1, 1);
158
159 $userID = array_keys(GETPOST('update_cp'));
160 $userID = $userID[0];
161
162 $db->begin();
163
164 foreach ($typeleaves as $key => $val) {
165 $userValue = GETPOST('nb_holiday_'.$val['rowid']);
166 $userValue = $userValue[$userID];
167
168 if (!empty($userValue) || (string) $userValue == '0') {
169 $userValue = price2num($userValue, 5);
170 } else {
171 $userValue = '';
172 }
173
174 //If the user set a comment, we add it to the log comment
175 $note_holiday = GETPOST('note_holiday');
176 $comment = ((isset($note_holiday[$userID]) && !empty($note_holiday[$userID])) ? ' ('.$note_holiday[$userID].')' : '');
177
178 //print 'holiday: '.$val['rowid'].'-'.$userValue;exit;
179 if ($userValue != '') {
180 // We add the modification to the log (must be done before the update of balance because we read current value of balance inside this method)
181 $result = $holiday->addLogCP($user->id, $userID, $langs->transnoentitiesnoconv('ManualUpdate').$comment, (float) $userValue, $val['rowid']);
182 if ($result < 0) {
183 setEventMessages($holiday->error, $holiday->errors, 'errors');
184 $error++;
185 }
186
187 // Update of the days of the employee
188 if ($result > 0) {
189 $nbok++;
190
191 $result = $holiday->updateSoldeCP($userID, (float) $userValue, $val['rowid']);
192 if ($result < 0) {
193 setEventMessages($holiday->error, $holiday->errors, 'errors');
194 $error++;
195 }
196 }
197
198 // If it first update of balance, we set date to avoid to have sold incremented by new month
199 /*
200 $now=dol_now();
201 $sql = "UPDATE ".MAIN_DB_PREFIX."holiday_config SET";
202 $sql.= " value = '".dol_print_date($now,'%Y%m%d%H%M%S')."'";
203 $sql.= " WHERE name = 'lastUpdate' and value IS NULL"; // Add value IS NULL to be sure to update only at init.
204 dol_syslog('define_holiday update lastUpdate entry', LOG_DEBUG);
205 $result = $db->query($sql);
206 */
207 }
208 }
209
210 if (!$error && !$nbok) {
211 setEventMessages($langs->trans("HolidayQtyNotModified", $user->login), null, 'warnings');
212 }
213
214 if (!$error) {
215 $db->commit();
216
217 if ($nbok > 0) {
218 setEventMessages('UpdateConfCPOK', null, 'mesgs');
219 }
220 } else {
221 $db->rollback();
222 }
223 }
224}
225
226
227/*
228 * View
229 */
230
231$form = new Form($db);
232$userstatic = new User($db);
233
234
235$title = $langs->trans('CPTitreMenu');
236$help_url = 'EN:Module_Holiday';
237
238llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-holiday page-define_holiday');
239
240$typeleaves = $holiday->getTypes(1, 1);
241$result = $holiday->updateBalance(); // Create users into table holiday if they don't exists. TODO Remove this whif we use field into table user.
242if ($result < 0) {
243 setEventMessages($holiday->error, $holiday->errors, 'errors');
244}
245
246// List of mass actions available
247$arrayofmassactions = array(
248 //'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"),
249 //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
250 //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
251);
252if ($permissiontosetup) {
253 $arrayofmassactions['preincreaseholiday'] = img_picto('', 'add', 'class="pictofixedwidth"').$langs->trans("IncreaseHolidays");
254}
255$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
256
257
258print '<form method="POST" id="searchFormList" action="'.dolBuildUrl($_SERVER["PHP_SELF"]).'">';
259if ($optioncss != '') {
260 print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
261}
262print '<input type="hidden" name="token" value="'.newToken().'">';
263print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
264print '<input type="hidden" name="action" value="update">';
265print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
266print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
267print '<input type="hidden" name="page" value="'.$page.'">';
268print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
269
270$title = $langs->trans("MenuConfCP");
271print_barre_liste($title, $page, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $massactionbutton, 0, '', 'title_hrm', 0, '', '', $limit, 0, 0, 1);
272
273include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
274
275if ($massaction == 'preincreaseholiday') {
276 $langs->loadLangs(array("holiday", "hrm"));
277 require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php';
278 $staticholiday = new Holiday($db);
279 $arraytypeholidays = $staticholiday->getTypes(1, 1);
280 $formquestion = array();
281 $labeltypes = array();
282 foreach ($typeleaves as $key => $val) {
283 $labeltypes[$val['id']] = ($langs->trans($val['code']) != $val['code']) ? $langs->trans($val['code']) : $langs->trans($val['label']);
284 }
285 $formquestion [] = array( 'type' => 'other',
286 'name' => 'typeofholiday',
287 'label' => $langs->trans("Type"),
288 'value' => $form->selectarray('typeholiday', $labeltypes, GETPOST('typeholiday', 'alpha'), 1)
289 );
290 $formquestion [] = array( 'type' => 'other',
291 'name' => 'nbdaysholydays',
292 'label' => $langs->trans("NumberDayAddMass"),
293 'value' => '<input name="nbdaysholidays" class="maxwidth75" id="nbdaysholidays" value="'.GETPOSTINT('nbdaysholidays').'">'
294 );
295 print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmMassIncreaseHoliday"), $langs->trans("ConfirmMassIncreaseHolidayQuestion", count($toselect)), "increaseholiday", $formquestion, 1, 0, 200, 500, 1);
296}
297
298print '<div class="info">'.$langs->trans('LastUpdateCP').': '."\n";
299$lastUpdate = $holiday->getConfCP('lastUpdate');
300if ($lastUpdate) {
301 print '<strong>'.dol_print_date($db->jdate($lastUpdate), 'dayhour').'</strong>';
302 print '<br>'.$langs->trans("MonthOfLastMonthlyUpdate").': <strong>'.$langs->trans('Month'.substr($lastUpdate, 4, 2)).' '.substr($lastUpdate, 0, 4).'</strong>'."\n";
303} else {
304 print $langs->trans('None');
305}
306print "</div><br>\n";
307
308
309$filters = '';
310
311// Filter on array of ids of all children
312$userchilds = array();
313if (!$permissiontoreadall) {
314 $userchilds = $user->getAllChildIds(1);
315 $filters .= ' AND u.rowid IN ('.$db->sanitize(implode(', ', $userchilds)).')';
316}
317if (!empty($search_name)) {
318 $filters .= natural_search(array('u.firstname', 'u.lastname'), $search_name);
319}
320if ($search_supervisor > 0) {
321 $filters .= natural_search(array('u.fk_user'), $search_supervisor, 2);
322}
323$filters .= ' AND employee = 1'; // Only employee users are visible
324
325$listUsers = $holiday->fetchUsers(false, true, $filters);
326if (is_numeric($listUsers) && $listUsers < 0) {
327 setEventMessages($holiday->error, $holiday->errors, 'errors');
328}
329
330$i = 0;
331
332if (count($typeleaves) == 0) {
333 //print '<div class="info">';
334 print $langs->trans("NoLeaveWithCounterDefined")."<br>\n";
335 print $langs->trans("GoIntoDictionaryHolidayTypes");
336 //print '</div>';
337} else {
338 $listUsers = dol_sort_array($listUsers, $sortfield, $sortorder);
339
340 $canedit = 0;
341 if ($permissiontosetup) {
342 $canedit = 1;
343 }
344
345 $moreforfilter = '';
346
347 $selectedfields = '';
348 if ($massactionbutton) {
349 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
350 $selectedfields .= ($mode != 'kanban' ? $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) : ''); // This also change content of $arrayfields
351 $selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
352 }
353
354 print '<div class="div-table-responsive">';
355 print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'" id="tablelines3">'."\n";
356
357 print '<tr class="liste_titre_filter">';
358
359 // Action column
360 if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
361 print '<td class="liste_titre maxwidthsearch center">';
362 $searchpicto = $form->showFilterButtons();
363 print $searchpicto;
364 print '</td>';
365 }
366
367 // User
368 if (!empty($arrayfields['cp.rowid']['checked'])) {
369 print '<td class="liste_titre">';
370 print '<input type="text" name="search_name" value="'.dol_escape_htmltag($search_name).'" class="maxwidth100">';
371 print '</td>';
372 }
373 // Supervisor
374 if (!empty($arrayfields['cp.fk_user']['checked'])) {
375 print '<td class="liste_titre">';
376 print $form->select_dolusers($search_supervisor, 'search_supervisor', 1, null, 0, array(), '', '', 0, 0, '', 0, '', 'maxwidth150');
377 print '</td>';
378 }
379 // Type of leave request
380 if (!empty($arrayfields['cp.nbHoliday']['checked'])) {
381 if (count($typeleaves)) {
382 foreach ($typeleaves as $key => $val) {
383 print '<td class="liste_titre" style="text-align:center"></td>';
384 }
385 } else {
386 print '<td class="liste_titre"></td>';
387 }
388 }
389 if (!empty($arrayfields['cp.note_public']['checked'])) {
390 print '<td class="liste_titre"></td>';
391 }
392 print '<td class="liste_titre"></td>';
393 print '<td class="liste_titre"></td>';
394
395 // Action column
396 if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
397 print '<td class="liste_titre maxwidthsearch center">';
398 $searchpicto = $form->showFilterButtons();
399 print $searchpicto;
400 print '</td>';
401 }
402
403 print '</tr>';
404
405 print '<tr class="liste_titre">';
406 // Action column
407 if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
408 print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
409 }
410 if (!empty($arrayfields['cp.rowid']['checked'])) {
411 print_liste_field_titre('Employee', $_SERVER["PHP_SELF"], 'rowid', '', '', '', $sortfield, $sortorder);
412 }
413 if (!empty($arrayfields['cp.fk_user']['checked'])) {
414 print_liste_field_titre('Supervisor', $_SERVER["PHP_SELF"], 'fk_user', '', '', '', $sortfield, $sortorder);
415 }
416 if (!empty($arrayfields['cp.nbHoliday']['checked'])) {
417 if (count($typeleaves)) {
418 foreach ($typeleaves as $key => $val) {
419 $labeltype = ($langs->trans($val['code']) != $val['code']) ? $langs->trans($val['code']) : $langs->trans($val['label']);
420 print_liste_field_titre($labeltype, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center ');
421 }
422 } else {
423 print_liste_field_titre('NoLeaveWithCounterDefined', $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder);
424 }
425 }
426 if (!empty($arrayfields['cp.note_public']['checked'])) {
427 print_liste_field_titre($permissiontosetup ? $langs->trans("ReasonForModification") : '', $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder);
428 }
431 // Action column
432 if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
433 print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
434 }
435 print '</tr>';
436 $usersupervisor = new User($db);
437
438 foreach ($listUsers as $users) {
439 $arrayofselected = is_array($toselect) ? $toselect : array();
440
441 // If user has not permission to edit/read all, we must see only subordinates
442 if (!$permissiontoreadall) {
443 if (($users['rowid'] != $user->id) && (!in_array($users['rowid'], $userchilds))) {
444 continue; // This user is not into hierarchy of current user, we hide it.
445 }
446 }
447
448 $userstatic->id = $users['rowid'];
449 $userstatic->lastname = $users['lastname'];
450 $userstatic->firstname = $users['firstname'];
451 $userstatic->gender = $users['gender'];
452 $userstatic->photo = $users['photo'];
453 $userstatic->status = $users['status'];
454 $userstatic->employee = $users['employee'];
455 $userstatic->fk_user = $users['fk_user'];
456
457 if ($userstatic->fk_user > 0) {
458 $usersupervisor->fetch($userstatic->fk_user);
459 }
460
461 print '<tr class="oddeven">';
462
463 // Action column
464 if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
465 print '<td class="nowrap center">';
466
467 if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
468 $selected = 0;
469 if (in_array($userstatic->id, $arrayofselected)) {
470 $selected = 1;
471 }
472 print '<input id="cb'.$userstatic->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$userstatic->id.'"'.($selected ? ' checked="checked"' : '').'>';
473 }
474 print '</td>';
475 }
476
477 // User
478 if (!empty($arrayfields['cp.rowid']['checked'])) {
479 print '<td>';
480 print $userstatic->getNomUrl(-1);
481 print '</td>';
482 }
483 // Supervisor
484 if (!empty($arrayfields['cp.fk_user']['checked'])) {
485 print '<td>';
486 if ($userstatic->fk_user > 0) {
487 print $usersupervisor->getNomUrl(-1);
488 }
489 print '</td>';
490 }
491
492 // Amount for each type
493 if (!empty($arrayfields['cp.nbHoliday']['checked'])) {
494 if (count($typeleaves)) {
495 foreach ($typeleaves as $key => $val) {
496 $nbtoshow = '';
497 if ($holiday->getCPforUser($users['rowid'], $val['rowid']) != '') {
498 $nbtoshow = price2num((float) $holiday->getCPforUser($users['rowid'], $val['rowid']), 5);
499 }
500
501 //var_dump($users['rowid'].' - '.$val['rowid']);
502 print '<td class="center">';
503 if ($canedit) {
504 print '<input type="text"'.($canedit ? '' : ' disabled="disabled"').' value="'.$nbtoshow.'" name="nb_holiday_'.$val['rowid'].'['.$users['rowid'].']" class="width75 center" />';
505 } else {
506 print $nbtoshow;
507 }
508 //print ' '.$langs->trans('days');
509 print '</td>'."\n";
510 }
511 } else {
512 print '<td></td>';
513 }
514 }
515
516 // Note
517 if (!empty($arrayfields['cp.note_public']['checked'])) {
518 print '<td>';
519 if ($canedit) {
520 print '<input type="text"'.($canedit ? '' : ' disabled="disabled"').' class="maxwidthonsmartphone" value="" name="note_holiday['.$users['rowid'].']" size="30"/>';
521 }
522 print '</td>';
523 }
524
525 // Button modify
526 print '<td class="center">';
527 if ($permissiontosetup) { // Allowed to set the balance of any user
528 print '<input type="submit" name="update_cp['.$users['rowid'].']" value="'.dol_escape_htmltag($langs->trans("Modify")).'" class="button smallpaddingimp"/>';
529 }
530 print '</td>'."\n";
531
532 print '<td class="center">';
533 print '<a href="'.DOL_URL_ROOT.'/holiday/view_log.php?search_employee='.((int) $users['rowid']).'">'.img_picto($langs->trans('MenuLogCP'), 'list-alt').'</a>';
534 print '</td>';
535
536 // Action column
537 if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
538 print '<td class="nowrap center">';
539
540 if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
541 $selected = 0;
542 if (in_array($userstatic->id, $arrayofselected)) {
543 $selected = 1;
544 }
545 print '<input id="cb'.$userstatic->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$userstatic->id.'"'.($selected ? ' checked="checked"' : '').'>';
546 }
547 print '</td>';
548 }
549
550 print '</tr>';
551
552 $i++;
553 }
554
555 if (count($listUsers) <= 0) {
556 $colspan = 2;
557 foreach ($arrayfields as $key => $val) {
558 if (!empty($val['checked'])) {
559 if ($key == 'cp.nbHoliday') {
560 foreach ($typeleaves as $leave_key => $leave_val) {
561 $colspan++;
562 }
563 } else {
564 $colspan++;
565 }
566 }
567 }
568 print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>';
569 }
570
571 print '</table>';
572 print '</div>';
573}
574
575print '</form>';
576
577// End of page
578llxFooter();
579$db->close();
if(! $sortfield) if(! $sortorder) $object
Definition account.php:100
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
Definition wrapper.php:91
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Definition wrapper.php:73
Class to manage standard extra fields.
Class to manage generation of HTML components Only common components must be here.
Class of the module paid holiday.
Class to manage Dolibarr users.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
print_liste_field_titre($name, $file="", $field="", $begin="", $param="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
print_barre_liste($title, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $selectlimitsuffix=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
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)
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
natural_search($fields, $value, $mode=0, $nofirstand=0, $sqltoadd='')
Generate natural SQL search string for a criteria (this criteria can be tested on one or several fiel...
dol_sort_array(&$array, $index, $order='asc', $natsort=0, $case_sensitive=0, $keepindex=0)
Advanced sort array by the value of a given key, which produces ascending (default) or descending out...
getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='', $forcenowrapcolumntitle=0)
Get title line of an array.
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_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.