Go to the documentation of this file.
25 require
'../main.inc.php';
26 require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
27 require_once DOL_DOCUMENT_ROOT.
'/core/lib/agenda.lib.php';
28 require_once DOL_DOCUMENT_ROOT.
'/core/class/events.class.php';
36 $langs->loadLangs(array(
"users",
"admin",
"other"));
38 $action =
GETPOST(
'action',
'aZ09');
39 $contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'auditeventslist';
40 $optioncss =
GETPOST(
'optioncss',
'aZ');
43 $limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
44 $sortfield =
GETPOST(
'sortfield',
'aZ09comma');
45 $sortorder =
GETPOST(
'sortorder',
'aZ09comma');
47 if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
50 $offset = $limit * $page;
51 $pageprev = $page - 1;
52 $pagenext = $page + 1;
54 $securityevent =
new Events($db);
55 $eventstolog = $securityevent->eventstolog;
62 if ($action ==
"save") {
67 foreach ($eventstolog as $key => $arr) {
68 $param =
'MAIN_LOGEVENTS_'.$arr[
'id'];
69 if (
GETPOST($param,
'alphanohtml')) {
88 $varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
90 $selectedfields .=
$form->showCheckAddButtons(
'checkforselect', 1);
92 $wikihelp =
'EN:Setup_Security|FR:Paramétrage_Sécurité|ES:Configuración_Seguridad';
98 print
'<span class="opacitymedium">'.$langs->trans(
"LogEventDesc", $langs->transnoentitiesnoconv(
"AdminTools"), $langs->transnoentitiesnoconv(
"Audit")).
"</span><br>\n";
102 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
103 print
'<input type="hidden" name="token" value="'.newToken().
'">';
104 print
'<input type="hidden" name="action" value="save">';
112 print
'<table class="noborder" width="100%">';
113 print
"<tr class=\"liste_titre\">";
114 print
getTitleFieldOfList(
"LogEvents", 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'').
"\n";
115 print
getTitleFieldOfList($selectedfields, 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
118 foreach ($eventstolog as $key => $arr) {
120 print
'<tr class="oddeven">';
121 print
'<td>'.$arr[
'id'].
'</td>';
122 print
'<td class="center">';
123 $key =
'MAIN_LOGEVENTS_'.$arr[
'id'];
124 $value = empty($conf->global->$key) ?
'' : $conf->global->$key;
125 print
'<input class="oddeven checkforselect" type="checkbox" name="'.$key.
'" value="1"'.($value ?
' checked' :
'').
'>';
126 print
'</td></tr>'.
"\n";
133 print
'<div class="center">';
134 print
'<input type="submit" name="save" class="button button-save" value="'.$langs->trans(
"Save").
'">';
security_prepare_head()
Prepare array with list of tabs.
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='', $forcenowrapcolumntitle=0)
Get title line of an array.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
if($actionsave) if(!isset($conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY)) $wikihelp
View.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
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 ...
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.