26 require
'../main.inc.php';
27 require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
28 require_once DOL_DOCUMENT_ROOT.
'/core/lib/agenda.lib.php';
29 require_once DOL_DOCUMENT_ROOT.
'/core/class/events.class.php';
37 $langs->loadLangs(array(
"users",
"admin",
"other"));
39 $action =
GETPOST(
'action',
'aZ09');
40 $contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'auditeventslist';
41 $optioncss =
GETPOST(
'optioncss',
'aZ');
44 $limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
45 $sortfield =
GETPOST(
'sortfield',
'aZ09comma');
46 $sortorder =
GETPOST(
'sortorder',
'aZ09comma');
48 if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
51 $offset = $limit * $page;
52 $pageprev = $page - 1;
53 $pagenext = $page + 1;
55 $securityevent =
new Events($db);
56 $eventstolog = $securityevent->eventstolog;
63 if ($action ==
"save") {
68 foreach ($eventstolog as $key => $arr) {
69 $param =
'MAIN_LOGEVENTS_'.$arr[
'id'];
70 if (
GETPOST($param,
'alphanohtml')) {
89 $varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
91 $selectedfields .=
$form->showCheckAddButtons(
'checkforselect', 1);
93 $wikihelp =
'EN:Setup_Security|FR:Paramétrage_Sécurité|ES:Configuración_Seguridad';
99 print
'<span class="opacitymedium">'.$langs->trans(
"LogEventDesc", $langs->transnoentitiesnoconv(
"AdminTools"), $langs->transnoentitiesnoconv(
"Audit")).
"</span><br>\n";
103 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
104 print
'<input type="hidden" name="token" value="'.newToken().
'">';
105 print
'<input type="hidden" name="action" value="save">';
113 print
'<table class="noborder centpercent">';
114 print
'<tr class="liste_titre">';
115 print
getTitleFieldOfList(
"TrackableSecurityEvents", 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'').
"\n";
116 print
getTitleFieldOfList($selectedfields, 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
119 foreach ($eventstolog as $key => $arr) {
121 print
'<tr class="oddeven">';
122 print
'<td>'.$arr[
'id'].
'</td>';
123 print
'<td class="center">';
124 $key =
'MAIN_LOGEVENTS_'.$arr[
'id'];
125 $value = empty($conf->global->$key) ?
'' : $conf->global->$key;
126 print
'<input class="oddeven checkforselect" type="checkbox" name="'.$key.
'" value="1"'.($value ?
' checked' :
'').
'>';
127 print
'</td></tr>'.
"\n";
132 print
'<div class="center">';
133 print
'<input type="submit" name="save" class="button button-save" value="'.$langs->trans(
"Save").
'">';
security_prepare_head()
Prepare array with list of tabs.
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).
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
if($actionsave) if(!isset($conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY)) $wikihelp
View.
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
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.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
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.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.