dolibarr  16.0.5
listevents.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2004-2020 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 require '../../main.inc.php';
28 require_once DOL_DOCUMENT_ROOT.'/core/class/events.class.php';
29 require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
30 
31 if (!$user->admin) {
33 }
34 
35 $action = GETPOST('action', 'aZ09');
36 $confirm = GETPOST('confirm', 'alpha');
37 
38 // Security check
39 if ($user->socid > 0) {
40  $action = '';
41  $socid = $user->socid;
42 }
43 
44 // Load translation files required by the page
45 $langs->loadLangs(array("companies", "admin", "users", "other","withdrawals"));
46 
47 // Load variable for pagination
48 $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
49 $sortfield = GETPOST('sortfield', 'aZ09comma');
50 $sortorder = GETPOST('sortorder', 'aZ09comma');
51 $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
52 if (empty($page) || $page == -1) {
53  $page = 0;
54 } // If $page is not defined, or '' or -1
55 $offset = $limit * $page;
56 $pageprev = $page - 1;
57 $pagenext = $page + 1;
58 if (!$sortfield) {
59  $sortfield = "dateevent";
60 }
61 if (!$sortorder) {
62  $sortorder = "DESC";
63 }
64 
65 $search_code = GETPOST("search_code", "alpha");
66 $search_ip = GETPOST("search_ip", "alpha");
67 $search_user = GETPOST("search_user", "alpha");
68 $search_desc = GETPOST("search_desc", "alpha");
69 $search_ua = GETPOST("search_ua", "restricthtml");
70 $search_prefix_session = GETPOST("search_prefix_session", "restricthtml");
71 $optioncss = GETPOST("optioncss", "aZ"); // Option for the css output (always '' except when 'print')
72 
73 $now = dol_now();
74 $nowarray = dol_getdate($now);
75 
76 if (GETPOST("date_startmonth", 'int') > 0) {
77  $date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth", 'int'), GETPOST("date_startday", 'int'), GETPOST("date_startyear", 'int'), 'tzuserrel');
78 } else {
79  $date_start = '';
80 }
81 if (GETPOST("date_endmonth", 'int') > 0) {
82  $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');
83 } else {
84  $date_end = '';
85 }
86 
87 // checks:if date_start>date_end then date_end=date_start + 24 hours
88 if ($date_start !== '' && $date_end !== '' && $date_start > $date_end) {
89  $date_end = $date_start + 86400;
90 }
91 
92 
93 if (!GETPOSTISSET('pageplusoneold') && !GETPOSTISSET('page') && $date_start === '') { // We define date_start and date_end
94  $date_start = dol_get_first_day($nowarray['year'], $nowarray['mon'], 'tzuserrel');
95 }
96 if (!GETPOSTISSET('pageplusoneold') && !GETPOSTISSET('page') && $date_end === '') {
97  $date_end = dol_get_last_day($nowarray['year'], $nowarray['mon'], 'tzuserrel');
98 }
99 
100 // Set $date_startmonth...
101 $date_startday = '';
102 $date_startmonth = '';
103 $date_startyear = '';
104 $date_endday = '';
105 $date_endmonth = '';
106 $date_endyear = '';
107 if ($date_start !== '') {
108  $tmp = dol_getdate($date_start);
109  $date_startday = $tmp['mday'];
110  $date_startmonth = $tmp['mon'];
111  $date_startyear = $tmp['year'];
112 }
113 if ($date_end !== '') {
114  $tmp = dol_getdate($date_end);
115  $date_endday = $tmp['mday'];
116  $date_endmonth = $tmp['mon'];
117  $date_endyear = $tmp['year'];
118 }
119 
120 // Add prefix session
121 $arrayfields = array(
122  'e.prefix_session' => array(
123  'label'=>'UserAgent',
124  'checked'=>(empty($conf->global->AUDIT_ENABLE_PREFIX_SESSION) ? 0 : 1),
125  'enabled'=>(empty($conf->global->AUDIT_ENABLE_PREFIX_SESSION) ? 0 : 1),
126  'position'=>110
127  )
128 );
129 
130 
131 /*
132  * Actions
133  */
134 
135 $now = dol_now();
136 
137 // Purge search criteria
138 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
139  $date_start = '';
140  $date_end = '';
141  $date_startday = '';
142  $date_endday = '';
143  $date_startmonth = '';
144  $date_endmonth = '';
145  $date_startyear = '';
146  $date_endyear = '';
147  $search_code = '';
148  $search_ip = '';
149  $search_user = '';
150  $search_desc = '';
151  $search_ua = '';
152  $search_prefix_session = '';
153 }
154 
155 // Purge audit events
156 if ($action == 'confirm_purge' && $confirm == 'yes' && $user->admin) {
157  $error = 0;
158 
159  $db->begin();
160  $securityevents = new Events($db);
161 
162  // Delete events
163  $sql = "DELETE FROM ".MAIN_DB_PREFIX."events";
164  $sql .= " WHERE entity = ".$conf->entity;
165 
166  dol_syslog("listevents purge", LOG_DEBUG);
167  $resql = $db->query($sql);
168  if (!$resql) {
169  $error++;
170  setEventMessages($db->lasterror(), null, 'errors');
171  }
172 
173  // Add event purge
174  $text = $langs->trans("SecurityEventsPurged");
175  $securityevent = new Events($db);
176  $securityevent->type = 'SECURITY_EVENTS_PURGE';
177  $securityevent->dateevent = $now;
178  $securityevent->description = $text;
179 
180  $result = $securityevent->create($user);
181  if ($result > 0) {
182  $db->commit();
183  dol_syslog($text, LOG_WARNING);
184  } else {
185  $error++;
186  dol_syslog($securityevent->error, LOG_ERR);
187  $db->rollback();
188  }
189 }
190 
191 
192 /*
193  * View
194  */
195 
196 $title = $langs->trans("Audit");
197 llxHeader('', $title);
198 
199 $form = new Form($db);
200 
201 $userstatic = new User($db);
202 $usefilter = 0;
203 
204 $sql = "SELECT e.rowid, e.type, e.ip, e.user_agent, e.dateevent,";
205 $sql .= " e.fk_user, e.description, e.prefix_session,";
206 $sql .= " u.login, u.admin, u.entity, u.firstname, u.lastname, u.statut as status";
207 $sql .= " FROM ".MAIN_DB_PREFIX."events as e";
208 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid = e.fk_user";
209 $sql .= " WHERE e.entity IN (".getEntity('event').")";
210 if ($date_start !== '') {
211  $sql .= " AND e.dateevent >= '".$db->idate($date_start)."'";
212 }
213 if ($date_end !== '' ) {
214  $sql .= " AND e.dateevent <= '".$db->idate($date_end)."'";
215 }
216 if ($search_code) {
217  $usefilter++; $sql .= natural_search("e.type", $search_code, 0);
218 }
219 if ($search_ip) {
220  $usefilter++; $sql .= natural_search("e.ip", $search_ip, 0);
221 }
222 if ($search_user) {
223  $usefilter++; $sql .= natural_search("u.login", $search_user, 0);
224 }
225 if ($search_desc) {
226  $usefilter++; $sql .= natural_search("e.description", $search_desc, 0);
227 }
228 if ($search_ua) {
229  $usefilter++; $sql .= natural_search("e.user_agent", $search_ua, 0);
230 }
231 if ($search_prefix_session) {
232  $usefilter++; $sql .= natural_search("e.prefix_session", $search_prefix_session, 0);
233 }
234 $sql .= $db->order($sortfield, $sortorder);
235 
236 // Count total nb of records
237 $nbtotalofrecords = '';
238 /*if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
239 {
240  $result = $db->query($sql);
241  $nbtotalofrecords = $db->num_rows($result);
242  if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0
243  {
244  $page = 0;
245  $offset = 0;
246  }
247 }*/
248 
249 $sql .= $db->plimit($limit + 1, $offset);
250 
251 $result = $db->query($sql);
252 if ($result) {
253  $num = $db->num_rows($result);
254  $i = 0;
255 
256  $param = '';
257  if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
258  $param .= '&contextpage='.urlencode($contextpage);
259  }
260  if ($limit > 0 && $limit != $conf->liste_limit) {
261  $param .= '&limit='.urlencode($limit);
262  }
263  if ($optioncss != '') {
264  $param .= '&optioncss='.urlencode($optioncss);
265  }
266  if ($search_code) {
267  $param .= '&search_code='.urlencode($search_code);
268  }
269  if ($search_ip) {
270  $param .= '&search_ip='.urlencode($search_ip);
271  }
272  if ($search_user) {
273  $param .= '&search_user='.urlencode($search_user);
274  }
275  if ($search_desc) {
276  $param .= '&search_desc='.urlencode($search_desc);
277  }
278  if ($search_ua) {
279  $param .= '&search_ua='.urlencode($search_ua);
280  }
281  if ($search_prefix_session) {
282  $param .= '&search_prefix_session='.urlencode($search_prefix_session);
283  }
284  if ($date_startmonth) {
285  $param .= "&date_startmonth=".urlencode($date_startmonth);
286  }
287  if ($date_startday) {
288  $param .= "&date_startday=".urlencode($date_startday);
289  }
290  if ($date_startyear) {
291  $param .= "&date_startyear=".urlencode($date_startyear);
292  }
293  if ($date_endmonth) {
294  $param .= "&date_endmonth=".urlencode($date_endmonth);
295  }
296  if ($date_endday) {
297  $param .= "&date_endday=".urlencode($date_endday);
298  }
299  if ($date_endyear) {
300  $param .= "&date_endyear=".urlencode($date_endyear);
301  }
302 
303  $center = '';
304  if ($num) {
305  $center = '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?action=purge">'.$langs->trans("Purge").'</a>';
306  }
307 
308  print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
309  print '<input type="hidden" name="token" value="'.newToken().'">';
310 
311  print_barre_liste($langs->trans("ListOfSecurityEvents"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $nbtotalofrecords, 'setup', 0, '', '', $limit);
312 
313  if ($action == 'purge') {
314  $formquestion = array();
315  print $form->formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeAuditEvents'), $langs->trans('ConfirmPurgeAuditEvents'), 'confirm_purge', $formquestion, 'no', 1);
316  }
317 
318  // Check some parameters
319  // TODO Add a tab with this and other information
320  /*
321  global $dolibarr_main_prod, $dolibarr_nocsrfcheck;
322  if (empty($dolibarr_main_prod)) {
323  print $langs->trans("Warning").' dolibarr_main_prod = '.$dolibarr_main_prod;
324  print ' '.img_warning($langs->trans('SwitchThisForABetterSecurity', 1)).'<br>';
325  }
326  if (!empty($dolibarr_nocsrfcheck)) {
327  print $langs->trans("Warning").' dolibarr_nocsrfcheck = '.$dolibarr_nocsrfcheck;
328  print ' '.img_warning($langs->trans('SwitchThisForABetterSecurity', 0)).'<br>';
329  }
330  */
331 
332  print '<div class="div-table-responsive">';
333  print '<table class="liste centpercent">';
334 
335  // Fields title search
336  print '<tr class="liste_titre">';
337 
338  print '<td class="liste_titre" width="15%">';
339  print $form->selectDate($date_start === '' ? -1 : $date_start, 'date_start', 0, 0, 0, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzuserrel');
340  print $form->selectDate($date_end === '' ? -1 : $date_end, 'date_end', 0, 0, 0, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzuserrel');
341  print '</td>';
342 
343  print '<td class="liste_titre left">';
344  print '<input class="flat maxwidth100" type="text" name="search_code" value="'.dol_escape_htmltag($search_code).'">';
345  print '</td>';
346 
347  // IP
348  print '<td class="liste_titre left">';
349  print '<input class="flat maxwidth100" type="text" name="search_ip" value="'.dol_escape_htmltag($search_ip).'">';
350  print '</td>';
351 
352  print '<td class="liste_titre left">';
353  print '<input class="flat maxwidth100" type="text" name="search_user" value="'.dol_escape_htmltag($search_user).'">';
354  print '</td>';
355 
356  print '<td class="liste_titre left">';
357  //print '<input class="flat maxwidth100" type="text" size="10" name="search_desc" value="'.$search_desc.'">';
358  print '</td>';
359 
360  if (!empty($arrayfields['e.user_agent']['checked'])) {
361  print '<td class="liste_titre left">';
362  print '<input class="flat maxwidth100" type="text" name="search_ua" value="'.dol_escape_htmltag($search_ua).'">';
363  print '</td>';
364  }
365 
366  if (!empty($arrayfields['e.prefix_session']['checked'])) {
367  print '<td class="liste_titre left">';
368  print '<input class="flat maxwidth100" type="text" name="search_prefix_session" value="'.dol_escape_htmltag($search_prefix_session).'">';
369  print '</td>';
370  }
371 
372  print '<td class="liste_titre maxwidthsearch">';
373  $searchpicto = $form->showFilterAndCheckAddButtons(0);
374  print $searchpicto;
375  print '</td>';
376 
377  print "</tr>\n";
378 
379 
380  print '<tr class="liste_titre">';
381  print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "e.dateevent", "", $param, '', $sortfield, $sortorder);
382  print_liste_field_titre("Code", $_SERVER["PHP_SELF"], "e.type", "", $param, '', $sortfield, $sortorder);
383  print_liste_field_titre("IP", $_SERVER["PHP_SELF"], "e.ip", "", $param, '', $sortfield, $sortorder);
384  print_liste_field_titre("User", $_SERVER["PHP_SELF"], "u.login", "", $param, '', $sortfield, $sortorder);
385  print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "e.description", "", $param, '', $sortfield, $sortorder);
386  if (!empty($arrayfields['e.user_agent']['checked'])) {
387  print_liste_field_titre("UserAgent", $_SERVER["PHP_SELF"], "e.user_agent", "", $param, '', $sortfield, $sortorder);
388  }
389  if (!empty($arrayfields['e.prefix_session']['checked'])) {
390  print_liste_field_titre("SuffixSessionName", $_SERVER["PHP_SELF"], "e.prefix_session", "", $param, '', $sortfield, $sortorder);
391  }
393  print "</tr>\n";
394 
395  while ($i < min($num, $limit)) {
396  $obj = $db->fetch_object($result);
397 
398  print '<tr class="oddeven">';
399 
400  // Date
401  print '<td class="nowrap left">'.dol_print_date($db->jdate($obj->dateevent), '%Y-%m-%d %H:%M:%S', 'tzuserrel').'</td>';
402 
403  // Code
404  print '<td>'.$obj->type.'</td>';
405 
406  // IP
407  print '<td class="nowrap">';
408  print dol_print_ip($obj->ip);
409  print '</td>';
410 
411  // Login
412  print '<td class="nowrap">';
413  if ($obj->fk_user) {
414  $userstatic->id = $obj->fk_user;
415  $userstatic->login = $obj->login;
416  $userstatic->admin = $obj->admin;
417  $userstatic->entity = $obj->entity;
418  $userstatic->status = $obj->status;
419 
420  print $userstatic->getLoginUrl(1);
421  if (!empty($conf->multicompany->enabled) && $userstatic->admin && !$userstatic->entity) {
422  print img_picto($langs->trans("SuperAdministrator"), 'redstar', 'class="valignmiddle paddingleft"');
423  } elseif ($userstatic->admin) {
424  print img_picto($langs->trans("Administrator"), 'star', 'class="valignmiddle paddingleft"');
425  }
426  } else {
427  print '&nbsp;';
428  }
429  print '</td>';
430 
431  // Description
432  print '<td>';
433  $text = $langs->trans($obj->description);
434  $reg = array();
435  if (preg_match('/\((.*)\)(.*)/i', $obj->description, $reg)) {
436  $val = explode(',', $reg[1]);
437  $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] : '');
438  if (!empty($reg[2])) {
439  $text .= $reg[2];
440  }
441  }
442  print dol_escape_htmltag($text);
443  print '</td>';
444 
445  if (!empty($arrayfields['e.user_agent']['checked'])) {
446  // User agent
447  print '<td>';
448  print $obj->user_agent;
449  print '</td>';
450  }
451 
452  if (!empty($arrayfields['e.prefix_session']['checked'])) {
453  // User agent
454  print '<td>';
455  print $obj->prefix_session;
456  print '</td>';
457  }
458 
459  // More informations
460  print '<td class="right">';
461  $htmltext = '<b>'.$langs->trans("UserAgent").'</b>: '.($obj->user_agent ? dol_string_nohtmltag($obj->user_agent) : $langs->trans("Unknown"));
462  $htmltext .= '<br><b>'.$langs->trans("PrefixSession").'</b>: '.($obj->prefix_session ? dol_string_nohtmltag($obj->prefix_session) : $langs->trans("Unknown"));
463  print $form->textwithpicto('', $htmltext);
464  print '</td>';
465 
466  print "</tr>\n";
467  $i++;
468  }
469 
470  if ($num == 0) {
471  if ($usefilter) {
472  print '<tr><td colspan="7"><span class="opacitymedium">'.$langs->trans("NoEventFoundWithCriteria").'</span></td></tr>';
473  } else {
474  print '<tr><td colspan="7"><span class="opacitymedium">'.$langs->trans("NoEventOrNoAuditSetup").'</span></td></tr>';
475  }
476  }
477  print "</table>";
478  print "</div>";
479 
480  print "</form>";
481  $db->free($result);
482 } else {
483  dol_print_error($db);
484 }
485 
486 // End of page
487 llxFooter();
488 $db->close();
dol_getdate
dol_getdate($timestamp, $fast=false, $forcetimezone='')
Return an array with locale date info.
Definition: functions.lib.php:2713
dol_get_last_hour
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:597
dol_escape_htmltag
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0)
Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields.
Definition: functions.lib.php:1468
llxFooter
llxFooter()
Empty footer.
Definition: wrapper.php:73
GETPOST
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
Definition: functions.lib.php:484
dol_print_error
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
Definition: functions.lib.php:4844
$form
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
Definition: card.php:142
Events
Events class.
Definition: events.class.php:29
img_picto
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
Definition: functions.lib.php:3880
dol_string_nohtmltag
dol_string_nohtmltag($stringtoclean, $removelinefeed=1, $pagecodeto='UTF-8', $strip_tags=0, $removedoublespaces=1)
Clean a string from all HTML tags and entities.
Definition: functions.lib.php:6694
dol_syslog
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
Definition: functions.lib.php:1603
print_barre_liste
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.
Definition: functions.lib.php:5257
dol_get_first_day
dol_get_first_day($year, $month=1, $gm=false)
Return GMT time for first day of a month or year.
Definition: date.lib.php:551
dol_get_last_day
dol_get_last_day($year, $month=12, $gm=false)
Return GMT time for last day of a month or year.
Definition: date.lib.php:570
dol_print_ip
dol_print_ip($ip, $mode=0)
Return an IP formated to be shown on screen.
Definition: functions.lib.php:3481
User
Class to manage Dolibarr users.
Definition: user.class.php:44
GETPOSTISSET
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
Definition: functions.lib.php:386
print_liste_field_titre
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
Definition: functions.lib.php:5026
natural_search
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...
Definition: functions.lib.php:9420
Form
Class to manage generation of HTML components Only common components must be here.
Definition: html.form.class.php:52
dol_now
dol_now($mode='auto')
Return date for now.
Definition: functions.lib.php:2845
$resql
if(isModEnabled('facture') &&!empty($user->rights->facture->lire)) if((isModEnabled('fournisseur') &&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->facture->lire)||(isModEnabled('supplier_invoice') && $user->rights->supplier_invoice->lire)) if(isModEnabled('don') &&!empty($user->rights->don->lire)) if(isModEnabled('tax') &&!empty($user->rights->tax->charges->lire)) if(isModEnabled('facture') &&isModEnabled('commande') && $user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $resql
Social contributions to pay.
Definition: index.php:742
setEventMessages
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
Definition: functions.lib.php:8137
accessforbidden
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 ...
Definition: security.lib.php:933
dol_mktime
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...
Definition: functions.lib.php:2757
llxHeader
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Definition: wrapper.php:59