dolibarr  13.0.2
view_log.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2007-2016 Laurent Destailleur <eldy@users.sourceforge.net>
3  * Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com>
4  * Copyright (C) 2020 Tobias Sekan <tobias.sekan@startmail.com>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <https://www.gnu.org/licenses/>.
18  */
19 
27 require '../main.inc.php';
28 
29 // Security check (access forbidden for external user too)
30 if (empty($user->rights->holiday->define_holiday) || $user->socid > 0) {
32 }
33 
34 require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
35 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
36 require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
37 require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php';
38 
39 $action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
40 $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
41 $show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ?
42 $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation
43 $cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button
44 $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
45 $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search
46 $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
47 $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
48 
49 $search_id = GETPOST('search_id', 'alphanohtml');
50 $search_month = GETPOST('search_month', 'int');
51 $search_year = GETPOST('search_year', 'int');
52 $search_employee = GETPOST('search_employee', 'int');
53 $search_validator = GETPOST('search_validator', 'int');
54 $search_description = GETPOST('search_description', 'alphanohtml');
55 $search_type = GETPOST('search_type', 'int');
56 $search_prev_solde = GETPOST('search_prev_solde', 'alphanohtml');
57 $search_new_solde = GETPOST('search_new_solde', 'alphanohtml');
58 
59 // Load variable for pagination
60 $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
61 $sortfield = GETPOST('sortfield', 'aZ09comma');
62 $sortorder = GETPOST('sortorder', 'aZ09comma');
63 $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
64 if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action
65 $offset = $limit * $page;
66 $pageprev = $page - 1;
67 $pagenext = $page + 1;
68 if (!$sortfield) $sortfield = "cpl.rowid";
69 if (!$sortorder) $sortorder = "DESC";
70 
71 // Si l'utilisateur n'a pas le droit de lire cette page
72 if (!$user->rights->holiday->readall) accessforbidden();
73 
74 // Load translation files required by the page
75 $langs->loadLangs(array('users', 'other', 'holiday'));
76 
77 // Initialize technical objects
78 $object = new Holiday($db);
79 $extrafields = new ExtraFields($db);
80 //$diroutputmassaction = $conf->mymodule->dir_output . '/temp/massgeneration/'.$user->id;
81 $hookmanager->initHooks(array('leavemovementlist')); // Note that conf->hooks_modules contains array
82 
83 $arrayfields = array();
84 $arrayofmassactions = array();
85 
86 if (empty($conf->holiday->enabled))
87 {
88  llxHeader('', $langs->trans('CPTitreMenu'));
89  print '<div class="tabBar">';
90  print '<span style="color: #FF0000;">'.$langs->trans('NotActiveModCP').'</span>';
91  print '</div>';
92  llxFooter();
93  exit();
94 }
95 
96 
97 /*
98  * Actions
99  */
100 
101 if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; }
102 if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; }
103 
104 $parameters = array();
105 $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
106 if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
107 
108 if (empty($reshook)) {
109  // Selection of new fields
110  include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
111 
112  // Purge search criteria
113  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
114  $search_id = '';
115  $search_month = '';
116  $search_year = '';
117  $search_employee = '';
118  $search_validator = '';
119  $search_description = '';
120  $search_type = '';
121  $search_prev_solde = '';
122  $search_new_solde = '';
123  $toselect = '';
124  $search_array_options = array();
125  }
126 
127  if (GETPOST('button_removefilter_x', 'alpha')
128  || GETPOST('button_removefilter.x', 'alpha')
129  || GETPOST('button_removefilter', 'alpha')
130  || GETPOST('button_search_x', 'alpha')
131  || GETPOST('button_search.x', 'alpha')
132  || GETPOST('button_search', 'alpha'))
133  {
134  $massaction = ''; // Protection to avoid mass action if we force a new search during a mass action confirmation
135  }
136 
137  // Mass actions
138  /*$objectclass='MyObject';
139  $objectlabel='MyObject';
140  $permissiontoread = $user->rights->mymodule->read;
141  $permissiontodelete = $user->rights->mymodule->delete;
142  $uploaddir = $conf->mymodule->dir_output;
143  include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
144  */
145 }
146 
147 
148 // Definition of fields for lists
149 $arrayfields = array(
150  'cpl.rowid'=>array('label'=>$langs->trans("ID"), 'checked'=>1),
151  'cpl.date_action'=>array('label'=>$langs->trans("Date"), 'checked'=>1),
152  'cpl.fk_user_action'=>array('label'=>$langs->trans("ActionByCP"), 'checked'=>1),
153  'cpl.fk_user_update'=>array('label'=>$langs->trans("UserUpdateCP"), 'checked'=>1),
154  'cpl.type_action'=>array('label'=>$langs->trans("Description"), 'checked'=>1),
155  'cpl.fk_type'=>array('label'=>$langs->trans("Type"), 'checked'=>1),
156  'cpl.prev_solde'=>array('label'=>$langs->trans("PrevSoldeCP"), 'checked'=>1),
157  'variation'=>array('label'=>$langs->trans("Variation"), 'checked'=>1),
158  'cpl.new_solde'=>array('label'=>$langs->trans("NewSoldeCP"), 'checked'=>1),
159 );
160 
161 
162 /*
163  * View
164  */
165 
166 $form = new Form($db);
167 $formother = new FormOther($db);
168 $holidaylogstatic = new stdClass();
169 $alltypeleaves = $object->getTypes(1, -1); // To have labels
170 
171 llxHeader('', $langs->trans('CPTitreMenu'));
172 
173 $sqlwhere = '';
174 
175 if (!empty($search_year) && $search_year > 0) {
176  if (!empty($search_month) && $search_month > 0) {
177  $from_date = dol_get_first_day($search_year, $search_month, 1);
178  $to_date = dol_get_last_day($search_year, $search_month, 1);
179  } else {
180  $from_date = dol_get_first_day($search_year, 1, 1);
181  $to_date = dol_get_last_day($search_year, 12, 1);
182  }
183 
184  $sqlwhere .= "AND date_action BETWEEN '".$db->idate($from_date)."' AND '".$db->idate($to_date)."'";
185 }
186 
187 if (!empty($search_id) && $search_id > 0) $sqlwhere .= natural_search('rowid', $search_id, 1);
188 if (!empty($search_validator) && $search_validator > 0) $sqlwhere .= natural_search('fk_user_action', $search_validator, 1);
189 if (!empty($search_employee) && $search_employee > 0) $sqlwhere .= natural_search('fk_user_update', $search_employee, 1);
190 if (!empty($search_description)) $sqlwhere .= natural_search('type_action', $search_description);
191 if (!empty($search_type) && $search_type > 0) $sqlwhere .= natural_search('fk_type', $search_type, 1);
192 if (!empty($search_prev_solde)) $sqlwhere .= natural_search('prev_solde', $search_prev_solde, 1);
193 if (!empty($search_new_solde)) $sqlwhere .= natural_search('new_solde', $search_new_solde, 1);
194 
195 $sqlorder = $db->order($sortfield, $sortorder);
196 
197 // Recent changes are more important than old changes
198 $log_holiday = $object->fetchLog($sqlorder, $sqlwhere); // Load $object->logs
199 
200 // Count total nb of records
201 $nbtotalofrecords = '';
202 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
203  //TODO: $result = $db->query($sql);
204  //TODO: $nbtotalofrecords = $db->num_rows($result);
205  $nbtotalofrecords = is_array($object->logs) ? count($object->logs) : 0;
206 
207  if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
208  $page = 0;
209  $offset = 0;
210  }
211 }
212 
213 // TODO: $num = $db->num_rows($resql);
214 $num = is_array($object->logs) ? count($object->logs) : 0;
215 
216 $param = '';
217 if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage);
218 if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
219 if (!empty($search_id)) $param .= '&search_statut='.urlencode($search_statut);
220 if (!empty($search_month) && $search_month > 0) $param .= '&search_month='.urlencode($search_month);
221 if (!empty($search_year) && $search_year > 0) $param .= '&search_year='.urlencode($search_year);
222 if (!empty($search_validator) && $search_validator > 0) $param .= '&search_validator='.urlencode($search_validator);
223 if (!empty($search_employee) && $search_employee > 0) $param .= '&search_employee='.urlencode($search_employee);
224 if (!empty($search_description)) $param .= '&search_description='.urlencode($search_description);
225 if (!empty($search_type) && $search_type > 0) $param .= '&search_type='.urlencode($search_type);
226 if (!empty($search_prev_solde)) $param .= '&search_prev_solde='.urlencode($search_prev_solde);
227 if (!empty($search_new_solde)) $param .= '&search_new_solde='.urlencode($search_new_solde);
228 
229 print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
230 if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
231 print '<input type="hidden" name="token" value="'.newToken().'">';
232 print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
233 print '<input type="hidden" name="action" value="list">';
234 print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
235 print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
236 print '<input type="hidden" name="page" value="'.$page.'">';
237 print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
238 
239 $newcardbutton = dolGetButtonTitle($langs->trans('MenuAddCP'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/holiday/card.php?action=request', '', $user->rights->holiday->write);
240 print_barre_liste($langs->trans('LogCP'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_hrm', 0, $newcardbutton, '', $limit, 0, 0, 1);
241 
242 print '<div class="info">'.$langs->trans('LastUpdateCP').': ';
243 
244 $lastUpdate = $object->getConfCP('lastUpdate');
245 if ($lastUpdate) {
246  $monthLastUpdate = $lastUpdate[4].$lastUpdate[5];
247  $yearLastUpdate = $lastUpdate[0].$lastUpdate[1].$lastUpdate[2].$lastUpdate[3];
248  print '<strong>'.dol_print_date($db->jdate($object->getConfCP('lastUpdate')), 'dayhour', 'tzuser').'</strong>';
249  print '<br>';
250  print $langs->trans("MonthOfLastMonthlyUpdate").': <strong>'.$yearLastUpdate.'-'.$monthLastUpdate.'</strong>';
251 } else {
252  print $langs->trans('None');
253 }
254 print '</div>';
255 print '<br>';
256 
257 $moreforfilter = '';
258 
259 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
260 $selectedfields = '';
261 $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
262 $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
263 
264 print '<div class="div-table-responsive">';
265 print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'" id="tablelines3">';
266 
267 print '<tr class="liste_titre_filter">';
268 
269 // Filter Id
270 if (!empty($arrayfields['cpl.rowid']['checked'])) {
271  print '<td class="liste_titre"><input type="text" class="maxwidth50" name="search_id" value="'.$search_id.'"></td>';
272 }
273 
274 // Filter: Date
275 if (!empty($arrayfields['cpl.date_action']['checked'])) {
276  print '<td class="liste_titre center">';
277  print '<input class="flat valignmiddle maxwidth25" type="text" maxlength="2" name="search_month" value="'.dol_escape_htmltag($search_month).'">';
278  print $formother->selectyear($search_year, 'search_year', 1, 10, 5, 0, 0, '', 'valignmiddle width75', true);
279  print '</td>';
280 }
281 
282 // Filter: Validator
283 if (!empty($arrayfields['cpl.fk_user_action']['checked'])) {
284  $validator = new UserGroup($db);
285  $excludefilter = $user->admin ? '' : 'u.rowid <> '.$user->id;
286  $valideurobjects = $validator->listUsersForGroup($excludefilter);
287  $valideurarray = array();
288 
289  foreach ($valideurobjects as $val) {
290  $valideurarray[$val->id] = $val->id;
291  }
292 
293  print '<td class="liste_titre">';
294  print $form->select_dolusers($search_validator, "search_validator", 1, "", 0, $valideurarray, '', 0, 0, 0, $morefilter, 0, '', 'maxwidth200');
295  print '</td>';
296 }
297 
298 // Filter: User
299 if (!empty($arrayfields['cpl.fk_user_update']['checked'])) {
300  print '<td class="liste_titre">';
301  print $form->select_dolusers($search_employee, "search_employee", 1, "", $disabled, $include, '', 0, 0, 0, $morefilter, 0, '', 'maxwidth200');
302  print '</td>';
303 }
304 
305 // Filter: Description
306 if (!empty($arrayfields['cpl.type_action']['checked'])) {
307  print '<td class="liste_titre">';
308  print '<input type="text" class="maxwidth50" name="search_description" value="'.$search_description.'">';
309  print '</td>';
310 }
311 
312 // Filter: Type
313 if (!empty($arrayfields['cpl.fk_type']['checked'])) {
314  foreach ($alltypeleaves as $key => $val) {
315  $labeltoshow = ($langs->trans($val['code']) != $val['code'] ? $langs->trans($val['code']) : $val['label']);
316  $arraytypeleaves[$val['rowid']] = $labeltoshow;
317  }
318 
319  print '<td class="liste_titre">';
320  print $form->selectarray('search_type', $arraytypeleaves, $search_type, 1, 0, 0, '', 0, 0, 0, '', '', 1);
321  print '</td>';
322 }
323 
324 // Filter: Previous balance
325 if (!empty($arrayfields['cpl.prev_solde']['checked'])) {
326  print '<td class="liste_titre">';
327  print '<input type="text" class="maxwidth50" name="search_prev_solde" value="'.$search_prev_solde.'">';
328  print '</td>';
329 }
330 
331 // Filter: Variation (only placeholder)
332 if (!empty($arrayfields['variation']['checked'])) {
333  print '<td class="liste_titre"></td>';
334 }
335 
336 // Filter: New Balance
337 if (!empty($arrayfields['cpl.new_solde']['checked'])) {
338  print '<td class="liste_titre">';
339  print '<input type="text" class="maxwidth50" name="search_new_solde" value="'.$search_new_solde.'">';
340  print '</td>';
341 }
342 
343 // Action column
344 print '<td class="liste_titre maxwidthsearch">';
345 $searchpicto = $form->showFilterButtons();
346 print $searchpicto;
347 print '</td>';
348 print '</tr>';
349 
350 print '<tr class="liste_titre">';
351 if (!empty($arrayfields['cpl.rowid']['checked'])) print_liste_field_titre($arrayfields['cpl.rowid']['label'], $_SERVER["PHP_SELF"], 'rowid', '', '', '', $sortfield, $sortorder);
352 if (!empty($arrayfields['cpl.date_action']['checked'])) print_liste_field_titre($arrayfields['cpl.date_action']['label'], $_SERVER["PHP_SELF"], 'date_action', '', '', '', $sortfield, $sortorder, 'center ');
353 if (!empty($arrayfields['cpl.fk_user_action']['checked'])) print_liste_field_titre($arrayfields['cpl.fk_user_action']['label'], $_SERVER["PHP_SELF"], 'fk_user_action', '', '', '', $sortfield, $sortorder);
354 if (!empty($arrayfields['cpl.fk_user_update']['checked'])) print_liste_field_titre($arrayfields['cpl.fk_user_update']['label'], $_SERVER["PHP_SELF"], 'fk_user_update', '', '', '', $sortfield, $sortorder);
355 if (!empty($arrayfields['cpl.type_action']['checked'])) print_liste_field_titre($arrayfields['cpl.type_action']['label'], $_SERVER["PHP_SELF"], 'type_action', '', '', '', $sortfield, $sortorder);
356 if (!empty($arrayfields['cpl.fk_type']['checked'])) print_liste_field_titre($arrayfields['cpl.fk_type']['label'], $_SERVER["PHP_SELF"], 'fk_type', '', '', '', $sortfield, $sortorder);
357 if (!empty($arrayfields['cpl.prev_solde']['checked'])) print_liste_field_titre($arrayfields['cpl.prev_solde']['label'], $_SERVER["PHP_SELF"], 'prev_solde', '', '', '', $sortfield, $sortorder, 'right ');
358 if (!empty($arrayfields['variation']['checked'])) print_liste_field_titre($arrayfields['variation']['label'], $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'right ');
359 if (!empty($arrayfields['cpl.new_solde']['checked'])) print_liste_field_titre($arrayfields['cpl.new_solde']['label'], $_SERVER["PHP_SELF"], 'new_solde', '', '', '', $sortfield, $sortorder, 'right ');
360 print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
361 print '</tr>';
362 
363 // TODO: $i = 0;
364 $i = 1;
365 
366 while ($i < min($num, $limit))
367 {
368  //TODO: $obj = $db->fetch_object($resql);
369  $obj = next($object->logs);
370 
371  $holidaylogstatic->id = $obj['rowid'];
372  $holidaylogstatic->date = $obj['date_action'];
373  $holidaylogstatic->validator = $obj['fk_user_action'];
374  $holidaylogstatic->employee = $obj['fk_user_update'];
375  $holidaylogstatic->description = $obj['type_action'];
376  $holidaylogstatic->type = $obj['fk_type'];
377  $holidaylogstatic->balance_previous = $obj['prev_solde'];
378  $holidaylogstatic->balance_new = $obj['new_solde'];
379 
380  print '<tr class="oddeven">';
381 
382  // Id
383  if (!empty($arrayfields['cpl.rowid']['checked'])) {
384  print '<td>'.$holidaylogstatic->id.'</td>';
385  }
386 
387  // Date
388  if (!empty($arrayfields['cpl.date_action']['checked'])) {
389  print '<td style="text-align: center">'.$holidaylogstatic->date.'</td>';
390  }
391 
392  // Validator
393  if (!empty($arrayfields['cpl.fk_user_action']['checked'])) {
394  $user_action = new User($db);
395  $user_action->fetch($holidaylogstatic->validator);
396  print '<td>'.$user_action->getNomUrl(-1).'</td>';
397  }
398 
399  // Emloyee
400  if (!empty($arrayfields['cpl.fk_user_update']['checked'])) {
401  $user_update = new User($db);
402  $user_update->fetch($holidaylogstatic->employee);
403  print '<td>'.$user_update->getNomUrl(-1).'</td>';
404  }
405 
406  // Description
407  if (!empty($arrayfields['cpl.type_action']['checked'])) {
408  print '<td>'.$holidaylogstatic->description.'</td>';
409  }
410 
411  // Type
412  if (!empty($arrayfields['cpl.fk_type']['checked'])) {
413  if ($alltypeleaves[$holidaylogstatic->type]['code'] && $langs->trans($alltypeleaves[$holidaylogstatic->type]['code']) != $alltypeleaves[$holidaylogstatic->type]['code']) {
414  $label = $langs->trans($alltypeleaves[$holidaylogstatic->type]['code']);
415  } else {
416  $label = $alltypeleaves[$holidaylogstatic->type]['label'];
417  }
418 
419  print '<td>';
420  print $label ? $label : $holidaylogstatic->type;
421  print '</td>';
422  }
423 
424  // Previous balance
425  if (!empty($arrayfields['cpl.prev_solde']['checked'])) {
426  print '<td style="text-align: right;">'.price2num($holidaylogstatic->balance_previous, 5).' '.$langs->trans('days').'</td>';
427  }
428 
429  // Variation
430  if (!empty($arrayfields['variation']['checked'])) {
431  $delta = price2num($holidaylogstatic->balance_new - $holidaylogstatic->balance_previous, 5);
432  $detasign = ($delta > 0 ? '+' : '');
433  print '<td style="text-align: right;">'.$detasign.$delta.'</td>';
434  }
435 
436  // New Balance
437  if (!empty($arrayfields['cpl.new_solde']['checked'])) {
438  print '<td style="text-align: right;">'.price2num($holidaylogstatic->balance_new, 5).' '.$langs->trans('days').'</td>';
439  }
440 
441  // Buttons
442  print '<td></td>';
443 
444  print '</tr>';
445 
446  $i++;
447 }
448 
449 if ($log_holiday == '2') {
450  print '<tr class="opacitymedium">';
451  print '<td colspan="10" class="opacitymedium">'.$langs->trans('NoRecordFound').'</td>';
452  print '</tr>';
453 }
454 
455 print '</table>';
456 print '</div>';
457 
458 print '</form>';
459 
460 // End of page
461 llxFooter();
462 $db->close();
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
Class of the module paid holiday.
dolGetButtonTitle($label, $helpText= '', $iconClass= 'fa fa-file', $url= '', $id= '', $status=1, $params=array())
Function dolGetButtonTitle : this kind of buttons are used in title in list.
Class to manage Dolibarr users.
Definition: user.class.php:44
dol_get_first_day($year, $month=1, $gm=false)
Return GMT time for first day of a month or year.
Definition: date.lib.php:481
Class to manage user groups.
llxHeader()
Empty header.
Definition: wrapper.php:45
Class to manage standard extra fields.
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
print_barre_liste($titre, $page, $file, $options= '', $sortfield= '', $sortorder= '', $morehtmlcenter= '', $num=-1, $totalnboflines= '', $picto= 'generic', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limit=-1, $hideselectlimit=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow= '')
Print a title with navigation controls for pagination.
Class to manage generation of HTML components Only common components must be here.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname.
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
price2num($amount, $rounding= '', $option=0)
Function that return a number with universal decimal format (decimal separator is &#39;...
Classe permettant la generation de composants html autre Only common components are here...
accessforbidden($message= '', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
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 $_SERVER["PHP_SELF"]
Edit parameters.
dol_get_last_day($year, $month=12, $gm=false)
Return GMT time for last day of a month or year.
Definition: date.lib.php:498
print
Draft customers invoices.
Definition: index.php:89
getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip= '', $forcenowrapcolumntitle=0)
Get title line of an array.
llxFooter()
Empty footer.
Definition: wrapper.php:59