27require
'../main.inc.php';
28require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
29require_once DOL_DOCUMENT_ROOT.
'/core/lib/agenda.lib.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/class/events.class.php';
46$langs->loadLangs(array(
"users",
"admin",
"other"));
48$action =
GETPOST(
'action',
'aZ09');
49$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'auditeventslist';
50$optioncss =
GETPOST(
'optioncss',
'aZ');
54$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
55$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
57if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
60$offset = $limit * $page;
64$securityevent =
new Events($db);
65$eventstolog = $securityevent->eventstolog;
72if ($action ==
"save") {
77 foreach ($eventstolog as $key => $arr) {
78 $param =
'MAIN_LOGEVENTS_'.$arr[
'id'];
79 if (
GETPOST($param,
'alphanohtml')) {
98$varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
100$selectedfields .= $form->showCheckAddButtons(
'checkforselect', 1);
102$wikihelp =
'EN:Setup_Security|FR:Paramétrage_Sécurité|ES:Configuración_Seguridad';
103llxHeader(
'', $langs->trans(
"Audit"), $wikihelp,
'', 0, 0,
'',
'',
'',
'mod-admin page-events');
108print
'<span class="opacitymedium">'.$langs->trans(
"LogEventDesc", $langs->transnoentitiesnoconv(
"AdminTools"), $langs->transnoentitiesnoconv(
"Audit")).
"</span><br>\n";
112print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
113print
'<input type="hidden" name="token" value="'.newToken().
'">';
114print
'<input type="hidden" name="action" value="save">';
122print
'<table class="noborder centpercent">';
123print
'<tr class="liste_titre">';
124print
getTitleFieldOfList(
"TrackableSecurityEvents", 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'').
"\n";
125print
getTitleFieldOfList($selectedfields, 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
128foreach ($eventstolog as $key => $arr) {
130 print
'<tr class="oddeven">';
131 print
'<td>'.$arr[
'id'].
'</td>';
132 print
'<td class="center">';
133 $key =
'MAIN_LOGEVENTS_'.$arr[
'id'];
135 print
'<input class="oddeven checkforselect" type="checkbox" name="'.$key.
'" value="1"'.($value ?
' checked' :
'').
'>';
136 print
'</td></tr>'.
"\n";
141print
'<div class="center">';
142print
'<input type="submit" name="save" class="button button-save" value="'.$langs->trans(
"Save").
'">';
150$s = $langs->trans(
"SeeReportPage",
'{s1}'.$langs->transnoentities(
"Home").
' - '.$langs->transnoentities(
"AdminTools").
' - '.$langs->transnoentities(
"Audit").
'{s2}');
151print str_replace(
'{s2}',
'</a>', str_replace(
'{s1}',
'<a href="'.DOL_URL_ROOT.
'/admin/tools/listevents.php" target="_blank">', $s));
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(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
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.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.