dolibarr 19.0.3
listevents.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2004-2023 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
4 * Copyright (C) 2015 Bahfir Abbes <bafbes@gmail.com>
5 * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20
27// Load Dolibarr environment
28require '../../main.inc.php';
29require_once DOL_DOCUMENT_ROOT.'/core/class/events.class.php';
30require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
31require_once DOL_DOCUMENT_ROOT.'/core/triggers/interface_20_all_Logevents.class.php';
32
33if (!$user->admin) {
35}
36
37$action = GETPOST('action', 'aZ09');
38$confirm = GETPOST('confirm', 'alpha');
39
40// Security check
41if ($user->socid > 0) {
42 $action = '';
43 $socid = $user->socid;
44}
45
46// Load translation files required by the page
47$langs->loadLangs(array("companies", "admin", "users", "other","withdrawals"));
48
49// Load variable for pagination
50$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
51$sortfield = GETPOST('sortfield', 'aZ09comma');
52$sortorder = GETPOST('sortorder', 'aZ09comma');
53$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
54if (empty($page) || $page == -1) {
55 $page = 0;
56} // If $page is not defined, or '' or -1
57$offset = $limit * $page;
58$pageprev = $page - 1;
59$pagenext = $page + 1;
60if (!$sortfield) {
61 $sortfield = "e.rowid";
62}
63if (!$sortorder) {
64 $sortorder = "DESC";
65}
66
67$search_rowid = GETPOST("search_rowid", "int");
68$search_code = GETPOST("search_code", "alpha");
69$search_ip = GETPOST("search_ip", "alpha");
70$search_user = GETPOST("search_user", "alpha");
71$search_desc = GETPOST("search_desc", "alpha");
72$search_ua = GETPOST("search_ua", "restricthtml");
73$search_prefix_session = GETPOST("search_prefix_session", "restricthtml");
74$optioncss = GETPOST("optioncss", "aZ"); // Option for the css output (always '' except when 'print')
75
76$now = dol_now();
77$nowarray = dol_getdate($now);
78
79if (GETPOST("date_startmonth", 'int') > 0) {
80 $date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth", 'int'), GETPOST("date_startday", 'int'), GETPOST("date_startyear", 'int'), 'tzuserrel');
81} else {
82 $date_start = '';
83}
84if (GETPOST("date_endmonth", 'int') > 0) {
85 $date_end = dol_get_last_hour(dol_mktime(23, 59, 59, GETPOST("date_endmonth", 'int'), GETPOST("date_endday", 'int'), GETPOST("date_endyear", 'int'), 'tzuserrel'), 'tzuserrel');
86} else {
87 $date_end = '';
88}
89
90// checks:if date_start>date_end then date_end=date_start + 24 hours
91if ($date_start !== '' && $date_end !== '' && $date_start > $date_end) {
92 $date_end = $date_start + 86400;
93}
94
95
96if (!GETPOSTISSET('pageplusoneold') && !GETPOSTISSET('page') && $date_start === '') { // We define date_start and date_end
97 $date_start = dol_get_first_day($nowarray['year'], $nowarray['mon'], 'tzuserrel');
98}
99if (!GETPOSTISSET('pageplusoneold') && !GETPOSTISSET('page') && $date_end === '') {
100 $date_end = dol_get_last_day($nowarray['year'], $nowarray['mon'], 'tzuserrel');
101}
102
103// Set $date_startmonth...
104$date_startday = '';
105$date_startmonth = '';
106$date_startyear = '';
107$date_endday = '';
108$date_endmonth = '';
109$date_endyear = '';
110if ($date_start !== '') {
111 $tmp = dol_getdate($date_start);
112 $date_startday = $tmp['mday'];
113 $date_startmonth = $tmp['mon'];
114 $date_startyear = $tmp['year'];
115}
116if ($date_end !== '') {
117 $tmp = dol_getdate($date_end);
118 $date_endday = $tmp['mday'];
119 $date_endmonth = $tmp['mon'];
120 $date_endyear = $tmp['year'];
121}
122
123// Add prefix session
124$arrayfields = array(
125 'e.prefix_session' => array(
126 'label'=>'UserAgent',
127 'checked'=>(!getDolGlobalString('AUDIT_ENABLE_PREFIX_SESSION') ? 0 : 1),
128 'enabled'=>(!getDolGlobalString('AUDIT_ENABLE_PREFIX_SESSION') ? 0 : 1),
129 'position'=>110
130 )
131);
132
133
134/*
135 * Actions
136 */
137
138$now = dol_now();
139
140// Purge search criteria
141if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers
142 $date_start = '';
143 $date_end = '';
144 $date_startday = '';
145 $date_endday = '';
146 $date_startmonth = '';
147 $date_endmonth = '';
148 $date_startyear = '';
149 $date_endyear = '';
150 $search_rowid = '';
151 $search_code = '';
152 $search_ip = '';
153 $search_user = '';
154 $search_desc = '';
155 $search_ua = '';
156 $search_prefix_session = '';
157}
158
159// Purge audit events
160if ($action == 'confirm_purge' && $confirm == 'yes' && $user->admin) {
161 $error = 0;
162
163 $db->begin();
164 $securityevents = new Events($db);
165
166 // Delete events
167 $sql = "DELETE FROM ".MAIN_DB_PREFIX."events";
168 $sql .= " WHERE entity = ".$conf->entity;
169
170 dol_syslog("listevents purge", LOG_DEBUG);
171 $resql = $db->query($sql);
172 if (!$resql) {
173 $error++;
174 setEventMessages($db->lasterror(), null, 'errors');
175 }
176
177 // Add event purge
178 $text = $langs->trans("SecurityEventsPurged");
179 $securityevent = new Events($db);
180 $securityevent->type = 'SECURITY_EVENTS_PURGE';
181 $securityevent->dateevent = $now;
182 $securityevent->description = $text;
183
184 $result = $securityevent->create($user);
185 if ($result > 0) {
186 $db->commit();
187 dol_syslog($text, LOG_WARNING);
188 } else {
189 $error++;
190 dol_syslog($securityevent->error, LOG_ERR);
191 $db->rollback();
192 }
193}
194
195
196/*
197 * View
198 */
199
200$title = $langs->trans("Audit");
201llxHeader('', $title);
202
203$form = new Form($db);
204
205$userstatic = new User($db);
206$usefilter = 0;
207
208$sql = "SELECT e.rowid, e.type, e.ip, e.user_agent, e.dateevent,";
209$sql .= " e.fk_user, e.description, e.prefix_session,";
210$sql .= " u.login, u.admin, u.entity, u.firstname, u.lastname, u.statut as status";
211$sql .= " FROM ".MAIN_DB_PREFIX."events as e";
212$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid = e.fk_user";
213$sql .= " WHERE e.entity IN (".getEntity('event').")";
214if ($date_start !== '') {
215 $sql .= " AND e.dateevent >= '".$db->idate($date_start)."'";
216}
217if ($date_end !== '') {
218 $sql .= " AND e.dateevent <= '".$db->idate($date_end)."'";
219}
220if ($search_rowid) {
221 $usefilter++;
222 $sql .= natural_search("e.rowid", $search_rowid, 1);
223}
224if ($search_code) {
225 $usefilter++;
226 $sql .= natural_search("e.type", $search_code, 0);
227}
228if ($search_ip) {
229 $usefilter++;
230 $sql .= natural_search("e.ip", $search_ip, 0);
231}
232if ($search_user) {
233 $usefilter++;
234 $sql .= natural_search("u.login", $search_user, 0);
235}
236if ($search_desc) {
237 $usefilter++;
238 $sql .= natural_search("e.description", $search_desc, 0);
239}
240if ($search_ua) {
241 $usefilter++;
242 $sql .= natural_search("e.user_agent", $search_ua, 0);
243}
244if ($search_prefix_session) {
245 $usefilter++;
246 $sql .= natural_search("e.prefix_session", $search_prefix_session, 0);
247}
248$sql .= $db->order($sortfield, $sortorder);
249
250// Count total nb of records
251$nbtotalofrecords = '';
252/*if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
253{
254 $result = $db->query($sql);
255 $nbtotalofrecords = $db->num_rows($result);
256 if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0
257 {
258 $page = 0;
259 $offset = 0;
260 }
261}*/
262
263$sql .= $db->plimit($limit + 1, $offset);
264
265$result = $db->query($sql);
266if ($result) {
267 $num = $db->num_rows($result);
268 $i = 0;
269
270 $param = '';
271 if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
272 $param .= '&contextpage='.urlencode($contextpage);
273 }
274 if ($limit > 0 && $limit != $conf->liste_limit) {
275 $param .= '&limit='.((int) $limit);
276 }
277 if ($optioncss != '') {
278 $param .= '&optioncss='.urlencode($optioncss);
279 }
280 if ($search_rowid) {
281 $param .= '&search_rowid='.urlencode($search_rowid);
282 }
283 if ($search_code) {
284 $param .= '&search_code='.urlencode($search_code);
285 }
286 if ($search_ip) {
287 $param .= '&search_ip='.urlencode($search_ip);
288 }
289 if ($search_user) {
290 $param .= '&search_user='.urlencode($search_user);
291 }
292 if ($search_desc) {
293 $param .= '&search_desc='.urlencode($search_desc);
294 }
295 if ($search_ua) {
296 $param .= '&search_ua='.urlencode($search_ua);
297 }
298 if ($search_prefix_session) {
299 $param .= '&search_prefix_session='.urlencode($search_prefix_session);
300 }
301 if ($date_startmonth) {
302 $param .= "&date_startmonth=".urlencode($date_startmonth);
303 }
304 if ($date_startday) {
305 $param .= "&date_startday=".urlencode($date_startday);
306 }
307 if ($date_startyear) {
308 $param .= "&date_startyear=".urlencode($date_startyear);
309 }
310 if ($date_endmonth) {
311 $param .= "&date_endmonth=".urlencode($date_endmonth);
312 }
313 if ($date_endday) {
314 $param .= "&date_endday=".urlencode($date_endday);
315 }
316 if ($date_endyear) {
317 $param .= "&date_endyear=".urlencode($date_endyear);
318 }
319
320 $center = '';
321 if ($num) {
322 $center = '<a class="butActionDelete small" href="'.$_SERVER["PHP_SELF"].'?action=purge">'.$langs->trans("Purge").'</a>';
323 }
324
325 print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
326 print '<input type="hidden" name="token" value="'.newToken().'">';
327
328 print_barre_liste($langs->trans("ListOfSecurityEvents"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $nbtotalofrecords, 'setup', 0, '', '', $limit);
329
330 if ($action == 'purge') {
331 $formquestion = array();
332 print $form->formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeAuditEvents'), $langs->trans('ConfirmPurgeAuditEvents'), 'confirm_purge', $formquestion, 'no', 1);
333 }
334
335 // Check some parameters
336 // TODO Add a tab with this and other information
337 /*
338 global $dolibarr_main_prod, $dolibarr_nocsrfcheck;
339 if (empty($dolibarr_main_prod)) {
340 print $langs->trans("Warning").' dolibarr_main_prod = '.$dolibarr_main_prod;
341 print ' '.img_warning($langs->trans('SwitchThisForABetterSecurity', 1)).'<br>';
342 }
343 if (!empty($dolibarr_nocsrfcheck)) {
344 print $langs->trans("Warning").' dolibarr_nocsrfcheck = '.$dolibarr_nocsrfcheck;
345 print ' '.img_warning($langs->trans('SwitchThisForABetterSecurity', 0)).'<br>';
346 }
347 */
348
349 print '<div class="div-table-responsive">';
350 print '<table class="liste centpercent">';
351
352 // Fields title search
353 print '<tr class="liste_titre">';
354
355 // Action column
356 if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
357 print '<td class="liste_titre maxwidthsearch center">';
358 $searchpicto = $form->showFilterAndCheckAddButtons(0);
359 print $searchpicto;
360 print '</td>';
361 }
362
363 // ID
364 print '<td class="liste_titre">';
365 print '<input class="flat maxwidth50" type="text" name="search_rowid" value="'.dol_escape_htmltag($search_rowid).'">';
366 print '</td>';
367
368 // Date
369 print '<td class="liste_titre" width="15%">';
370 print $form->selectDate($date_start === '' ? -1 : $date_start, 'date_start', 0, 0, 0, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzuserrel');
371 print $form->selectDate($date_end === '' ? -1 : $date_end, 'date_end', 0, 0, 0, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzuserrel');
372 print '</td>';
373
374 print '<td class="liste_titre">';
375 print '<input class="flat maxwidth75" type="text" name="search_code" value="'.dol_escape_htmltag($search_code).'">';
376 print '</td>';
377
378 // IP
379 print '<td class="liste_titre">';
380 print '<input class="flat maxwidth75" type="text" name="search_ip" value="'.dol_escape_htmltag($search_ip).'">';
381 print '</td>';
382
383 print '<td class="liste_titre">';
384 print '<input class="flat maxwidth100" type="text" name="search_user" value="'.dol_escape_htmltag($search_user).'">';
385 print '</td>';
386
387 print '<td class="liste_titre">';
388 //print '<input class="flat maxwidth100" type="text" size="10" name="search_desc" value="'.$search_desc.'">';
389 print '</td>';
390
391 print '<td class="liste_titre left">';
392 print '<input class="flat maxwidth100" type="text" name="search_ua" value="'.dol_escape_htmltag($search_ua).'">';
393 print '</td>';
394
395 if (!empty($arrayfields['e.prefix_session']['checked'])) {
396 print '<td class="liste_titre left">';
397 print '<input class="flat maxwidth100" type="text" name="search_prefix_session" value="'.dol_escape_htmltag($search_prefix_session).'">';
398 print '</td>';
399 }
400
401 // Action column
402 if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
403 print '<td class="liste_titre maxwidthsearch">';
404 $searchpicto = $form->showFilterAndCheckAddButtons(0);
405 print $searchpicto;
406 print '</td>';
407 }
408
409 print "</tr>\n";
410
411
412 print '<tr class="liste_titre">';
413 // Action column
414 if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
416 }
417 print_liste_field_titre("ID", $_SERVER["PHP_SELF"], "e.rowid", "", $param, '', $sortfield, $sortorder);
418 print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "e.dateevent", "", $param, '', $sortfield, $sortorder);
419 print_liste_field_titre("Code", $_SERVER["PHP_SELF"], "e.type", "", $param, '', $sortfield, $sortorder);
420 print_liste_field_titre("IP", $_SERVER["PHP_SELF"], "e.ip", "", $param, '', $sortfield, $sortorder);
421 print_liste_field_titre("User", $_SERVER["PHP_SELF"], "u.login", "", $param, '', $sortfield, $sortorder);
422 print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "e.description", "", $param, '', $sortfield, $sortorder);
423 print_liste_field_titre("UserAgent", $_SERVER["PHP_SELF"], "e.user_agent", "", $param, '', $sortfield, $sortorder);
424 if (!empty($arrayfields['e.prefix_session']['checked'])) {
425 print_liste_field_titre("SuffixSessionName", $_SERVER["PHP_SELF"], "e.prefix_session", "", $param, '', $sortfield, $sortorder);
426 }
427 // Action column
428 if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
430 }
431 print "</tr>\n";
432
433 while ($i < min($num, $limit)) {
434 $obj = $db->fetch_object($result);
435
436 print '<tr class="oddeven">';
437
438 // Action column
439 if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
440 print '<td class="center">';
441 $htmltext = '<b>'.$langs->trans("UserAgent").'</b>: '.($obj->user_agent ? dol_string_nohtmltag($obj->user_agent) : $langs->trans("Unknown"));
442 $htmltext .= '<br><b>'.$langs->trans("SuffixSessionName").' (DOLSESSID_...)</b>: '.($obj->prefix_session ? dol_string_nohtmltag($obj->prefix_session) : $langs->trans("Unknown"));
443 print $form->textwithpicto('', $htmltext);
444 print '</td>';
445 }
446
447 // ID
448 print '<td class="nowrap left">'.dol_escape_htmltag($obj->rowid).'</td>';
449
450 // Date
451 print '<td class="nowrap left">'.dol_print_date($db->jdate($obj->dateevent), '%Y-%m-%d %H:%M:%S', 'tzuserrel').'</td>';
452
453 // Code
454 print '<td>'.dol_escape_htmltag($obj->type).'</td>';
455
456 // IP
457 print '<td class="nowraponall">';
458 print dol_print_ip($obj->ip);
459 print '</td>';
460
461 // Login
462 print '<td class="tdoverflowmax125">';
463 if ($obj->fk_user > 0) {
464 $userstatic->id = $obj->fk_user;
465 $userstatic->login = $obj->login;
466 $userstatic->admin = $obj->admin;
467 $userstatic->entity = $obj->entity;
468 $userstatic->status = $obj->status;
469
470 print $userstatic->getLoginUrl(1);
471 if (isModEnabled('multicompany') && $userstatic->admin && !$userstatic->entity) {
472 print img_picto($langs->trans("SuperAdministratorDesc"), 'redstar', 'class="valignmiddle paddingleft"');
473 } elseif ($userstatic->admin) {
474 print img_picto($langs->trans("AdministratorDesc"), 'star', 'class="valignmiddle paddingleft"');
475 }
476 } else {
477 print '&nbsp;';
478 }
479 print '</td>';
480
481 // Description
482 $text = $langs->trans($obj->description);
483 $reg = array();
484 if (InterfaceLogevents::isEventActionTextKey($obj->description)) {
485 $val = explode(' : ', $obj->description);
486 $text = $langs->trans($val[0], isset($val[1]) ? $val[1] : '', isset($val[2]) ? $val[2] : '', isset($val[3]) ? $val[3] : '', isset($val[4]) ? $val[4] : '');
487 }
488 if (preg_match('/\‍((.*)\‍)(.*)/i', $obj->description, $reg)) {
489 $val = explode(',', $reg[1]);
490 $text = $langs->trans($val[0], isset($val[1]) ? $val[1] : '', isset($val[2]) ? $val[2] : '', isset($val[3]) ? $val[3] : '', isset($val[4]) ? $val[4] : '');
491 if (!empty($reg[2])) {
492 $text .= $reg[2];
493 }
494 }
495 print '<td class="tdoverflowmax400" title="'.dol_escape_htmltag($text).'">';
496 print dol_escape_htmltag($text);
497 print '</td>';
498
499 // User agent
500 print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->user_agent).'">';
501 print dol_escape_htmltag($obj->user_agent);
502 print '</td>';
503
504 // Prefix
505 if (!empty($arrayfields['e.prefix_session']['checked'])) {
506 print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->prefix_session).'">';
507 print dol_escape_htmltag($obj->prefix_session);
508 print '</td>';
509 }
510
511 // Action column
512 if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
513 print '<td class="right">';
514 $htmltext = '<b>'.$langs->trans("UserAgent").'</b>: '.($obj->user_agent ? dol_string_nohtmltag($obj->user_agent) : $langs->trans("Unknown"));
515 $htmltext .= '<br><b>'.$langs->trans("SuffixSessionName").' (DOLSESSID_...)</b>: '.($obj->prefix_session ? dol_string_nohtmltag($obj->prefix_session) : $langs->trans("Unknown"));
516 print $form->textwithpicto('', $htmltext);
517 print '</td>';
518 }
519
520 print "</tr>\n";
521 $i++;
522 }
523
524 if ($num == 0) {
525 $colspan = 8;
526 if ($usefilter) {
527 print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoEventFoundWithCriteria").'</span></td></tr>';
528 } else {
529 print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoEventOrNoAuditSetup").'</span></td></tr>';
530 }
531 }
532 print "</table>";
533 print "</div>";
534
535 print "</form>";
536 $db->free($result);
537} else {
538 dol_print_error($db);
539}
540
541// End of page
542llxFooter();
543$db->close();
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Definition wrapper.php:55
llxFooter()
Empty footer.
Definition wrapper.php:69
Events class.
Class to manage generation of HTML components Only common components must be here.
static isEventActionTextKey($event_text)
Check if text contains an event action key.
Class to manage Dolibarr users.
dol_get_last_hour($date, $gm='tzserver')
Return GMT time for last hour of a given GMT date (it replaces hours, min and second part to 23:59:59...
Definition date.lib.php:639
dol_get_first_day($year, $month=1, $gm=false)
Return GMT time for first day of a month or year.
Definition date.lib.php:593
dol_get_last_day($year, $month=12, $gm=false)
Return GMT time for last day of a month or year.
Definition date.lib.php:612
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed informations (by default a local PHP server timestamp) Re...
dol_print_ip($ip, $mode=0)
Return an IP formated to be shown on screen.
dol_string_nohtmltag($stringtoclean, $removelinefeed=1, $pagecodeto='UTF-8', $strip_tags=0, $removedoublespaces=1)
Clean a string from all HTML tags and entities.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
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...
dol_now($mode='auto')
Return date for now.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show 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.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
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.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
dol_getdate($timestamp, $fast=false, $forcetimezone='')
Return an array with locale date info.
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.