dolibarr 21.0.0-beta
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 Frédéric France <frederic.france@free.fr>
7 * Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
8 * Copyright (C) 2024 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'); // 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, $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, $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="'.$_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
332
333
334if (count($typeleaves) == 0) {
335 //print '<div class="info">';
336 print $langs->trans("NoLeaveWithCounterDefined")."<br>\n";
337 print $langs->trans("GoIntoDictionaryHolidayTypes");
338 //print '</div>';
339} else {
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, '', 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
394 // Action column
395 if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
396 print '<td class="liste_titre maxwidthsearch center">';
397 $searchpicto = $form->showFilterButtons();
398 print $searchpicto;
399 print '</td>';
400 }
401
402 print '</tr>';
403
404 print '<tr class="liste_titre">';
405 // Action column
406 if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
407 print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
408 }
409 if (!empty($arrayfields['cp.rowid']['checked'])) {
410 print_liste_field_titre('Employee', $_SERVER["PHP_SELF"]);
411 }
412 if (!empty($arrayfields['cp.fk_user']['checked'])) {
413 print_liste_field_titre('Supervisor', $_SERVER["PHP_SELF"]);
414 }
415 if (!empty($arrayfields['cp.nbHoliday']['checked'])) {
416 if (count($typeleaves)) {
417 foreach ($typeleaves as $key => $val) {
418 $labeltype = ($langs->trans($val['code']) != $val['code']) ? $langs->trans($val['code']) : $langs->trans($val['label']);
419 print_liste_field_titre($labeltype, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'center ');
420 }
421 } else {
422 print_liste_field_titre('NoLeaveWithCounterDefined', $_SERVER["PHP_SELF"], '', '', '', '');
423 }
424 }
425 if (!empty($arrayfields['cp.note_public']['checked'])) {
426 print_liste_field_titre($permissiontosetup ? 'Note' : '', $_SERVER["PHP_SELF"]);
427 }
429 // Action column
430 if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
431 print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
432 }
433 print '</tr>';
434 $usersupervisor = new User($db);
435
436 foreach ($listUsers as $users) {
437 $arrayofselected = is_array($toselect) ? $toselect : array();
438
439 // If user has not permission to edit/read all, we must see only subordinates
440 if (!$permissiontoreadall) {
441 if (($users['rowid'] != $user->id) && (!in_array($users['rowid'], $userchilds))) {
442 continue; // This user is not into hierarchy of current user, we hide it.
443 }
444 }
445
446 $userstatic->id = $users['rowid'];
447 $userstatic->lastname = $users['lastname'];
448 $userstatic->firstname = $users['firstname'];
449 $userstatic->gender = $users['gender'];
450 $userstatic->photo = $users['photo'];
451 $userstatic->status = $users['status'];
452 $userstatic->employee = $users['employee'];
453 $userstatic->fk_user = $users['fk_user'];
454
455 if ($userstatic->fk_user > 0) {
456 $usersupervisor->fetch($userstatic->fk_user);
457 }
458
459 print '<tr class="oddeven">';
460
461 // Action column
462 if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
463 print '<td class="nowrap center">';
464
465 if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
466 $selected = 0;
467 if (in_array($userstatic->id, $arrayofselected)) {
468 $selected = 1;
469 }
470 print '<input id="cb'.$userstatic->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$userstatic->id.'"'.($selected ? ' checked="checked"' : '').'>';
471 }
472 print '</td>';
473 }
474
475 // User
476 if (!empty($arrayfields['cp.rowid']['checked'])) {
477 print '<td>';
478 print $userstatic->getNomUrl(-1);
479 print '</td>';
480 }
481 // Supervisor
482 if (!empty($arrayfields['cp.fk_user']['checked'])) {
483 print '<td>';
484 if ($userstatic->fk_user > 0) {
485 print $usersupervisor->getNomUrl(-1);
486 }
487 print '</td>';
488 }
489
490 // Amount for each type
491 if (!empty($arrayfields['cp.nbHoliday']['checked'])) {
492 if (count($typeleaves)) {
493 foreach ($typeleaves as $key => $val) {
494 $nbtoshow = '';
495 if ($holiday->getCPforUser($users['rowid'], $val['rowid']) != '') {
496 $nbtoshow = price2num($holiday->getCPforUser($users['rowid'], $val['rowid']), 5);
497 }
498
499 //var_dump($users['rowid'].' - '.$val['rowid']);
500 print '<td style="text-align:center">';
501 if ($canedit) {
502 print '<input type="text"'.($canedit ? '' : ' disabled="disabled"').' value="'.$nbtoshow.'" name="nb_holiday_'.$val['rowid'].'['.$users['rowid'].']" class="width75 center" />';
503 } else {
504 print $nbtoshow;
505 }
506 //print ' '.$langs->trans('days');
507 print '</td>'."\n";
508 }
509 } else {
510 print '<td></td>';
511 }
512 }
513
514 // Note
515 if (!empty($arrayfields['cp.note_public']['checked'])) {
516 print '<td>';
517 if ($canedit) {
518 print '<input type="text"'.($canedit ? '' : ' disabled="disabled"').' class="maxwidthonsmartphone" value="" name="note_holiday['.$users['rowid'].']" size="30"/>';
519 }
520 print '</td>';
521 }
522
523 // Button modify
524 print '<td class="center">';
525 if ($permissiontosetup) { // Allowed to set the balance of any user
526 print '<input type="submit" name="update_cp['.$users['rowid'].']" value="'.dol_escape_htmltag($langs->trans("Save")).'" class="button smallpaddingimp"/>';
527 }
528 print '</td>'."\n";
529
530 // Action column
531 if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
532 print '<td class="nowrap center">';
533
534 if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
535 $selected = 0;
536 if (in_array($userstatic->id, $arrayofselected)) {
537 $selected = 1;
538 }
539 print '<input id="cb'.$userstatic->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$userstatic->id.'"'.($selected ? ' checked="checked"' : '').'>';
540 }
541 print '</td>';
542 }
543
544 print '</tr>';
545
546 $i++;
547 }
548
549 if (count($listUsers) <= 0) {
550 $colspan = 2;
551 foreach ($arrayfields as $key => $val) {
552 if (!empty($val['checked'])) {
553 if ($key == 'cp.nbHoliday') {
554 foreach ($typeleaves as $leave_key => $leave_val) {
555 $colspan++;
556 }
557 } else {
558 $colspan++;
559 }
560 }
561 }
562 print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>';
563 }
564
565 print '</table>';
566 print '</div>';
567}
568
569print '</form>';
570
571// End of page
572llxFooter();
573$db->close();
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:66
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:71
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.
llxFooter()
Footer empty.
Definition document.php:107
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
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)
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)
Generate natural SQL search string for a criteria (this criteria can be tested on one or several fiel...
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
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.
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...
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Definition member.php:79
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.